PolylinePipeline

PolylinePipeline

Methods

<static>

Breaks a Polyline into segments such that it does not cross the ±180 degree meridian of an ellipsoid.

Parameters:
Name Type Argument Default Description
positions Array The polyline's Cartesian positions.
modelMatrix Matrix4 <optional>
Matrix4.IDENTITY The polyline's model matrix. Assumed to be an affine transformation matrix, where the upper left 3x3 elements are a rotation matrix, and the upper three elements in the fourth column are the translation. The bottom row is assumed to be [0, 0, 0, 1]. The matrix is not verified to be in the proper form.
Returns:
Object An object with a positions property that is an array of positions and a segments property.
Example
var polylines = new PolylineCollection();
var polyline = polylines.add(...);
var positions = polyline.getPositions();
var modelMatrix = polylines.modelMatrix;
var segments = PolylinePipeline.wrapLongitude(positions, modelMatrix);
See: