Package org.apache.lucene.spatial3d.geom
Class GeoStandardPath.CutoffSingleCircleSegmentEndpoint
- java.lang.Object
-
- org.apache.lucene.spatial3d.geom.GeoStandardPath.BaseSegmentEndpoint
-
- org.apache.lucene.spatial3d.geom.GeoStandardPath.CircleSegmentEndpoint
-
- org.apache.lucene.spatial3d.geom.GeoStandardPath.CutoffSingleCircleSegmentEndpoint
-
- All Implemented Interfaces:
GeoStandardPath.SegmentEndpoint
- Enclosing class:
- GeoStandardPath
private static class GeoStandardPath.CutoffSingleCircleSegmentEndpoint extends GeoStandardPath.CircleSegmentEndpoint
Endpoint that's a single circle with cutoff(s).
-
-
Field Summary
Fields Modifier and Type Field Description protected Membership[]
cutoffPlanes
Pertinent cutoff plane from adjoining segmentsprivate GeoPoint[]
notablePoints
Notable points for this segment endpoint-
Fields inherited from class org.apache.lucene.spatial3d.geom.GeoStandardPath.CircleSegmentEndpoint
circlePlane, circlePoints
-
Fields inherited from class org.apache.lucene.spatial3d.geom.GeoStandardPath.BaseSegmentEndpoint
NO_MEMBERSHIP, point
-
-
Constructor Summary
Constructors Constructor Description CutoffSingleCircleSegmentEndpoint(GeoPoint point, SidedPlane cutoffPlane, GeoPoint topEdgePoint, GeoPoint bottomEdgePoint)
Constructor for case (2).CutoffSingleCircleSegmentEndpoint(GeoPoint point, SidedPlane cutoffPlane1, SidedPlane cutoffPlane2, GeoPoint topEdgePoint, GeoPoint bottomEdgePoint)
Constructor for case (2.5).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
pathCenterDistance(DistanceStyle distanceStyle, double x, double y, double z)
Compute path center distance.-
Methods inherited from class org.apache.lucene.spatial3d.geom.GeoStandardPath.CircleSegmentEndpoint
getBounds
-
Methods inherited from class org.apache.lucene.spatial3d.geom.GeoStandardPath.BaseSegmentEndpoint
equals, hashCode, outsideDistance, pathDeltaDistance, pathDistance, toString
-
-
-
-
Field Detail
-
cutoffPlanes
protected final Membership[] cutoffPlanes
Pertinent cutoff plane from adjoining segments
-
notablePoints
private final GeoPoint[] notablePoints
Notable points for this segment endpoint
-
-
Constructor Detail
-
CutoffSingleCircleSegmentEndpoint
public CutoffSingleCircleSegmentEndpoint(GeoPoint point, SidedPlane cutoffPlane, GeoPoint topEdgePoint, GeoPoint bottomEdgePoint)
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.topEdgePoint
- is a point on the cutoffPlane that should be also on the circle plane.bottomEdgePoint
- is another point on the cutoffPlane that should be also on the circle plane.
-
CutoffSingleCircleSegmentEndpoint
public CutoffSingleCircleSegmentEndpoint(GeoPoint point, SidedPlane cutoffPlane1, SidedPlane cutoffPlane2, GeoPoint topEdgePoint, GeoPoint bottomEdgePoint)
Constructor for case (2.5). Generate an endpoint, given two cutoff planes plus upper and lower edge points.- Parameters:
point
- is the center.cutoffPlane1
- is one adjoining path segment cutoff plane.cutoffPlane2
- is another adjoining path segment cutoff plane.topEdgePoint
- is a point on the cutoffPlane that should be also on the circle plane.bottomEdgePoint
- is another point on the cutoffPlane that should be also on the circle plane.
-
-
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
- Overrides:
isWithin
in classGeoStandardPath.CircleSegmentEndpoint
- 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
- Overrides:
isWithin
in classGeoStandardPath.CircleSegmentEndpoint
- Parameters:
x
- is the point x.y
- is the point y.z
- is the point z.- Returns:
- true of within.
-
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
- Overrides:
nearestPathDistance
in classGeoStandardPath.BaseSegmentEndpoint
- 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
- Overrides:
pathCenterDistance
in classGeoStandardPath.BaseSegmentEndpoint
- 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.
-
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
- Overrides:
intersects
in classGeoStandardPath.CircleSegmentEndpoint
- 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
- Overrides:
intersects
in classGeoStandardPath.CircleSegmentEndpoint
- Parameters:
geoShape
- is the GeoShape.- Returns:
- true if there is shape intersect this endpoint.
-
-