BufferPointCollection

Collection of points held in ArrayBuffer storage for performance and memory optimization.

Default buffer memory allocation is arbitrary, and collections cannot be resized, so specific per-buffer capacities should be provided in the collection constructor when available.

new Cesium.BufferPointCollection(options)

Name Type Description
options object
Name Type Default Description
modelMatrix Matrix4 Matrix4.IDENTITY optional Transforms geometry from model to world coordinates.
primitiveCountMax number BufferPrimitiveCollection.DEFAULT_CAPACITY optional
positionDatatype ComponentDatatype ComponentDatatype.DOUBLE optional
positionNormalized boolean false optional
show boolean true optional
allowPicking boolean false optional When true, primitives are pickable with Scene#pick. When false, memory and initialization cost are lower.
boundingVolume BoundingSphere optional Bounding volume, in world space, for the collection. When unspecified, a bounding volume is computed automatically and updated when primitive positions change. When specified, users are responsible for updating bounding volume as needed. Pre-computing the bounding volume manually, and updating it only as needed, will improve performance for larger dynamic collections.
debugShowBoundingVolume boolean false optional
blendOption BlendOption BlendOption.TRANSLUCENT optional
Example:
const collection = new BufferPointCollection({primitiveCountMax: 1024});

const point = new BufferPoint();
const material = new BufferPointMaterial({color: Color.WHITE});

// Create a new point, temporarily bound to 'point' local variable.
collection.add({
  position: new Cartesian3(0.0, 0.0, 0.0),
  material
}, point);

// Iterate over all points in collection, temporarily binding 'point'
// local variable to each, and updating point material.
for (let i = 0; i < collection.primitiveCount; i++) {
  collection.get(i, point);
  point.setMaterial(material);
}
Experimental

This feature is not final and is subject to change without Cesium's standard deprecation policy.

See:

Extends

Methods

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.
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.