com.supermap.data
Class Geometry3D
- java.lang.Object
-
- com.supermap.data.Geometry
-
- com.supermap.data.Geometry3D
-
- Direct Known Subclasses:
- GeoBox, GeoLine3D, GeoModel, GeoPlacemark, GeoPoint3D, GeoRegion3D, GeoText3D
public abstract class Geometry3D extends Geometry
All the base classes of the 3D geometry classes (GeoPoint3D
,GeoLine3D
,GeoRegion3D
,etc).This class is used to represent the spatial characters of the 3D geographic entity, it provides the related processing methods. Use
GeoPoint3D
,GeoLine3D
andGeoRegion3D
to describe different geographic entities. When disposed the subobject of the object, call the method of this class to throw the ObjectDisposedException.The
Geometry3D
objects created by the user, such asGeoPoint3D
,GeoLine3D
,GeoRegion3D
, etc. It needs to be released if not needed any more.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description GeoModel
getGeoModel(int slices, int stacks)
Gets the GeoModel object through the numbers of slices and stacks.Point3D
getInnerPoint3D()
Returns the inner point of the geometry object.Point3D
getPosition()
Returns the point coordinates e of the geometry object.double
getRotationX()
Returns the rotation angle of the 3D geometry object relative to X Axis.double
getRotationY()
Returns the rotation angle of the 3D geometry object relative to Y Axis.double
getRotationZ()
Returns the rotation angle of the 3D geometry object relative to Z Axis.double
getScaleX()
Returns the zoom scale of the 3D geometry object relative to X Axis.double
getScaleY()
Returns the zoom scale of the 3D geometry object relative to Y Axis.double
getScaleZ()
Returns the zoom scale of the 3D geometry object relative to Z Axis.GeoStyle3D
getStyle3D()
Returns the 3D geometry style of the 3D geometry objects.double
getVolume()
Returns the volume of the GeoPicture3D object, in cubic meters.void
offset(double dx, double dy, double dz)
Offsets this geometry object by the specified quantity.void
setPosition(Point3D point)
Sets the point coordinates of the geometry object.void
setRotationX(double value)
Sets the rotation angle of the 3D geometry object relative to X Axis.void
setRotationY(double value)
Sets The rotation angle of the 3D geometry object relative to Y Axis.void
setRotationZ(double value)
The rotation angle of the 3D geometry object relative to Z Axis.void
setScaleX(double value)
Sets the zoom scale of the 3D geometry object relative to X Axis.void
setScaleY(double value)
Sets the zoom scale of the 3D geometry object relative to Y Axis.void
setScaleZ(double value)
Sets the zoom scale of the 3D geometry object relative to Z Axis.void
setStyle3D(GeoStyle3D value)
Sets the GeoStyle of the geometry object.
-
-
-
Method Detail
-
getPosition
public Point3D getPosition()
Returns the point coordinates e of the geometry object.- Returns:
- The location of the geometry3D object.
-
setPosition
public void setPosition(Point3D point)
Sets the point coordinates of the geometry object.- Parameters:
point
- Sets the point coordinates of the geometry object.
-
getStyle3D
public GeoStyle3D getStyle3D()
Returns the 3D geometry style of the 3D geometry objects. The 3D geometry style is used to define symbols, line styles, fill modes and other information of the geometry object.- Returns:
- The style of the geometry object.
- Default:
- The default value is null.
-
setStyle3D
public void setStyle3D(GeoStyle3D value)
Sets the GeoStyle of the geometry object. GeoStyle is used to define altitude mode, symbols, line styles, fill modes and other information of the geometry object.- Parameters:
value
- TheGeoStyle3D
object to set the style of the geometry object.
-
getRotationX
public double getRotationX()
Returns the rotation angle of the 3D geometry object relative to X Axis.- Returns:
- The rotation angle of the 3D geometry object relative to X Axis.
-
setRotationX
public void setRotationX(double value)
Sets the rotation angle of the 3D geometry object relative to X Axis.- Parameters:
value
- The rotation angle of the 3D geometry object relative to X Axis.
-
getRotationY
public double getRotationY()
Returns the rotation angle of the 3D geometry object relative to Y Axis.- Returns:
- The rotation angle of the 3D geometry object relative to Y Axis.
-
setRotationY
public void setRotationY(double value)
Sets The rotation angle of the 3D geometry object relative to Y Axis.- Parameters:
value
- The rotation angle of the 3D geometry object relative to Y Axis.
-
getRotationZ
public double getRotationZ()
Returns the rotation angle of the 3D geometry object relative to Z Axis.- Returns:
- The rotation angle of the 3D geometry object relative to Z Axis.
-
setRotationZ
public void setRotationZ(double value)
The rotation angle of the 3D geometry object relative to Z Axis.- Parameters:
value
- The rotation angle of the 3D geometry object relative to Z Axis.
-
getScaleX
public double getScaleX()
Returns the zoom scale of the 3D geometry object relative to X Axis.- Returns:
- The zoom scale of the 3D geometry object relative to X Axis.
-
setScaleX
public void setScaleX(double value)
Sets the zoom scale of the 3D geometry object relative to X Axis.- Parameters:
value
- Sets the zoom scale of the 3D geometry object relative to X Axis.
-
getScaleY
public double getScaleY()
Returns the zoom scale of the 3D geometry object relative to Y Axis.- Returns:
- The zoom scale of the 3D geometry object relative to Y Axis.
-
setScaleY
public void setScaleY(double value)
Sets the zoom scale of the 3D geometry object relative to Y Axis.- Parameters:
value
- Sets the zoom scale of the 3D geometry object relative to Y Axis.
-
getScaleZ
public double getScaleZ()
Returns the zoom scale of the 3D geometry object relative to Z Axis.- Returns:
- The zoom scale of the 3D geometry object relative to Z Axis.
-
setScaleZ
public void setScaleZ(double value)
Sets the zoom scale of the 3D geometry object relative to Z Axis.- Parameters:
value
- Sets the zoom scale of the 3D geometry object relative to Y Axis.
-
getInnerPoint3D
public Point3D getInnerPoint3D()
Returns the inner point of the geometry object.- The inner point of a Point object is the point itself;
- The inner point of a Line object is the middle vertex of the first part of the Line objects, if the number of the vertices of the part is even(the number of the vertices is more than two), the posterior one of the two middle vertices will be the inner point, if the number of the vertices of the part is two, the center of the two vertices will be the inner point;
- The inner point of a Region object is inside the geometric object and close to the center point;
- The inner point of a Text object is the anchor point of the first part of the Text object.
The inner point can be used in various situations.
- Returns:
- The inner point of the Geometry object.
- Default:
- The default value is Point3D( 0.0).
-
getVolume
public double getVolume()
Returns the volume of the GeoPicture3D object, in cubic meters.- Returns:
- The volume of the geometry3D
-
offset
public void offset(double dx, double dy, double dz)
Offsets this geometry object by the specified quantity.- Parameters:
dx
- The amount to offset the x-coordinate.dy
- The amount to offset the y-coordinate.dz
- The amount to offset the z-coordinate.
-
getGeoModel
public GeoModel getGeoModel(int slices, int stacks)
Gets the GeoModel object through the numbers of slices and stacks. The bigger slices and stacks, the finer the 3D model object will be split, so that the surface and edges of the rendered object are smoother and finer.- Parameters:
slices
- The numbers of slicesstacks
- The numbers of stacks- Returns:
- If successful, returns the object of addModel
-
-