PolygonPipeline
DOC_TBA
Source:
Methods
-
<static> computeArea2D
-
DOC_TBA
Throws:
-
DeveloperError : positions is required.
-
DeveloperError : At least three positions are required.
-
-
<static> computeSubdivision
-
DOC_TBA
Parameters:
Name Type Argument Description positions
DOC_TBA DOC_TBA indices
DOC_TBA DOC_TBA granularity
Number <optional>
DOC_TBA Throws:
-
DeveloperError : positions is required.
-
DeveloperError : indices is required.
-
DeveloperError : At least three indices are required.
-
DeveloperError : The number of indices must be divisable by three.
-
DeveloperError : Granularity must be greater than zero.
-
-
<static> computeWindingOrder2D
-
DOC_TBA
Throws:
-
DeveloperError : positions is required.
-
DeveloperError : At least three positions are required.
Returns:
WindingOrder DOC_TBA -
-
<static> earClip2D
-
DOC_TBA
Throws:
-
DeveloperError : positions is required.
-
DeveloperError : At least three positions are required.
-
-
<static> eliminateHoles
-
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:
-
DeveloperError :
outerRing
is required. -
DeveloperError :
outerRing
must not be empty. -
DeveloperError :
innerRings
is required.
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> removeDuplicates
-
DOC_TBA Cleans up a simple polygon by removing duplicate adjacent positions and making the first position not equal the last position.
Throws:
-
DeveloperError : positions is required.
-
DeveloperError : At least three positions are required.
-
-
<static> scaleToGeodeticHeight
-
DOC_TBA
Throws:
DeveloperError : ellipsoid is required.