sceneControlModelingShow = new SceneControl();
sceneControlModelingShow.Scene.Type = SceneType.NonEarthFlat;
//打开工作空间
workspaceModelingShow = new Workspace();
WorkspaceConnectionInfo workspaceConnectionInfo = new WorkspaceConnectionInfo(@"E:\2" + @"\UDB\ProjectWorkspace.smwu");
workspaceModelingShow.Open(workspaceConnectionInfo);
//用于三维场景展示的数据集
modelingDataVector = workspaceModelingShow.Datasources[0].Datasets[datasetName] as DatasetVector;
Recordset recordset = modelingDataVector.Query(@"SmID=1", CursorType.Dynamic);
Feature feature = recordset.GetFeature();
GeoRegion georegion = feature.GetGeometry() as GeoRegion;
Point2D innerPoint = georegion.InnerPoint;
Camera camera = new Camera(innerPoint.X, innerPoint.Y, 100, AltitudeMode.RelativeToGround);//构造一个相机对象,并对其进行设置
camera.Tilt = Convert.ToDouble(45);
camera.Heading = Convert.ToDouble(0);
Layer3DSettingVector layer3DSettingVector = new Layer3DSettingVector();
Theme3DCustom theme3D = new Theme3DCustom();
sceneControlModelingShow.Scene.Workspace = workspaceModelingShow;
sceneControlModelingShow.Scene.Camera = camera;
layer3DDataset = sceneControlModelingShow.Scene.Layers.Add(modelingDataVector, theme3D, true, @"模型展示三维场景");
//关联layersControl控件
layersControl1 = new LayersControl(sceneControlModelingShow.Scene);
layersControl1.Scene.Refresh();
使用产品:iobject.net 9D 操作系统:win7 x64
数据类型: 文件型
问题详细描述:左侧是sceneControl控件加载的模型,右侧是layerControl,关联后右侧无显示。