由任意共面位置組成的多邊形的描述。
new CoplanarPolygonGeometry(options)
Parameters:
options
(Object)
Name | Description |
---|---|
options.polygonHierarchy
PolygonHierarchy
|
包含孔的多邊形層次結構。 |
options.stRotation
Number
default 0.0
|
紋理坐標的旋轉,以弧度表示。正旋轉是逆時針的。 |
options.vertexFormat
VertexFormat
default VertexFormat.DEFAULT
|
要計算的頂點屬性。 |
options.ellipsoid
Ellipsoid
default Ellipsoid.WGS84
|
用作參考的橢球體。 |
Members
packedLength : Number
用于將對象打包到數組中的元素數。
Methods
(static) createGeometry(polygonGeometry) → {Geometry|undefined}
計算任意共面多邊形的幾何表示,包括其頂點、索引和邊界球。
Parameters:
從位置數組中對共面多邊形的描述。
Parameters:
options
(Object)
Name | Description |
---|---|
options.positions
Array.<Cartesian3>
|
定義多邊形角點的位置數組。 |
options.vertexFormat
VertexFormat
default VertexFormat.DEFAULT
|
要計算的頂點屬性。 |
options.stRotation
Number
default 0.0
|
紋理坐標的旋轉,以弧度表示。正旋轉是逆時針的。 |
options.ellipsoid
Ellipsoid
default Ellipsoid.WGS84
|
用作參考的橢球體。 |
Example
// create a polygon from points
var polygon = bmgl.CoplanarPolygonGeometry.fromPositions({
positions : bmgl.Cartesian3.fromDegreesArray([
-72.0, 40.0,
-70.0, 35.0,
-75.0, 30.0,
-70.0, 30.0,
-68.0, 40.0
])
});
var geometry = bmgl.PolygonGeometry.createGeometry(polygon);
- PolygonGeometry#createGeometry
See:
將提供的實例存儲到提供的數組中。
Parameters:
array
(Array.<Number>)
要打包的數組。
startingIndex
(Number)
(default 0
)
數組中開始打包元素的索引。
從壓縮數組中檢索實例。
Parameters:
array
(Array.<Number>)
壓縮數組。
startingIndex
(Number)
(default 0
)
要解包的元素的起始索引。