BufferPointCollection
| Name |
Type |
Description |
options |
object
|
| Name |
Type |
Default |
Description |
modelMatrix |
Matrix4
|
Matrix4.IDENTITY
|
optional
将几何体从模型坐标变换到世界坐标。 |
primitiveCountMax |
number
|
BufferPrimitiveCollection.DEFAULT_CAPACITY
|
optional
|
show |
boolean
|
true
|
optional
|
positionDatatype |
ComponentDatatype
|
ComponentDatatype.DOUBLE
|
optional
|
allowPicking |
boolean
|
false
|
optional
当 true 时,图元可使用 Scene#pick 进行拾取。当 false 时,内存和初始化成本更低。 |
debugShowBoundingVolume |
boolean
|
false
|
optional
|
|
Example:
const collection = new BufferPointCollection({primitiveCountMax: 1024});
const point = new BufferPoint();
const material = new BufferPointMaterial({color: Color.WHITE});
// 创建新点,临时绑定到 'point' 局部变量。
collection.add({
position: new Cartesian3(0.0, 0.0, 0.0),
material
}, point);
// 遍历集合中的所有点,将 'point' 局部变量临时绑定到每个点,
// 并更新点材质。
for (let i = 0; i < collection.primitiveCount; i++) {
collection.get(i, point);
point.setMaterial(material);
}
Experimental
此功能尚未最终确定,可能会在不遵循 Cesium 标准弃用政策的情况下进行更改。
See:
Extends
Methods
向集合添加新点,并指定选项。
BufferPoint 实例链接到新点,使用 'result' 参数(如果提供),否则使用新实例。
对于重复调用,建议重用单个 BufferPoint 实例,而不是在每次调用时分配新实例。
Returns:
Need help? The fastest way to get answers is from the community and team on the
Cesium Forum.