Package org.apache.lucene.spatial3d.geom
Class GeoStandardPath.PathSegment
java.lang.Object
org.apache.lucene.spatial3d.geom.GeoStandardPath.PathSegment
- Enclosing class:
- GeoStandardPath
This is the pre-calculated data for a path segment.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal GeoPoint
End point of the segmentfinal SidedPlane
Plane going through the center and end point, marking the end edge of the segmentfinal Map<DistanceStyle,
Double> Place to keep any complete segment distances we've calculated so farfinal GeoPoint
Lower left hand corner of segmentfinal SidedPlane
Cutoff plane parallel to connecting plane representing the other side of the path segmentfinal GeoPoint[]
Notable points for the lower connecting planefinal GeoPoint
Lower right hand corner of segmentfinal Plane
Normalized plane connecting the two points and going through world centerfinal GeoPoint
Starting point of the segmentfinal SidedPlane
Plane going through the center and start point, marking the start edge of the segmentfinal GeoPoint
Upper left hand corner of segmentfinal SidedPlane
Cutoff plane parallel to connecting plane representing one side of the path segmentfinal GeoPoint[]
Notable points for the upper connecting planefinal GeoPoint
Upper right hand corner of segment -
Constructor Summary
ConstructorsConstructorDescriptionPathSegment
(PlanetModel planetModel, GeoPoint start, GeoPoint end, Plane normalizedConnectingPlane, double planeBoundingOffset) Construct a path segment. -
Method Summary
Modifier and TypeMethodDescriptiondouble
fullPathDistance
(DistanceStyle distanceStyle) Compute the full distance along this path segment.void
getBounds
(PlanetModel planetModel, Bounds bounds) Get the bounds for a segment endpoint.boolean
intersects
(GeoShape geoShape) Determine if this endpoint intersects a specified 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 segment.double
nearestPathDistance
(PlanetModel planetModel, DistanceStyle distanceStyle, double x, double y, double z) Compute nearest path distance.double
outsideDistance
(PlanetModel planetModel, DistanceStyle distanceStyle, double x, double y, double z) Compute external distance.double
pathCenterDistance
(PlanetModel planetModel, DistanceStyle distanceStyle, double x, double y, double z) Compute path center distance.double
pathDeltaDistance
(PlanetModel planetModel, DistanceStyle distanceStyle, double x, double y, double z) Compute delta path distance.double
pathDistance
(PlanetModel planetModel, DistanceStyle distanceStyle, double x, double y, double z) Compute interior path distance.
-
Field Details
-
start
Starting point of the segment -
end
End point of the segment -
fullDistanceCache
Place to keep any complete segment distances we've calculated so far -
normalizedConnectingPlane
Normalized plane connecting the two points and going through world center -
upperConnectingPlane
Cutoff plane parallel to connecting plane representing one side of the path segment -
lowerConnectingPlane
Cutoff plane parallel to connecting plane representing the other side of the path segment -
startCutoffPlane
Plane going through the center and start point, marking the start edge of the segment -
endCutoffPlane
Plane going through the center and end point, marking the end edge of the segment -
URHC
Upper right hand corner of segment -
LRHC
Lower right hand corner of segment -
ULHC
Upper left hand corner of segment -
LLHC
Lower left hand corner of segment -
upperConnectingPlanePoints
Notable points for the upper connecting plane -
lowerConnectingPlanePoints
Notable points for the lower connecting plane
-
-
Constructor Details
-
PathSegment
public PathSegment(PlanetModel planetModel, GeoPoint start, GeoPoint end, Plane normalizedConnectingPlane, double planeBoundingOffset) Construct a path segment.- Parameters:
planetModel
- is the planet model.start
- is the starting point.end
- is the ending point.normalizedConnectingPlane
- is the connecting plane.planeBoundingOffset
- is the linear offset from the connecting plane to either side.
-
-
Method Details
-
fullPathDistance
Compute the full distance along this path segment.- Parameters:
distanceStyle
- is the distance style.- Returns:
- the distance metric, in aggregation form.
-
isWithin
public boolean isWithin(double x, double y, double z) Check if point is within this segment.- Parameters:
x
- is the point x.y
- is the point y.z
- is the point z.- Returns:
- true of within.
-
pathCenterDistance
public double pathCenterDistance(PlanetModel planetModel, DistanceStyle distanceStyle, double x, double y, double z) Compute path center distance.- Parameters:
planetModel
- is the planet model.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 Double.POSITIVE_INFINITY if outside this segment
-
nearestPathDistance
public double nearestPathDistance(PlanetModel planetModel, DistanceStyle distanceStyle, double x, double y, double z) Compute nearest path distance.- Parameters:
planetModel
- is the planet model.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, or Double.POSITIVE_INFINITY if outside this segment
-
pathDeltaDistance
public double pathDeltaDistance(PlanetModel planetModel, DistanceStyle distanceStyle, double x, double y, double z) Compute delta path distance.- Parameters:
planetModel
- is the planet model.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, or Double.POSITIVE_INFINITY if outside the segment.
-
pathDistance
public double pathDistance(PlanetModel planetModel, DistanceStyle distanceStyle, double x, double y, double z) Compute interior path distance.- Parameters:
planetModel
- is the planet model.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.
-
outsideDistance
public double outsideDistance(PlanetModel planetModel, DistanceStyle distanceStyle, double x, double y, double z) Compute external distance.- Parameters:
planetModel
- is the planet model.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 specified GeoShape.- Parameters:
geoShape
- is the GeoShape.- Returns:
- true if there GeoShape intersects this endpoint.
-
getBounds
Get the bounds for a segment endpoint.- Parameters:
planetModel
- is the planet model.bounds
- are the bounds to be modified.
-