A description of a polyline with a volume (a 2D shape extruded along a polyline).
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
对象,具有以下属性:
|
- PolylineVolumeGeometry#createGeometry
Example:
function computeCircle(radius) {
const positions = [];
for (let i = 0; i < 360; i++) {
const radians = Cesium.Math.toRadians(i);
positions.push(new Cesium.Cartesian2(radius * Math.cos(radians), radius * Math.sin(radians)));
}
return positions;
}
const volume = new Cesium.PolylineVolumeGeometry({
vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
polylinePositions : Cesium.Cartesian3.fromDegreesArray([
-72.0, 40.0,
-70.0, 35.0
]),
shapePositions : computeCircle(100000.0)
});
Demo:
See:
Members
用于将对象打包到数组中的元素数量。
Methods
static Cesium.PolylineVolumeGeometry.createGeometry(polylineVolumeGeometry) → Geometry|undefined
计算具有体积的折线的几何表示,包括其顶点、索引和边界球体。
Name | Type | Description |
---|---|---|
polylineVolumeGeometry |
PolylineVolumeGeometry | 多段线体积的描述。 |
Returns:
计算的顶点和索引。
将提供的实例存储到提供的数组中。
Name | Type | Default | Description |
---|---|---|---|
value |
PolylineVolumeGeometry | 要打包的值。 | |
array |
Array.<number> | 要装入的数组。 | |
startingIndex |
number |
0
|
optional 开始打包元素的数组的索引。 |
Returns:
被装入的数组
static Cesium.PolylineVolumeGeometry.unpack(array, startingIndex, result) → PolylineVolumeGeometry
从打包数组中检索实例。
Name | Type | Default | Description |
---|---|---|---|
array |
Array.<number> | 打包数组。 | |
startingIndex |
number |
0
|
optional 要解压缩的元素的起始索引。 |
result |
PolylineVolumeGeometry | optional 要在其中存储结果的对象。 |
Returns:
修改后的结果参数 or a new PolylineVolumeGeometry instance if one was not provided.