public class IntersectionWithSurfaceRegionsCoverageGrid extends CentralBodyCoverageGrid
CentralBodyCoverageGrid
and lying inside a set of
EllipsoidSurfaceRegions
.
The weight and grid cell settings are carried over from the underlying grid.
Constructor and Description |
---|
IntersectionWithSurfaceRegionsCoverageGrid(CentralBodyCoverageGrid gridPointProvider,
EllipsoidSurfaceRegion... intersectingRegions)
Construct a new instance based on the generator and down selector passed in.
|
IntersectionWithSurfaceRegionsCoverageGrid(TerrainProvider terrainProvider,
CentralBodyCoverageGrid gridPointProvider,
EllipsoidSurfaceRegion... intersectingRegions)
Construct a new instance based on the generator and down selector passed in.
|
Modifier and Type | Method and Description |
---|---|
List<CoverageGridPoint> |
generateGridPoints()
Calls
GeometricPrimitiveCoverageGrid.generateGridPoints() on the GridPointProvider (get ),
and then selects a subset of the points using the EllipsoidSurfaceRegion.isPointInsideRegion(agi.foundation.coordinates.Cartographic) method. |
CentralBodyCoverageGrid |
getGridPointProvider()
Gets the
CentralBodyCoverageGrid that is used to generate the set of
GridPoints that this grid will be a
subset of. |
List<EllipsoidSurfaceRegion> |
getSurfaceRegions()
Gets a read-only collection of
EllipsoidSurfaceRegions that are used to constrain
the set of points generated by GridPointProvider (get ) to create the subset that will be this grid's points. |
getCentralBody, getGridCellBoundaries, getGridCellBoundary, getHeightRelativeToSurface, getReferenceFrame, getReferenceTerrain, setCentralBody, setReferenceTerrain
public IntersectionWithSurfaceRegionsCoverageGrid(@Nonnull CentralBodyCoverageGrid gridPointProvider, EllipsoidSurfaceRegion... intersectingRegions)
The resolution is set to the resolution of the generator. The fixed frame is set to be
the fixed frame of the generator. The gridPointProvider's ReferenceTerrain is not passed
along to the new instance. The CentralBody
(get
/ set
) used is from the generator.
gridPointProvider
- The CentralBodyCoverageGrid
used to generate the
points, normally the less restrictive of the two.intersectingRegions
- The set of regions to use to select grid points from
gridPointProvider
.ArgumentNullException
- Thrown if gridPointProvider
is null
,
or if null
is passed in as an intersectingRegion.IllegalStateException
- Thrown if there is a conflict between the
CentralBody
(get
/ set
) shape and the shape used in the CentralBodyCoverageGrid
and one of the EllipsoidSurfaceRegion
objects.public IntersectionWithSurfaceRegionsCoverageGrid(@Nonnull TerrainProvider terrainProvider, @Nonnull CentralBodyCoverageGrid gridPointProvider, EllipsoidSurfaceRegion... intersectingRegions)
Resolution is set to the resolution of the generator. FixedFrame is set to be the FixedFrame of the generator. If terrainProvider is a different ReferenceTerrain than the one found in gridPointProvider the instance will adopt the new terrainProvider without modifying gridPointProvider. The reference frame when using this constructor is set to the terrain provider's fixed frame.
terrainProvider
- The TerrainProvider
used to generate the height of the grid points.gridPointProvider
- The CentralBodyCoverageGrid
used to generate the points, normally the less restrictive of the two.intersectingRegions
- The set of regions to use to select grid points from gridPointProvider
.ArgumentNullException
- Thrown if terrainProvider
or gridPointProvider
is null,
or if null is passed in as an intersecting region.IllegalStateException
- Thrown if there is a conflict between the ReferenceSurface of
the given gridPointProvider
and one of the intersectingRegions
.public final CentralBodyCoverageGrid getGridPointProvider()
CentralBodyCoverageGrid
that is used to generate the set of
GridPoints
that this grid will be a
subset of.@Nonnull public final List<EllipsoidSurfaceRegion> getSurfaceRegions()
EllipsoidSurfaceRegions
that are used to constrain
the set of points generated by GridPointProvider
(get
) to create the subset that will be this grid's points.
If a point is inside any of the surface regions, it is included in this grid.
However, if one of the surface regions is small enough, the GridPointProvider
(get
) may not have any grid points inside that region.public List<CoverageGridPoint> generateGridPoints()
GeometricPrimitiveCoverageGrid.generateGridPoints()
on the GridPointProvider
(get
),
and then selects a subset of the points using the EllipsoidSurfaceRegion.isPointInsideRegion(agi.foundation.coordinates.Cartographic)
method.
If ReferenceTerrain
(get
/ set
) is configured, the heights of the grid points are determined by that TerrainProvider
.
Note that the type of Point
used for the location in the returned GridPoints
are PointCartographic
.
generateGridPoints
in interface ICoverageGrid
generateGridPoints
in class CentralBodyCoverageGrid
IllegalStateException
- Thrown if ReferenceTerrain
(get
/ set
) is configured and
its shape doesn't match CentralBody
(get
/ set
) shape. Thrown if the points do not have overlapping availability.PropertyInvalidException
- Thrown if ReferenceFrame
(get
) or CentralBody
(get
/ set
) is null
.