CoplanarPolygonOutlineGeometry

new Cesium.CoplanarPolygonOutlineGeometry(options)

A description of the outline of a polygon composed of arbitrary coplanar positions.
参数名称 类型 描述信息
options object Object with the following properties:
参数名称 类型 描述信息
polygonHierarchy PolygonHierarchy A polygon hierarchy that can include holes.
使用示例:
const polygonOutline = new Cesium.CoplanarPolygonOutlineGeometry({
  positions : Cesium.Cartesian3.fromDegreesArrayHeights([
     -90.0, 30.0, 0.0,
     -90.0, 30.0, 1000.0,
     -80.0, 30.0, 1000.0,
     -80.0, 30.0, 0.0
  ])
});
const geometry = Cesium.CoplanarPolygonOutlineGeometry.createGeometry(polygonOutline);
参考:

成员(属性)

The number of elements used to pack the object into an array.

方法

static Cesium.CoplanarPolygonOutlineGeometry.createGeometry(polygonGeometry)Geometry|undefined

Computes the geometric representation of an arbitrary coplanar polygon, including its vertices, indices, and a bounding sphere.
参数名称 类型 描述信息
polygonGeometry CoplanarPolygonOutlineGeometry A description of the polygon.
返回值:
The computed vertices and indices.

static Cesium.CoplanarPolygonOutlineGeometry.fromPositions(options)CoplanarPolygonOutlineGeometry

A description of a coplanar polygon outline from an array of positions.
参数名称 类型 描述信息
options object Object with the following properties:
参数名称 类型 描述信息
positions Array.<Cartesian3> An array of positions that defined the corner points of the polygon.
返回值:

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

Stores the provided instance into the provided array.
参数名称 类型 默认值 描述信息
value CoplanarPolygonOutlineGeometry The value to pack.
array Array.<number> The array to pack into.
startingIndex number 0 可选 The index into the array at which to start packing the elements.
返回值:
The array that was packed into

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

Retrieves an instance from a packed array.
参数名称 类型 默认值 描述信息
array Array.<number> The packed array.
startingIndex number 0 可选 The starting index of the element to be unpacked.
result CoplanarPolygonOutlineGeometry 可选 The object into which to store the result.
返回值:
The modified result parameter or a new CoplanarPolygonOutlineGeometry instance if one was not provided.