PolygonPipeline

PolygonPipeline

Methods

<static>

DOC_TBA Cleans up a simple polygon by removing duplicate adjacent positions and making the first position not equal the last position.

Throws:

<static>

DOC_TBA

Throws:

<static>

DOC_TBA

Parameters:
Name Type Argument Description
positions DOC_TBA DOC_TBA
indices DOC_TBA DOC_TBA
granularity Number <optional>
DOC_TBA
Throws:

<static>

DOC_TBA

Throws:
Returns:
WindingOrder DOC_TBA

<static>

DOC_TBA

Throws:

<static>

Given a polygon defined by an outer ring with one or more inner rings (holes), return a single list of points representing a polygon defined by the outer ring with the inner holes removed.

Parameters:
Name Type Description
outerRing Array An array of Cartesian points defining the outer boundary of the polygon.
innerRings Array An array of arrays of Cartesian points, where each array represents a hole in the polygon.
Throws:
Returns:
A single list of Cartesian points defining the polygon, including the eliminated inner ring.
Example
// Simplifying a polygon with multiple holes.
outerRing = PolygonPipeline.eliminateHoles(outerRing, innerRings);
polygon.setPositions(outerRing);

<static>

DOC_TBA

Throws:
DeveloperError : ellipsoid is required.

<static>

Subdivides a Polygon such that no triangles cross the ±180 degree meridian of an ellipsoid.

Parameters:
Name Type Description
positions Array The Cartesian positions of triangles that make up a polygon.
indices Array The indices of positions in the positions array that make up triangles
Throws:
Returns:
Object The full set of indices, including those for positions added for newly created triangles
Example
var positions = [new Cartesian3(-1, -1, 0), new Cartesian3(-1, 1, 2), new Cartesian3(-1, 2, 2)];
var indices = [0, 1, 2];
indices = PolygonPipeline.wrapLongitude(positions, indices);
See: