Appearance
KBE3D / KBCore / Cesium / CoplanarPolygonOutlineGeometry
类: CoplanarPolygonOutlineGeometry
A description of the outline of a polygon composed of arbitrary coplanar positions.
示例
ts
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);参数
Object with the following properties:
参数
A polygon hierarchy that can include holes.
属性
packedLength
packedLength:
number
The number of elements used to pack the object into an array.
方法
fromPositions()
staticfromPositions(options: {positions:Cartesian3[]; }):CoplanarPolygonOutlineGeometry
A description of a coplanar polygon outline from an array of positions.
参数
options
Object with the following properties:
positions
An array of positions that defined the corner points of the polygon.
返回
CoplanarPolygonOutlineGeometry
pack()
staticpack(value:CoplanarPolygonOutlineGeometry,array:number[],startingIndex?:number):number[]
Stores the provided instance into the provided array.
参数
value
CoplanarPolygonOutlineGeometry
The value to pack.
array
number[]
The array to pack into.
startingIndex?
number
The index into the array at which to start packing the elements.
返回
number[]
The array that was packed into
unpack()
staticunpack(array:number[],startingIndex?:number,result?:CoplanarPolygonOutlineGeometry):CoplanarPolygonOutlineGeometry
Retrieves an instance from a packed array.
参数
array
number[]
The packed array.
startingIndex?
number
The starting index of the element to be unpacked.
result?
CoplanarPolygonOutlineGeometry
The object into which to store the result.
返回
CoplanarPolygonOutlineGeometry
The modified result parameter or a new CoplanarPolygonOutlineGeometry instance if one was not provided.
createGeometry()
staticcreateGeometry(polygonGeometry:CoplanarPolygonOutlineGeometry):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.
返回
Geometry | undefined
The computed vertices and indices.
构造函数
构造函数
new CoplanarPolygonOutlineGeometry(
options: {polygonHierarchy:PolygonHierarchy; }):CoplanarPolygonOutlineGeometry
参数
options
polygonHierarchy
返回
CoplanarPolygonOutlineGeometry
