PolylinePipeline
DOC_TBA
Source:
Methods
-
<static> wrapLongitude
-
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 apositions
property that is an array of positions and asegments
property.Example
var polylines = new PolylineCollection(); var polyline = polylines.add(...); var positions = polyline.getPositions(); var modelMatrix = polylines.modelMatrix; var segments = PolylinePipeline.wrapLongitude(positions, modelMatrix);