为性能和内存优化收集在ArrayBuffer存储中持有的点.

Default buffer memory allocation is arbitrary, and collections cannot be resized, 因此,收集中应提供具体的每缓冲能力 constructor when available.

new Cesium.BufferPointCollection(options)

Name Type Description
options object
Name Type Default Description
primitiveCountMax number BufferPrimitiveCollection.DEFAULT_CAPACITY optional
show boolean true optional
debugShowBoundingVolume boolean false optional
Example:
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.

See:

Extends

Methods

add(options, result)BufferPoint

向收藏中添加新点,并附带指定的选项。 页:1 BufferPoint instance is linked to the new point, using 如果给出了“ 结果” 参数, 或者没有给出新实例 。 对重复 调用,宁可重复使用单个缓冲点实例,而不是 每次通话都分配一个新实例.
Name Type Description
options BufferPointOptions
result BufferPoint
Returns:
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.