| 参数名称 |
类型 |
描述信息 |
options |
object
|
| 参数名称 |
类型 |
默认值 |
描述信息 |
primitiveCountMax |
number
|
BufferPrimitiveCollection.DEFAULT_CAPACITY
|
可选
|
show |
boolean
|
true
|
可选
|
debugShowBoundingVolume |
boolean
|
false
|
可选
|
|
使用示例:
const collection = new BufferPointCollection({primitiveCountMax: 1024});
const point = new BufferPoint();
// Create a new point, temporarily bound to 'point' local variable.
collection.add({
position: new Cartesian3(0.0, 0.0, 0.0),
color: Color.WHITE,
}, point);
// Iterate over all points in collection, temporarily binding 'point'
// local variable to each, and updating point color.
for (let i = 0; i < collection.primitiveCount; i++) {
collection.get(i, point);
point.setColor(Color.RED);
}
Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
参考:
Adds a new point to the collection, with the specified options. A
BufferPoint instance is linked to the new point, using
the 'result' argument if given, or a new instance if not. For repeated
calls, prefer to reuse a single BufferPoint instance rather than
allocating a new instance on each call.