Package org.apache.lucene.spatial3d.geom
Class GeoDegeneratePath.SegmentEndpoint
java.lang.Object
org.apache.lucene.spatial3d.geom.GeoDegeneratePath.SegmentEndpoint
- Enclosing class:
- GeoDegeneratePath
This is precalculated data for segment endpoint. Since the path is degenerate, there are
several different cases:
- The path consists of a single endpoint. In this case, the degenerate path consists of this one point.
- This is the end of a path. There is a bounding plane passed in which describes the part of the world that is considered to belong to this endpoint.
- Intersection. There are two cutoff planes, one for each end of the intersection.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Membership[]
Pertinent cutoff planes from adjoining segmentsstatic final Membership[]
Null membershipfinal GeoPoint
The center point of the endpoint -
Constructor Summary
ConstructorsConstructorDescriptionSegmentEndpoint
(GeoPoint point) Constructor for case (1).SegmentEndpoint
(GeoPoint point, SidedPlane cutoffPlane) Constructor for case (2).SegmentEndpoint
(GeoPoint point, SidedPlane cutoffPlane1, SidedPlane cutoffPlane2) Constructor for case (3). -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
getBounds
(PlanetModel planetModel, Bounds bounds) Get the bounds for a segment endpoint.int
hashCode()
boolean
intersects
(GeoShape geoShape) Determine if this endpoint intersects a GeoShape.boolean
intersects
(PlanetModel planetModel, Plane p, GeoPoint[] notablePoints, Membership[] bounds) Determine if this endpoint intersects a specified plane.boolean
isWithin
(double x, double y, double z) Check if point is within this endpoint.double
outsideDistance
(DistanceStyle distanceStyle, double x, double y, double z) Compute external distance.double
pathCenterDistance
(DistanceStyle distanceStyle, double x, double y, double z) Compute path center distance.double
pathDistance
(DistanceStyle distanceStyle, double x, double y, double z) Compute interior path distance.toString()
-
Field Details
-
point
The center point of the endpoint -
cutoffPlanes
Pertinent cutoff planes from adjoining segments -
NO_MEMBERSHIP
Null membership
-
-
Constructor Details
-
SegmentEndpoint
Constructor for case (1).- Parameters:
point
- is the center point.
-
SegmentEndpoint
Constructor for case (2). Generate an endpoint, given a single cutoff plane plus upper and lower edge points.- Parameters:
point
- is the center point.cutoffPlane
- is the plane from the adjoining path segment marking the boundary between this endpoint and that segment.
-
SegmentEndpoint
Constructor for case (3). Generate an endpoint, given two cutoff planes.- Parameters:
point
- is the center.cutoffPlane1
- is one adjoining path segment cutoff plane.cutoffPlane2
- is another adjoining path segment cutoff plane.
-
-
Method Details
-
isWithin
public boolean isWithin(double x, double y, double z) Check if point is within this endpoint.- Parameters:
x
- is the point x.y
- is the point y.z
- is the point z.- Returns:
- true of within.
-
pathDistance
Compute interior path distance.- Parameters:
distanceStyle
- is the distance style.x
- is the point x.y
- is the point y.z
- is the point z.- Returns:
- the distance metric, in aggregation form.
-
pathCenterDistance
Compute path center distance.- Parameters:
distanceStyle
- is the distance style.x
- is the point x.y
- is the point y.z
- is the point z.- Returns:
- the distance metric, or POSITIVE_INFINITY if the point is not within the bounds of the endpoint.
-
outsideDistance
Compute external distance.- Parameters:
distanceStyle
- is the distance style.x
- is the point x.y
- is the point y.z
- is the point z.- Returns:
- the distance metric.
-
intersects
public boolean intersects(PlanetModel planetModel, Plane p, GeoPoint[] notablePoints, Membership[] bounds) Determine if this endpoint intersects a specified plane.- Parameters:
planetModel
- is the planet model.p
- is the plane.notablePoints
- are the points associated with the plane.bounds
- are any bounds which the intersection must lie within.- Returns:
- true if there is a matching intersection.
-
intersects
Determine if this endpoint intersects a GeoShape.- Parameters:
geoShape
- is the GeoShape.- Returns:
- true if there is shape intersect this endpoint.
-
getBounds
Get the bounds for a segment endpoint.- Parameters:
planetModel
- is the planet model.bounds
- are the bounds to be modified.
-
equals
-
hashCode
public int hashCode() -
toString
-