描述一个多线条模型作为线条;前两个位置定义了线段,
和每个附加位置定义了上一个位置的线段。 聚线能够
以材料显示.
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
下列属性的对象 :
|
Throws:
-
DeveloperError : At least two positions are required.
-
DeveloperError : width must be greater than or equal to one.
-
DeveloperError : colors has an invalid length.
- PolylineGeometry#createGeometry
Example:
// A polyline with two connected line segments
const polyline = new Cesium.PolylineGeometry({
positions : Cesium.Cartesian3.fromDegreesArray([
0.0, 0.0,
5.0, 0.0,
5.0, 5.0
]),
width : 10.0
});
const geometry = Cesium.PolylineGeometry.createGeometry(polyline);
Demo:
See:
Members
Methods
static Cesium.PolylineGeometry.createGeometry(polylineGeometry) → Geometry|undefined
计算一个多线的几何表示,包括它的顶点,指数和边框.
| Name | Type | Description |
|---|---|---|
polylineGeometry |
PolylineGeometry | 聚线描述. |
Returns:
计算出的顶点和指数.
将所提供的实例存储到所提供的数组中.
| Name | Type | Default | Description |
|---|---|---|---|
value |
PolylineGeometry | 包装的价值. | |
array |
Array.<number> | 装入的阵列. | |
startingIndex |
number |
0
|
optional The index into the array at which to start packing the elements. |
Returns:
装入的阵列
static Cesium.PolylineGeometry.unpack(array, startingIndex, result) → PolylineGeometry
从组合的数组中获取实例 .
| Name | Type | Default | Description |
|---|---|---|---|
array |
Array.<number> | 装填的阵列. | |
startingIndex |
number |
0
|
optional The starting index of the element to be unpacked. |
result |
PolylineGeometry | optional 存储结果的对象. |
Returns:
如果不提供经修改的结果参数或一个新的PolylineGeometry实例.