所有三维几何类的基类,提供了基本的三维几何类的属性和方法。通过本类可以对三维几何对象的姿态进行控制,包括对象的位置,旋转角度,缩放比例和内点;还可以对三维几何对象进行偏移;还可以获取三维模型几何对象。
命名空间:
SuperMap.Data程序集: SuperMap.Data (in SuperMap.Data)
版本: dll
语法
C# |
---|
public abstract class Geometry3D : Geometry |
示例
以下代码示范如何设置三维几何对象。
CopyC#
public void Geometry3DSample(Scene sceneObject) { // 得到顶层的三维要素对象 Layer3D layer3D = sceneObject.Layers.Add(@"D:\SampleData\kml.kml",Layer3DType.KML, true); Feature3D feature3D = layer3D.Features[0] as Feature3D; // 获得三维要素对应的三维几何对象 GeoPlacemark geoPlacemark = feature3D.Geometry as GeoPlacemark; Geometry3D geometry3D = geoPlacemark.Geometry as Geometry3D; // 将三维几何对象进行平移 geometry3D.Offset(10, 10, 12); // 设置三维几何对象的属性 geometry3D.ID = 25; geometry3D.Position = new Point3D(20, 25, 20); geometry3D.RotationX = 10; geometry3D.RotationY = 15; geometry3D.RotationZ = 5; geometry3D.ScaleX = 0.5; geometry3D.ScaleY = 0.8; geometry3D.ScaleZ = 1.2; // 释放资源 geometry3D.Dispose(); feature3D.Dispose(); }
继承层次
System..::.Object
SuperMap.Data..::.Geometry
SuperMap.Data..::.Geometry3D
SuperMap.Data..::.GeoBillboard
SuperMap.Data..::.GeoBox
SuperMap.Data..::.GeoCircle3D
SuperMap.Data..::.GeoCone
SuperMap.Data..::.GeoCylinder
SuperMap.Data..::.GeoEllipsoid
SuperMap.Data..::.GeoGraphicCompound
SuperMap.Data..::.GeoHemiSphere
SuperMap.Data..::.GeoLine3D
SuperMap.Data..::.GeoModel
SuperMap.Data..::.GeoModel3D
SuperMap.Data..::.GeoParticle
SuperMap.Data..::.GeoPicture3D
SuperMap.Data..::.GeoPie3D
SuperMap.Data..::.GeoPieCylinder
SuperMap.Data..::.GeoPlacemark
SuperMap.Data..::.GeoPoint3D
SuperMap.Data..::.GeoPyramid
SuperMap.Data..::.GeoRegion3D
SuperMap.Data..::.GeoSphere
SuperMap.Data..::.GeoText3D
SuperMap.Data..::.GeoTIM
SuperMap.Data..::.Geometry
SuperMap.Data..::.Geometry3D
SuperMap.Data..::.GeoBillboard
SuperMap.Data..::.GeoBox
SuperMap.Data..::.GeoCircle3D
SuperMap.Data..::.GeoCone
SuperMap.Data..::.GeoCylinder
SuperMap.Data..::.GeoEllipsoid
SuperMap.Data..::.GeoGraphicCompound
SuperMap.Data..::.GeoHemiSphere
SuperMap.Data..::.GeoLine3D
SuperMap.Data..::.GeoModel
SuperMap.Data..::.GeoModel3D
SuperMap.Data..::.GeoParticle
SuperMap.Data..::.GeoPicture3D
SuperMap.Data..::.GeoPie3D
SuperMap.Data..::.GeoPieCylinder
SuperMap.Data..::.GeoPlacemark
SuperMap.Data..::.GeoPoint3D
SuperMap.Data..::.GeoPyramid
SuperMap.Data..::.GeoRegion3D
SuperMap.Data..::.GeoSphere
SuperMap.Data..::.GeoText3D
SuperMap.Data..::.GeoTIM