public final class SurfacePolygonTriangulator extends Object
TriangleMeshPrimitive
or
SurfaceMeshPrimitive
.
The boundary is commonly visualized with the
PolylinePrimitive
.Modifier and Type | Method and Description |
---|---|
static SurfaceTriangulatorResult |
compute(CentralBody centralBody,
Iterable<Cartesian> positions)
Computes the triangulation on the specified
centralBody
for a polygon whose boundary is defined by the specified positions . |
static SurfaceTriangulatorResult |
compute(CentralBody centralBody,
Iterable<Cartesian> positions,
double altitude,
double granularity,
WindingOrder positionsWindingOrder)
Computes the triangulation on the specified
centralBody
for a polygon whose boundary is defined by the specified positions . |
static SurfaceTriangulatorResult |
compute(CentralBody centralBody,
Iterable<Cartesian> positions,
Iterable<Cartesian> holePositions)
Computes the triangulation on the specified
centralBody
for a polygon whose boundary is defined by the specified positions
with a hole specified by holePositions . |
static SurfaceTriangulatorResult |
compute(CentralBody centralBody,
Iterable<Cartesian> positions,
Iterable<Cartesian> holePositions,
double altitude,
double granularity)
Computes the triangulation on the specified
centralBody
for a polygon whose boundary is defined by the specified positions
with a hole specified by holePositions . |
static SurfaceTriangulatorResult |
computeCartographic(CentralBody centralBody,
Iterable<Cartographic> positions)
For convenience.
|
static SurfaceTriangulatorResult |
computeCartographic(CentralBody centralBody,
Iterable<Cartographic> positions,
double altitude,
double granularity,
WindingOrder positionsWindingOrder)
For convenience.
|
public static final SurfaceTriangulatorResult compute(CentralBody centralBody, Iterable<Cartesian> positions)
centralBody
for a polygon whose boundary is defined by the specified positions
.
This is equivalent to calling
SurfacePolygonTriangulator.compute(agi.foundation.celestial.CentralBody,java.lang.Iterable,double,double,agi.foundation.geometry.discrete.WindingOrder)
with an altitude
of 0
, a granularity
of 1
degree, and
a positionsWindingOrder
of Compute
.centralBody
- The central body to compute the triangulation on.positions
- The positions defining the boundary of the polygon, in the centralBody
's fixed reference frame, to triangulate.SurfaceTriangulatorResult
object representing the triangulation, in the centralBody
's fixed reference frame.SurfacePolygonTriangulator.compute(agi.foundation.celestial.CentralBody,java.lang.Iterable,double,double,agi.foundation.geometry.discrete.WindingOrder)
public static final SurfaceTriangulatorResult computeCartographic(CentralBody centralBody, Iterable<Cartographic> positions)
centralBody
for a polygon whose boundary is defined by the specified Cartographic
positions.
Longitude and latitude are in radians, and altitude is in meters.
This is equivalent to
converting each position in positions
to
Cartesian
and calling
SurfacePolygonTriangulator.compute(agi.foundation.celestial.CentralBody,java.lang.Iterable)
See
SurfacePolygonTriangulator.compute(agi.foundation.celestial.CentralBody,java.lang.Iterable,double,double,agi.foundation.geometry.discrete.WindingOrder)
for a full discussion.
centralBody
- The central body to compute the triangulation on.positions
- The positions defining the boundary of the polygon to triangulate.SurfaceTriangulatorResult
object representing the triangulation, in the centralBody
's fixed reference frame.SurfacePolygonTriangulator.compute(agi.foundation.celestial.CentralBody,java.lang.Iterable,double,double,agi.foundation.geometry.discrete.WindingOrder)
public static final SurfaceTriangulatorResult compute(CentralBody centralBody, Iterable<Cartesian> positions, Iterable<Cartesian> holePositions)
centralBody
for a polygon whose boundary is defined by the specified positions
with a hole specified by holePositions
.
This is equivalent to calling
SurfacePolygonTriangulator.compute(agi.foundation.celestial.CentralBody,java.lang.Iterable,double,double,agi.foundation.geometry.discrete.WindingOrder)
with an altitude
of 0
and a granularity
of 1
degree.centralBody
- The central body to compute the triangulation on.positions
- The positions defining the boundary of the polygon, in the centralBody
's fixed reference frame, to triangulate.holePositions
- The positions defining the hole in the polygon, in the centralBody
's fixed reference frame.SurfaceTriangulatorResult
object representing the triangulation, in the centralBody
's fixed reference frame.SurfacePolygonTriangulator.compute(agi.foundation.celestial.CentralBody,java.lang.Iterable,double,double,agi.foundation.geometry.discrete.WindingOrder)
public static final SurfaceTriangulatorResult compute(CentralBody centralBody, Iterable<Cartesian> positions, Iterable<Cartesian> holePositions, double altitude, double granularity)
centralBody
for a polygon whose boundary is defined by the specified positions
with a hole specified by holePositions
.centralBody
- The central body to compute the triangulation on.positions
- The positions defining the boundary of the polygon, in the centralBody
's fixed reference frame, to triangulate.holePositions
- The positions defining the hole in the polygon, in the centralBody
's fixed reference frame.altitude
- The altitude of the triangulation. When 0
, the mesh is computed to conform to the ellipsoid.granularity
- The angular separation, in radians, of positions in the triangulation.
Lower granularities are more precise but create more triangles.SurfaceTriangulatorResult
object representing the triangulation, in the centralBody
's fixed reference frame.ArgumentNullException
- centralBody
, positions
, or holePositions
is null
.ArgumentException
- positions
and holePositions
must contain at least three elements.ArgumentException
- granularity
must be greater than 0
.ArgumentException
- Could not triangulate. The polygon may cross over itself or it may be too large.public static final SurfaceTriangulatorResult compute(CentralBody centralBody, Iterable<Cartesian> positions, double altitude, double granularity, WindingOrder positionsWindingOrder)
centralBody
for a polygon whose boundary is defined by the specified positions
.centralBody
- The central body to compute the triangulation on.positions
- The positions defining the boundary of the polygon, in the centralBody
's fixed reference frame, to triangulate.altitude
- The altitude of the triangulation. When 0
, the mesh is computed to conform to the ellipsoid.granularity
- The angular separation, in radians, of positions in the triangulation.
Lower granularities are more precise but create more triangles.positionsWindingOrder
- The winding order of positions
.SurfaceTriangulatorResult
object representing the triangulation, in the centralBody
's fixed reference frame.ArgumentNullException
- centralBody
or positions
is null
.ArgumentException
- positions
must contain at least three elements.ArgumentException
- granularity
must be greater than 0
.UnsupportedCaseException
- positionsWindingOrder
must be a valid enumeration value in
WindingOrder
.ArgumentException
- Could not triangulate. The polygon may cross over itself or it may be too large.public static final SurfaceTriangulatorResult computeCartographic(CentralBody centralBody, Iterable<Cartographic> positions, double altitude, double granularity, WindingOrder positionsWindingOrder)
centralBody
for a polygon whose boundary is defined by the specified Cartographic
positions.
Longitude and latitude are in radians, and altitude is in meters.
This is equivalent to
converting each position in positions
to
Cartesian
and calling
SurfacePolygonTriangulator.compute(agi.foundation.celestial.CentralBody,java.lang.Iterable,double,double,agi.foundation.geometry.discrete.WindingOrder)
See
SurfacePolygonTriangulator.compute(agi.foundation.celestial.CentralBody,java.lang.Iterable,double,double,agi.foundation.geometry.discrete.WindingOrder)
for a full discussion.
centralBody
- The central body to compute the triangulation on.positions
- The positions defining the boundary of the polygon to triangulate.altitude
- The altitude of the triangulation. When 0
, the mesh is computed to conform to the ellipsoid.granularity
- The angular separation, in radians, of positions in the triangulation.
Lower granularities are more precise but create more triangles.positionsWindingOrder
- The winding order of positions
.SurfaceTriangulatorResult
object representing the triangulation, in the centralBody
's fixed reference frame.SurfacePolygonTriangulator.compute(agi.foundation.celestial.CentralBody,java.lang.Iterable,double,double,agi.foundation.geometry.discrete.WindingOrder)