Package org.apache.lucene.spatial3d.geom
Class GeoStandardPath.CircleSegmentEndpoint
- java.lang.Object
-
- org.apache.lucene.spatial3d.geom.GeoStandardPath.BaseSegmentEndpoint
-
- org.apache.lucene.spatial3d.geom.GeoStandardPath.CircleSegmentEndpoint
-
- All Implemented Interfaces:
GeoStandardPath.SegmentEndpoint
- Direct Known Subclasses:
GeoStandardPath.CutoffSingleCircleSegmentEndpoint
- Enclosing class:
- GeoStandardPath
private static class GeoStandardPath.CircleSegmentEndpoint extends GeoStandardPath.BaseSegmentEndpoint
Endpoint that's a simple circle.
-
-
Field Summary
Fields Modifier and Type Field Description protected SidedPlane
circlePlane
A plane describing the circleprotected static GeoPoint[]
circlePoints
No notable points from the circle itself-
Fields inherited from class org.apache.lucene.spatial3d.geom.GeoStandardPath.BaseSegmentEndpoint
NO_MEMBERSHIP, point
-
-
Constructor Summary
Constructors Modifier Constructor Description CircleSegmentEndpoint(GeoPoint point, Plane normalPlane, GeoPoint upperPoint, GeoPoint lowerPoint)
Constructor for case (1).protected
CircleSegmentEndpoint(GeoPoint point, SidedPlane circlePlane)
Constructor for case (3).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
getBounds(PlanetModel planetModel, Bounds bounds)
Get the bounds for a segment endpoint.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.-
Methods inherited from class org.apache.lucene.spatial3d.geom.GeoStandardPath.BaseSegmentEndpoint
equals, hashCode, nearestPathDistance, outsideDistance, pathCenterDistance, pathDeltaDistance, pathDistance, toString
-
-
-
-
Field Detail
-
circlePlane
protected final SidedPlane circlePlane
A plane describing the circle
-
circlePoints
protected static final GeoPoint[] circlePoints
No notable points from the circle itself
-
-
Constructor Detail
-
CircleSegmentEndpoint
public CircleSegmentEndpoint(GeoPoint point, Plane normalPlane, GeoPoint upperPoint, GeoPoint lowerPoint)
Constructor for case (1). Generate a simple circle cutoff plane.- Parameters:
point
- is the center point.upperPoint
- is a point that must be on the circle plane.lowerPoint
- is another point that must be on the circle plane.
-
CircleSegmentEndpoint
protected CircleSegmentEndpoint(GeoPoint point, SidedPlane circlePlane)
Constructor for case (3). Called by superclass only.- Parameters:
point
- is the center point.circlePlane
- is 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.BaseSegmentEndpoint
- 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.BaseSegmentEndpoint
- Parameters:
x
- is the point x.y
- is the point y.z
- is the point z.- Returns:
- true of within.
-
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.BaseSegmentEndpoint
- 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.BaseSegmentEndpoint
- 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
- Overrides:
getBounds
in classGeoStandardPath.BaseSegmentEndpoint
- Parameters:
planetModel
- is the planet model.bounds
- are the bounds to be modified.
-
-