public class TriangulatedSensorProjection extends Object
SensorProjection that has been triangulated for rendering.
 In order to minimize memory allocations, an instance of this class can be re-used for multiple projections.
 Each time that
 TriangulatedSensorProjection.updateFromNewProjection(CentralBody,Cartesian,SensorProjection,int)
 is called, the triangulation is updated.| Constructor and Description | 
|---|
TriangulatedSensorProjection()
Initializes a new instance. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Cartesian[] | 
computeSurfaceBoundaryLines()
Gets the boundary lines of the portions of the sensor that intersected with the surface of the
 central body as of the last call to
  
TriangulatedSensorProjection.updateFromNewProjection(CentralBody,Cartesian,SensorProjection,int). | 
double | 
getMaximumRadius()
Gets the maximum distance of any position in  
MeshVertexPositions (get) from the
 SensorOrigin (get) as of the last time that
 TriangulatedSensorProjection.updateFromNewProjection(CentralBody,Cartesian,SensorProjection,int) was called. | 
int[] | 
getMeshOutlineIndices()
Gets the vertex indices defining the outline lines of the mesh. 
 | 
int[] | 
getMeshVertexIndices()
Gets the vertex indices defining the triangles of the sensor mesh. 
 | 
Cartesian[] | 
getMeshVertexNormals()
Gets the normals of the vertices defining the sensor volume mesh. 
 | 
Cartesian[] | 
getMeshVertexPositions()
Gets the positions of the vertices defining the sensor volume mesh. 
 | 
Cartesian | 
getSensorOrigin()
Gets the origin of the sensor as of the last time that
  
TriangulatedSensorProjection.updateFromNewProjection(CentralBody,Cartesian,SensorProjection,int) was called. | 
BaseCollection<SurfaceTriangulatorResult> | 
triangulateSurfaceRegions()
Triangulates the portions of the sensor that intersected with the surface of the central body as of the last call to
  
TriangulatedSensorProjection.updateFromNewProjection(CentralBody,Cartesian,SensorProjection,int)
 and returns a SurfaceTriangulatorResult for each distinct region. | 
void | 
updateFromNewProjection(CentralBody centralBody,
                       Cartesian sensorOrigin,
                       SensorProjection projection,
                       int approximateSamplesPerBoundary)
Updates the triangulation from a given sensor projection. 
 | 
void | 
updateFromNewProjection(CentralBody centralBody,
                       Cartesian sensorOrigin,
                       SensorProjection projection,
                       int approximateSamplesPerBoundary,
                       boolean triangulateProjectionEndCap)
Updates the triangulation from a given sensor projection. 
 | 
public TriangulatedSensorProjection()
public final int[] getMeshOutlineIndices()
public final Cartesian[] getMeshVertexPositions()
null. When
 TriangulatedSensorProjection.updateFromNewProjection(CentralBody,Cartesian,SensorProjection,int)
 is called, the content of this array may be modified, or a new array may be created.public final Cartesian[] getMeshVertexNormals()
null. When
 TriangulatedSensorProjection.updateFromNewProjection(CentralBody,Cartesian,SensorProjection,int)
 is called, the content of this array may be modified, or a new array may be created.public final int[] getMeshVertexIndices()
null. When
 TriangulatedSensorProjection.updateFromNewProjection(CentralBody,Cartesian,SensorProjection,int)
 is called, the content of this array may be modified, or a new array may be created.public final Cartesian getSensorOrigin()
TriangulatedSensorProjection.updateFromNewProjection(CentralBody,Cartesian,SensorProjection,int) was called.public final double getMaximumRadius()
MeshVertexPositions (get) from the
 SensorOrigin (get) as of the last time that
 TriangulatedSensorProjection.updateFromNewProjection(CentralBody,Cartesian,SensorProjection,int) was called.public final BaseCollection<SurfaceTriangulatorResult> triangulateSurfaceRegions()
TriangulatedSensorProjection.updateFromNewProjection(CentralBody,Cartesian,SensorProjection,int)
 and returns a SurfaceTriangulatorResult for each distinct region.
 If the sensor has no projection, this property returns an empty collection.public final Cartesian[] computeSurfaceBoundaryLines()
TriangulatedSensorProjection.updateFromNewProjection(CentralBody,Cartesian,SensorProjection,int).
 Each pair of positions in the returned array defines a line segment on the surface.
 The line segments are not necessarily all connected.
 If there are no intersections with the central body, this method returns an empty array. When
 TriangulatedSensorProjection.updateFromNewProjection(CentralBody,Cartesian,SensorProjection,int)
 is called, the content of the returned array may be modified.public final void updateFromNewProjection(CentralBody centralBody, @Nonnull Cartesian sensorOrigin, @Nonnull SensorProjection projection, int approximateSamplesPerBoundary)
centralBody - The central body onto which the sensor is projected.sensorOrigin - The origin of the sensor, expressed in the
 FixedFrame (get / set) of the
 centralBody.projection - The new sensor projection.approximateSamplesPerBoundary - The number of samples to use per sensor projection boundary when triangulating.public final void updateFromNewProjection(CentralBody centralBody, @Nonnull Cartesian sensorOrigin, @Nonnull SensorProjection projection, int approximateSamplesPerBoundary, boolean triangulateProjectionEndCap)
centralBody - The central body onto which the sensor is projected.sensorOrigin - The origin of the sensor, expressed in the
 FixedFrame (get / set) of the
 centralBody.projection - The new sensor projection.approximateSamplesPerBoundary - The number of samples to use per sensor projection boundary when triangulating.triangulateProjectionEndCap - Whether trianglulations will be performed for an end cap of the projection.