public class GeoPath extends GeoBaseDistanceShape
Modifier and Type | Class and Description |
---|---|
static class |
GeoPath.PathSegment
This is the pre-calculated data for a path segment.
|
static class |
GeoPath.SegmentEndpoint
This is precalculated data for segment endpoint.
|
Modifier and Type | Field and Description |
---|---|
protected double |
cosAngle
Cosine of cutoff angle
|
protected double |
cutoffAngle
The cutoff angle (width)
|
protected GeoPoint[] |
edgePoints
A point on the edge
|
protected List<GeoPath.SegmentEndpoint> |
endPoints
A list of SegmentEndpoints
|
protected boolean |
isDone
Set to true if path has been completely constructed
|
protected List<GeoPoint> |
points
The original list of path points
|
protected List<GeoPath.PathSegment> |
segments
A list of PathSegments
|
protected double |
sinAngle
Sine of cutoff angle
|
planetModel
Constructor and Description |
---|
GeoPath(PlanetModel planetModel,
double maxCutoffAngle)
Piece-wise constructor.
|
GeoPath(PlanetModel planetModel,
double maxCutoffAngle,
GeoPoint[] pathPoints)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(double lat,
double lon)
Add a point to the path.
|
protected double |
distance(DistanceStyle distanceStyle,
double x,
double y,
double z)
Called by a
computeDistance method if X/Y/Z is not within this shape. |
void |
done()
Complete the path.
|
boolean |
equals(Object o) |
void |
getBounds(Bounds bounds)
Compute bounds for the shape.
|
GeoPoint[] |
getEdgePoints()
Return a sample point that is on the outside edge/boundary of the shape.
|
int |
hashCode() |
boolean |
intersects(Plane plane,
GeoPoint[] notablePoints,
Membership... bounds)
Assess whether a plane, within the provided bounds, intersects
with the shape.
|
boolean |
isWithin(double x,
double y,
double z)
Check if a point is within this shape.
|
protected double |
outsideDistance(DistanceStyle distanceStyle,
double x,
double y,
double z)
Called by a
computeOutsideDistance method if X/Y/Z is not within this shape. |
String |
toString() |
computeDistance, computeDistance, isWithin
computeOutsideDistance, computeOutsideDistance
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
computeOutsideDistance, computeOutsideDistance
protected final double cutoffAngle
protected final double sinAngle
protected final double cosAngle
protected List<GeoPath.SegmentEndpoint> endPoints
protected List<GeoPath.PathSegment> segments
protected GeoPoint[] edgePoints
protected boolean isDone
public GeoPath(PlanetModel planetModel, double maxCutoffAngle, GeoPoint[] pathPoints)
planetModel
- is the planet model.maxCutoffAngle
- is the width of the path, measured as an angle.pathPoints
- are the points in the path.public GeoPath(PlanetModel planetModel, double maxCutoffAngle)
planetModel
- is the planet model.maxCutoffAngle
- is the width of the path, measured as an angle.public void addPoint(double lat, double lon)
lat
- is the latitude of the point.lon
- is the longitude of the point.public void done()
protected double distance(DistanceStyle distanceStyle, double x, double y, double z)
GeoBaseDistanceShape
computeDistance
method if X/Y/Z is not within this shape.distance
in class GeoBaseDistanceShape
protected double outsideDistance(DistanceStyle distanceStyle, double x, double y, double z)
GeoBaseMembershipShape
computeOutsideDistance
method if X/Y/Z is not within this shape.outsideDistance
in class GeoBaseMembershipShape
public boolean isWithin(double x, double y, double z)
Membership
x
- is x coordinate of point to check.y
- is y coordinate of point to check.z
- is z coordinate of point to check.public GeoPoint[] getEdgePoints()
GeoShape
public boolean intersects(Plane plane, GeoPoint[] notablePoints, Membership... bounds)
GeoShape
plane
- is the plane to assess for intersection with the shape's edges or
bounding curves.notablePoints
- represents the intersections of the plane with the supplied
bounds. These are used to disambiguate when two planes are identical and it needs
to be determined whether any points exist that fulfill all the bounds.bounds
- are a set of bounds that define an area that an
intersection must be within in order to qualify (provided by a GeoArea).public void getBounds(Bounds bounds)
GeoShape
getBounds
in interface GeoShape
getBounds
in class GeoBaseShape
bounds
- is the input bounds object.
The input object will be modified.public boolean equals(Object o)
equals
in class BasePlanetObject
public int hashCode()
hashCode
in class BasePlanetObject
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.