描述一个由任意的同位素位置组成的多边形.
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
下列属性的对象 :
|
Example:
const polygonGeometry = new Cesium.CoplanarPolygonGeometry({
polygonHierarchy: new Cesium.PolygonHierarchy(
Cesium.Cartesian3.fromDegreesArrayHeights([
-90.0, 30.0, 0.0,
-90.0, 30.0, 300000.0,
-80.0, 30.0, 300000.0,
-80.0, 30.0, 0.0
]))
});
Members
Methods
static Cesium.CoplanarPolygonGeometry.createGeometry(polygonGeometry) → Geometry|undefined
计算任意的coplanar多边形的几何表示,包括其顶点,指数,以及边框.
| Name | Type | Description |
|---|---|---|
polygonGeometry |
CoplanarPolygonGeometry | 多边形描述. |
Returns:
计算出的顶点和指数.
static Cesium.CoplanarPolygonGeometry.fromPositions(options) → CoplanarPolygonGeometry
描述一组位置上的同形多边形.
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
下列属性的对象 :
|
Returns:
- PolygonGeometry#createGeometry
Example:
// create a polygon from points
const polygon = Cesium.CoplanarPolygonGeometry.fromPositions({
positions : Cesium.Cartesian3.fromDegreesArray([
-72.0, 40.0,
-70.0, 35.0,
-75.0, 30.0,
-70.0, 30.0,
-68.0, 40.0
])
});
const geometry = Cesium.PolygonGeometry.createGeometry(polygon);
See:
将所提供的实例存储到所提供的数组中.
| Name | Type | Default | Description |
|---|---|---|---|
value |
CoplanarPolygonGeometry | 包装的价值. | |
array |
Array.<number> | 装入的阵列. | |
startingIndex |
number |
0
|
optional The index into the array at which to start packing the elements. |
Returns:
装入的阵列
static Cesium.CoplanarPolygonGeometry.unpack(array, startingIndex, result) → CoplanarPolygonGeometry
从组合的数组中获取实例 .
| Name | Type | Default | Description |
|---|---|---|---|
array |
Array.<number> | 装填的阵列. | |
startingIndex |
number |
0
|
optional The starting index of the element to be unpacked. |
result |
CoplanarPolygonGeometry | optional 存储结果的对象. |
Returns:
如果不提供经修改的结果参数或新的CoplanarPolygonGeometry实例.