BufferPolyline

View bound to the underlying buffer data of a BufferPolylineCollection.

BufferPolyline instances are flyweights: a single BufferPolyline instance can be temporarily bound to any conceptual "polyline" in a BufferPolylineCollection, allowing very large collections to be iterated and updated with a minimal memory footprint.

Represented as two (2) or more positions.

new Ditap.BufferPolyline()

Experimental

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

See:

Extends

Members

featureId : number

Feature ID associated with the primitive; not required to be unique.
Inherited From:

pickObject : object|undefined

User-defined pick object, if any. After a primitive has been rendered, its pick object can no longer be changed.
Inherited From:

show : boolean

Whether primitive is shown.
Inherited From:

readonly vertexCount : number

Count of positions (vertices) in this polyline, number of VEC3 elements.

Methods

static Ditap.BufferPolyline.clone(polyline, result) → BufferPolyline

Copies data from source polyline to result. If the result polyline is not new (the last polyline in the collection) then source and result polylines must have the same vertex counts.
Name Type Description
polyline BufferPolyline
result BufferPolyline
Returns:

getMaterial(result) → BufferPrimitiveMaterial

Name Type Description
result BufferPrimitiveMaterial
Returns:
Inherited From:

getPositions(result)

Returns an array view of this polyline's vertex positions. If 'result' argument is given, vertex positions are written to that array and returned. Otherwise, returns an ArrayView on collection memory — changes to this array will not trigger render updates, which requires `.setPositions()`.
Name Type Description
result TypedArray optional return {TypedArray}

setMaterial(material)

Name Type Description
material BufferPrimitiveMaterial
Inherited From:

setPositions(positions)

Name Type Description
positions TypedArray

toJSON() → Object

Returns a JSON-serializable object representing the polyline. This encoding is not memory-efficient, and should generally be used for debugging and testing.
Returns:
JSON-serializable object.
Inherited From: