由任意共面位置組成的多邊形的描述。
new CoplanarPolygonGeometry(options)
Parameters:
options
(Object)
Name | Description |
---|---|
options.polygonHierarchy
PolygonHierarchy
|
包含孔的多邊形層次結(jié)構(gòu)。 |
options.stRotation
Number
default 0.0
|
紋理坐標(biāo)的旋轉(zhuǎn),以弧度表示。正旋轉(zhuǎn)是逆時(shí)針的。 |
options.vertexFormat
VertexFormat
default VertexFormat.DEFAULT
|
要計(jì)算的頂點(diǎn)屬性。 |
options.ellipsoid
Ellipsoid
default Ellipsoid.WGS84
|
用作參考的橢球體。 |
Members
packedLength : Number
用于將對(duì)象打包到數(shù)組中的元素?cái)?shù)。
Methods
(static) createGeometry(polygonGeometry) → {Geometry|undefined}
計(jì)算任意共面多邊形的幾何表示,包括其頂點(diǎn)、索引和邊界球。
Parameters:
從位置數(shù)組中對(duì)共面多邊形的描述。
Parameters:
options
(Object)
Name | Description |
---|---|
options.positions
Array.<Cartesian3>
|
定義多邊形角點(diǎn)的位置數(shù)組。 |
options.vertexFormat
VertexFormat
default VertexFormat.DEFAULT
|
要計(jì)算的頂點(diǎn)屬性。 |
options.stRotation
Number
default 0.0
|
紋理坐標(biāo)的旋轉(zhuǎn),以弧度表示。正旋轉(zhuǎn)是逆時(shí)針的。 |
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:
將提供的實(shí)例存儲(chǔ)到提供的數(shù)組中。
Parameters:
array
(Array.<Number>)
要打包的數(shù)組。
startingIndex
(Number)
(default 0
)
數(shù)組中開(kāi)始打包元素的索引。
從壓縮數(shù)組中檢索實(shí)例。
Parameters:
array
(Array.<Number>)
壓縮數(shù)組。
startingIndex
(Number)
(default 0
)
要解包的元素的起始索引。