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 java.lang.Object implements GeoStandardPath.SegmentEndpoint
Base implementation of SegmentEndpoint
-
-
Field Summary
Fields Modifier and Type Field Description protected static Membership[]
NO_MEMBERSHIP
Null membershipprotected GeoPoint
point
The center point of the endpoint
-
Constructor Summary
Constructors Constructor Description BaseSegmentEndpoint(GeoPoint point)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
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
isWithin(Vector point)
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.java.lang.String
toString()
-
-
-
Field Detail
-
point
protected final GeoPoint point
The center point of the endpoint
-
NO_MEMBERSHIP
protected static final Membership[] NO_MEMBERSHIP
Null membership
-
-
Constructor Detail
-
BaseSegmentEndpoint
public BaseSegmentEndpoint(GeoPoint point)
-
-
Method Detail
-
isWithin
public boolean isWithin(Vector point)
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
public double pathDeltaDistance(DistanceStyle distanceStyle, double x, double y, double z)
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
public double pathDistance(DistanceStyle distanceStyle, double x, double y, double z)
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
public double nearestPathDistance(DistanceStyle distanceStyle, double x, double y, double z)
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
public double pathCenterDistance(DistanceStyle distanceStyle, double x, double y, double z)
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
public double outsideDistance(DistanceStyle distanceStyle, double x, double y, double z)
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
public boolean intersects(GeoShape geoShape)
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
public void getBounds(PlanetModel planetModel, Bounds bounds)
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
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-