墙壁的描述,与 NT 0 线条字符串类似. 墙由一系列点来定义,
将它挤到地上 可以选择,它们可以向下挤压到指定的高度.
| Name | Type | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
下列属性的对象 :
|
Throws:
-
DeveloperError : positions length must be greater than or equal to 2.
-
DeveloperError : positions and maximumHeights must have the same length.
-
DeveloperError : positions and minimumHeights must have the same length.
- WallGeometry#createGeometry
- WallGeometry#fromConstantHeight
Example:
// create a wall that spans from ground level to 10000 meters
const wall = new Cesium.WallGeometry({
positions : Cesium.Cartesian3.fromDegreesArrayHeights([
19.0, 47.0, 10000.0,
19.0, 48.0, 10000.0,
20.0, 48.0, 10000.0,
20.0, 47.0, 10000.0,
19.0, 47.0, 10000.0
])
});
const geometry = Cesium.WallGeometry.createGeometry(wall);
Demo:
See:
Members
Methods
static Cesium.WallGeometry.createGeometry(wallGeometry) → Geometry|undefined
计算一面墙的几何代表,包括它的顶点,指数,以及边框.
| Name | Type | Description |
|---|---|---|
wallGeometry |
WallGeometry | 城墙简介. |
Returns:
计算出的顶点和指数.
static Cesium.WallGeometry.fromConstantHeights(options) → WallGeometry
墙壁的描述,与 NT 0 线条字符串类似. 墙由一系列点来定义,
将它挤到地上 可以选择,它们可以向下挤压到指定的高度.
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
下列属性的对象 :
|
Returns:
- WallGeometry#createGeometry
Example:
// create a wall that spans from 10000 meters to 20000 meters
const wall = Cesium.WallGeometry.fromConstantHeights({
positions : Cesium.Cartesian3.fromDegreesArray([
19.0, 47.0,
19.0, 48.0,
20.0, 48.0,
20.0, 47.0,
19.0, 47.0,
]),
minimumHeight : 20000.0,
maximumHeight : 10000.0
});
const geometry = Cesium.WallGeometry.createGeometry(wall);
See:
将所提供的实例存储到所提供的数组中.
| Name | Type | Default | Description |
|---|---|---|---|
value |
WallGeometry | 包装的价值. | |
array |
Array.<number> | 装入的阵列. | |
startingIndex |
number |
0
|
optional The index into the array at which to start packing the elements. |
Returns:
装入的阵列
static Cesium.WallGeometry.unpack(array, startingIndex, result) → WallGeometry
从组合的数组中获取实例 .
| Name | Type | Default | Description |
|---|---|---|---|
array |
Array.<number> | 装填的阵列. | |
startingIndex |
number |
0
|
optional The starting index of the element to be unpacked. |
result |
WallGeometry | optional 存储结果的对象. |
Returns:
未提供修改的结果参数或新的WallGeometry实例.