new Cesium.EllipseGeometry(options)

A description of an ellipse on an ellipsoid. Ellipse geometry can be rendered with both Primitive and GroundPrimitive.
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
center Cartesian3 椭圆形中央点在固定框中.
semiMajorAxis number 椭圆半主轴的长度以米计.
semiMinorAxis number 椭圆半微轴的长度以米计.
ellipsoid Ellipsoid Ellipsoid.default optional The ellipsoid the ellipse will be on.
height number 0.0 optional 椭圆与椭圆表面之间以米计的距离.
extrudedHeight number optional The distance in meters between the ellipse's extruded face and the ellipsoid surface.
rotation number 0.0 optional 从北边逆时针旋转的角度.
stRotation number 0.0 optional 纹理坐标逆时针从北向旋转.
granularity number CesiumMath.RADIANS_PER_DEGREE optional The angular distance between points on the ellipse in radians.
vertexFormat VertexFormat VertexFormat.DEFAULT optional The vertex attributes to be computed.
Throws:
  • DeveloperError : semiMajorAxis and semiMinorAxis must be greater than zero.
  • DeveloperError : semiMajorAxis must be greater than or equal to the semiMinorAxis.
  • DeveloperError : granularity must be greater than zero.
Example:
// Create an ellipse.
const ellipse = new Cesium.EllipseGeometry({
  center : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
  semiMajorAxis : 500000.0,
  semiMinorAxis : 300000.0,
  rotation : Cesium.Math.toRadians(60.0)
});
const geometry = Cesium.EllipseGeometry.createGeometry(ellipse);
See:

Members

static Cesium.EllipseGeometry.packedLength : number

用于将对象组合成数组的元素数量.

Methods

static Cesium.EllipseGeometry.computeRectangle(options, result)Rectangle

根据提供的选项计算边框矩形
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
center Cartesian3 椭圆形中央点在固定框中.
semiMajorAxis number 椭圆半主轴的长度以米计.
semiMinorAxis number 椭圆半微轴的长度以米计.
ellipsoid Ellipsoid Ellipsoid.default optional The ellipsoid the ellipse will be on.
rotation number 0.0 optional 从北边逆时针旋转的角度.
granularity number CesiumMath.RADIANS_PER_DEGREE optional The angular distance between points on the ellipse in radians.
result Rectangle optional 存储结果的对象
Returns:
结果矩形

static Cesium.EllipseGeometry.createGeometry(ellipseGeometry)Geometry|undefined

计算椭圆上椭圆的几何表示,包括它的顶点,指数,和边框.
Name Type Description
ellipseGeometry EllipseGeometry 椭圆形的描述.
Returns:
计算出的顶点和指数.

static Cesium.EllipseGeometry.pack(value, array, startingIndex)Array.<number>

将所提供的实例存储到所提供的数组中.
Name Type Default Description
value EllipseGeometry 包装的价值.
array Array.<number> 装入的阵列.
startingIndex number 0 optional The index into the array at which to start packing the elements.
Returns:
装入的阵列

static Cesium.EllipseGeometry.unpack(array, startingIndex, result)EllipseGeometry

从组合的数组中获取实例 .
Name Type Default Description
array Array.<number> 装填的阵列.
startingIndex number 0 optional The starting index of the element to be unpacked.
result EllipseGeometry optional 存储结果的对象.
Returns:
如果不提供修改的结果参数或新的椭圆图形实例.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.