Package org.apache.lucene.spatial3d.geom
Class GeoStandardPath.BaseSegmentEndpoint
java.lang.Object
org.apache.lucene.spatial3d.geom.GeoStandardPath.BaseSegmentEndpoint
- All Implemented Interfaces:
GeoStandardPath.SegmentEndpoint
- Direct Known Subclasses:
GeoStandardPath.CircleSegmentEndpoint
,GeoStandardPath.CutoffDualCircleSegmentEndpoint
- Enclosing class:
- GeoStandardPath
private static class GeoStandardPath.BaseSegmentEndpoint
extends Object
implements GeoStandardPath.SegmentEndpoint
Base implementation of SegmentEndpoint
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Membership[]
Null membershipprotected final GeoPoint
The center point of the endpoint -
Constructor Summary
Constructors -
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.boolean
Check if point is within this endpoint.double
nearestPathDistance
(DistanceStyle distanceStyle, double x, double y, double z) Compute nearest path distance.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
pathDeltaDistance
(DistanceStyle distanceStyle, double x, double y, double z) Compute delta path 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 -
NO_MEMBERSHIP
Null membership
-
-
Constructor Details
-
BaseSegmentEndpoint
-
-
Method Details
-
isWithin
Description copied from interface:GeoStandardPath.SegmentEndpoint
Check if point is within this endpoint.- Specified by:
isWithin
in interfaceGeoStandardPath.SegmentEndpoint
- Parameters:
point
- is the point.- Returns:
- true of within.
-
isWithin
public boolean isWithin(double x, double y, double z) Description copied from interface:GeoStandardPath.SegmentEndpoint
Check if point is within this endpoint.- Specified by:
isWithin
in interfaceGeoStandardPath.SegmentEndpoint
- Parameters:
x
- is the point x.y
- is the point y.z
- is the point z.- Returns:
- true of within.
-
pathDeltaDistance
Description copied from interface:GeoStandardPath.SegmentEndpoint
Compute delta path distance.- Specified by:
pathDeltaDistance
in interfaceGeoStandardPath.SegmentEndpoint
- 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.
-
pathDistance
Description copied from interface:GeoStandardPath.SegmentEndpoint
Compute interior path distance.- Specified by:
pathDistance
in interfaceGeoStandardPath.SegmentEndpoint
- 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.
-
nearestPathDistance
Description copied from interface:GeoStandardPath.SegmentEndpoint
Compute nearest path distance.- Specified by:
nearestPathDistance
in interfaceGeoStandardPath.SegmentEndpoint
- 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 (always value zero), in aggregation form, or POSITIVE_INFINITY if the point is not within the bounds of the endpoint.
-
pathCenterDistance
Description copied from interface:GeoStandardPath.SegmentEndpoint
Compute path center distance.- Specified by:
pathCenterDistance
in interfaceGeoStandardPath.SegmentEndpoint
- 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
Description copied from interface:GeoStandardPath.SegmentEndpoint
Compute external distance.- Specified by:
outsideDistance
in interfaceGeoStandardPath.SegmentEndpoint
- 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) Description copied from interface:GeoStandardPath.SegmentEndpoint
Determine if this endpoint intersects a specified plane.- Specified by:
intersects
in interfaceGeoStandardPath.SegmentEndpoint
- 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
Description copied from interface:GeoStandardPath.SegmentEndpoint
Determine if this endpoint intersects a GeoShape.- Specified by:
intersects
in interfaceGeoStandardPath.SegmentEndpoint
- Parameters:
geoShape
- is the GeoShape.- Returns:
- true if there is shape intersect this endpoint.
-
getBounds
Description copied from interface:GeoStandardPath.SegmentEndpoint
Get the bounds for a segment endpoint.- Specified by:
getBounds
in interfaceGeoStandardPath.SegmentEndpoint
- Parameters:
planetModel
- is the planet model.bounds
- are the bounds to be modified.
-
equals
-
hashCode
public int hashCode() -
toString
-