public class EllipsoidSurfaceRegion extends Object implements IEquatable<EllipsoidSurfaceRegion>, IGetEllipsoidSurfaceRegion, IGetEllipsoidSurfaceRegionHole
Ellipsoid
bounded by a closed surface curve.
Various techniques exist to create ellipsoid surface regions.
See ConvexBoundaryEllipsoidSurfaceRegionBuilder
, SpecifiedNodesEllipsoidSurfaceRegionBuilder
,
SpecifiedExtentEllipsoidSurfaceRegionBuilder
, and SpecifiedCurveEllipsoidSurfaceRegionBuilder
.
Modifier and Type | Method and Description |
---|---|
ArrayList<EllipsoidSurfaceRegion> |
add(EllipsoidSurfaceRegion otherRegion)
Adds this region to
otherRegion ignoring any holes in either region. |
double |
checkPointInsideRegion(Cartographic point)
Checks to see if the given planetodetic point lies inside the boundary and returns a heuristic measure
of how close the point is to the boundary (including distance to any hole boundary).
|
double |
checkPointInsideRegionIgnoringHoles(Cartographic point)
Checks to see if the given planetodetic point lies inside the boundary, ignoring holes, and returns a heuristic measure
of how close the point is to the boundary.
|
ArrayList<EllipsoidSurfaceRegion> |
complement()
Complements this region, returning the complement and any holes as regions.
|
CartographicExtent |
computeCartographicExtent()
Computes the cartographic bounding box which completely contains the surface region.
|
boolean |
equals(Object obj)
Indicates whether another object is exactly equal to this instance.
|
boolean |
equalsType(EllipsoidSurfaceRegion other)
Indicates whether the current object is equal to another object of the same type.
|
EllipsoidSurfaceCurve |
getBoundaryCurve()
Gets the closed curve defining the boundary of the surface region.
|
Cartographic |
getCentroid()
Gets the point which represents a single planetodetic location for the overall area of the region.
|
EllipsoidSurfaceRegion |
getEllipsoidSurfaceRegion()
Gets the
EllipsoidSurfaceRegion . |
EllipsoidSurfaceRegionHole |
getEllipsoidSurfaceRegionHole()
Gets the
EllipsoidSurfaceRegionHole . |
List<EllipsoidSurfaceRegionHole> |
getHoles()
Gets a read only collection of surface regions that denote topological cuts (holes) of this region.
|
Ellipsoid |
getReferenceSurface()
Gets the reference surface on which the region is represented by a closed boundary curve.
|
int |
hashCode()
Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.
|
ArrayList<EllipsoidSurfaceRegion> |
intersect(EllipsoidSurfaceRegion otherRegion)
Intersects this region with
otherRegion . |
boolean |
isPointInsideRegion(Cartographic point)
Determines whether the given planetodetic point lies inside the region.
|
boolean |
isPointInsideRegionEpsilon(Cartographic point,
double epsilon)
Determines whether the given planetodetic point lies inside the region.
|
boolean |
isPointInsideRegionIgnoringHoles(Cartographic point)
Determines whether the given planetodetic point lies inside the region, ignoring any holes.
|
boolean |
isPointInsideRegionIgnoringHolesEpsilon(Cartographic point,
double epsilon)
Determines whether the given planetodetic point lies inside the region, ignoring any holes.
|
static ArrayList<EllipsoidSurfaceRegion> |
reduce(List<EllipsoidSurfaceRegion> regionsToReduce)
Takes a set of input surface regions and reduces them down to the minimum set of regions covering the same surface locations.
|
static int |
rotationDirection(EllipsoidSurfaceRegion region)
Computes the rotation sense of the region.
|
ArrayList<EllipsoidSurfaceRegion> |
subtract(EllipsoidSurfaceRegion otherRegion)
Subtracts
otherRegion from this region. |
@Nonnull public final List<EllipsoidSurfaceRegionHole> getHoles()
@Nonnull public Cartographic getCentroid()
@Nonnull public final Ellipsoid getReferenceSurface()
@Nonnull public final EllipsoidSurfaceCurve getBoundaryCurve()
public final boolean isPointInsideRegionIgnoringHolesEpsilon(@Nonnull Cartographic point, double epsilon)
Height above the surface is ignored. The distance from the boundary is approximate.
point
- The planetodetic point to test.epsilon
- The distance from the boundary that is still considered within the region.true
if the point lies inside the boundary; otherwise false
.public final boolean isPointInsideRegionIgnoringHoles(@Nonnull Cartographic point)
Height above the surface is ignored. The results may not be as expected when exactly on a boundary.
point
- The planetodetic point to test.true
if the point lies inside the boundary; otherwise false
.public final boolean isPointInsideRegionEpsilon(@Nonnull Cartographic point, double epsilon)
Height above the surface is ignored. The distance from the boundary is approximate.
point
- The planetodetic point to test.epsilon
- The distance from the boundary that is still considered within the region.true
if the point lies inside the boundary; otherwise false
.public final boolean isPointInsideRegion(@Nonnull Cartographic point)
Height above the surface is ignored. The results may not be as expected when exactly on a boundary.
point
- The planetodetic point to test.true
if the point lies inside the boundary; otherwise false
.public final double checkPointInsideRegionIgnoringHoles(@Nonnull Cartographic point)
point
- The planetodetic point to check.Centroid
(get
). This can be used as a heuristic measure of how close the point is to the boundary.public final double checkPointInsideRegion(@Nonnull Cartographic point)
point
- The planetodetic point to check.Centroid
(get
). This can be used as a heuristic measure of how close the point is to the boundary.@Nonnull public final CartographicExtent computeCartographicExtent()
public final EllipsoidSurfaceRegion getEllipsoidSurfaceRegion()
EllipsoidSurfaceRegion
.getEllipsoidSurfaceRegion
in interface IGetEllipsoidSurfaceRegion
EllipsoidSurfaceRegion
.public final EllipsoidSurfaceRegionHole getEllipsoidSurfaceRegionHole()
EllipsoidSurfaceRegionHole
.
Creates an EllipsoidSurfaceRegionHole
based on this surface region. Any holes in this region will be ignored.
getEllipsoidSurfaceRegionHole
in interface IGetEllipsoidSurfaceRegionHole
EllipsoidSurfaceRegionHole
.@Nonnull public static ArrayList<EllipsoidSurfaceRegion> reduce(@Nonnull List<EllipsoidSurfaceRegion> regionsToReduce)
regionsToReduce
- The list of regions to operate on.@Nonnull public final ArrayList<EllipsoidSurfaceRegion> subtract(@Nullable EllipsoidSurfaceRegion otherRegion)
otherRegion
from this region.otherRegion
- The region to subtract from this region.null
.@Nonnull public final ArrayList<EllipsoidSurfaceRegion> add(@Nullable EllipsoidSurfaceRegion otherRegion)
otherRegion
ignoring any holes in either region.otherRegion
- The region to add to this region.null
.
Returns this region if this region and otherRegion
are disjoint.@Nonnull public final ArrayList<EllipsoidSurfaceRegion> intersect(@Nullable EllipsoidSurfaceRegion otherRegion)
otherRegion
.otherRegion
- The region to intersect with this region.null
.@Nonnull public final ArrayList<EllipsoidSurfaceRegion> complement()
public static int rotationDirection(@Nonnull EllipsoidSurfaceRegion region)
region
- The input region.public boolean equals(Object obj)
equals
in class Object
obj
- The object to compare to this instance.true
if obj
is an instance of this type and represents the same value as this instance; otherwise false
.Object.hashCode()
,
HashMap
public final boolean equalsType(EllipsoidSurfaceRegion other)
IEquatable
equalsType
in interface IEquatable<EllipsoidSurfaceRegion>
other
- An object to compare with this object.public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)