com.supermap.data
类 GeoSphere

java.lang.Object
  继承者 com.supermap.data.Geometry
      继承者 com.supermap.data.Geometry3D
          继承者 com.supermap.data.GeoSphere

public class GeoSphere
extends Geometry3D

球体几何对象类。

继承于 Geometry3D 类。

该类仅在 Windows、Linux 平台版本中支持。

注意:添加该类型的实例到三维场景的跟踪图层时,必须要先调用 getGeoModel() 方法使其按 GeoModel 的方式重新构建。具体使用方法可参见 GeoBox 类的范例程序。


构造方法摘要
GeoSphere()
          构造一个新的 GeoSphere 对象。
GeoSphere(GeoSphere geoSphere)
          根据给定的 GeoSphere 对象构造一个与其完全相同的新对象。
GeoSphere(Point3D position, double radius)
          根据指定的参数来构造一个 GeoSphere 的新对象。
 
方法摘要
 GeoSphere clone()
          返回当前 GeoSphere 对象的一个拷贝。
 void dispose()
          释放该对象所占用的资源。
 Point3D getCenter()
          返回球体几何对象的球心。
 double getRadius()
          返回球体几何对象的半径,单位为米。
 GeoStyle getStyle()
          该类不支持该方法。
 boolean hitTest(Point2D point, double tolerance)
          该类不支持该方法。
 Geometry mirror(Point2D startPoint, Point2D endPoint)
          该类不支持该方法。
 void resize(Rectangle2D bounds)
          该类不支持该方法。
 void rotate(Point2D basePoint, double angle)
          该类不支持该方法。
 void setRadius(double value)
          设置球体几何对象的半径,单位为米。
 void setStyle(GeoStyle value)
          该类不支持该方法。
 
从类 com.supermap.data.Geometry3D 继承的方法
convertToGeoModel3D, convertToGeoModel3D, getBoundingBox, getGeoModel, getInnerPoint3D, getPosition, getRotationX, getRotationY, getRotationZ, getScaleX, getScaleY, getScaleZ, getStyle3D, getVolume, offset, setPosition, setRotationX, setRotationY, setRotationZ, setScaleX, setScaleY, setScaleZ, setStyle3D
 
从类 com.supermap.data.Geometry 继承的方法
addCustomGeometryCreatedListener, fromXML, getBounds, getID, getInnerPoint, getType, getVariantID, isEmpty, offset, removeCustomGeometryCreatedListener, setEmpty, setID, toXML
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

GeoSphere

public GeoSphere()
构造一个新的 GeoSphere 对象。


GeoSphere

public GeoSphere(GeoSphere geoSphere)
根据给定的 GeoSphere 对象构造一个与其完全相同的新对象。

参数:
geoSphere - 给定的 GeoSphere 对象。

GeoSphere

public GeoSphere(Point3D position,
                 double radius)
根据指定的参数来构造一个 GeoSphere 的新对象。

参数:
position - 球体几何对象的位置。
radius - 球体几何对象的半径,单位为米。
方法详细信息

getRadius

public double getRadius()
返回球体几何对象的半径,单位为米。

返回:
球体几何对象的半径。单位为米。
默认值:
默认值为 1.0,单位为米。

setRadius

public void setRadius(double value)
设置球体几何对象的半径,单位为米。

参数:
value - 球体几何对象的半径。单位为米。

getCenter

public Point3D getCenter()
返回球体几何对象的球心。

返回:
球体几何对象的球心。
默认值:
默认值为 {X = 0, Y = 0, Z = 1}。

clone

public GeoSphere clone()
返回当前 GeoSphere 对象的一个拷贝。

覆盖:
java.lang.Object 中的 clone
返回:
通过克隆操作得到的 GeoSphere 对象。

dispose

public void dispose()
释放该对象所占用的资源。当调用该方法之后,此对象不再可用。

覆盖:
Geometry 中的 dispose

getStyle

public GeoStyle getStyle()
该类不支持该方法。

覆盖:
Geometry3D 中的 getStyle
返回:
几何对象的风格。

setStyle

public void setStyle(GeoStyle value)
该类不支持该方法。

覆盖:
Geometry3D 中的 setStyle
参数:
value - 用来设置几何对象风格的 GeoStyle 对象。
另请参见:
Geometry.offset(double, double)

hitTest

public boolean hitTest(Point2D point,
                       double tolerance)
该类不支持该方法。

覆盖:
Geometry3D 中的 hitTest
参数:
point - 测试点。
tolerance - 容限值,单位与数据集的单位相同。
返回:
测试结果,点中了该几何对象返回 true;否则返回 false。
另请参见:
Point2D

mirror

public Geometry mirror(Point2D startPoint,
                       Point2D endPoint)
该类不支持该方法。

覆盖:
Geometry3D 中的 mirror
参数:
startPoint - 线段的起点。
endPoint - 线段的终点。
返回:
该几何对象关于指定对称的几何对象。
另请参见:
Geometry.offset(double,double)

resize

public void resize(Rectangle2D bounds)
该类不支持该方法。

覆盖:
Geometry3D 中的 resize
参数:
bounds - 调整大小后几何对象的范围。

rotate

public void rotate(Point2D basePoint,
                   double angle)
该类不支持该方法。

覆盖:
Geometry3D 中的 rotate
参数:
basePoint - 旋转的基点。
angle - 旋转的角度,单位为度。