Module org.apache.lucene.spatial3d
Package org.apache.lucene.spatial3d.geom
Class GeoStandardPath.CutoffDualCircleSegmentEndpoint
- java.lang.Object
-
- org.apache.lucene.spatial3d.geom.BasePlanetObject
-
- org.apache.lucene.spatial3d.geom.GeoBaseBounds
-
- org.apache.lucene.spatial3d.geom.GeoStandardPath.BaseSegmentEndpoint
-
- org.apache.lucene.spatial3d.geom.GeoStandardPath.CutoffDualCircleSegmentEndpoint
-
- All Implemented Interfaces:
Bounded
,GeoBounds
,GeoStandardPath.PathComponent
,GeoStandardPath.SegmentEndpoint
,Membership
,PlanetObject
,SerializableObject
- Enclosing class:
- GeoStandardPath
private static class GeoStandardPath.CutoffDualCircleSegmentEndpoint extends GeoStandardPath.BaseSegmentEndpoint
Endpoint that's a dual circle with cutoff(s). This SegmentEndpoint is used when we have two adjoining segments. (1) We construct two circles. Each circle uses the two segment endpoints for one of the two segments, plus the one segment endpoint that is on the other side of the segment's cutoff plane. (2) isWithin() is computed using both circles, using just the portion that is within both segments' cutoff planes. If either matches, the point is included. (3) intersects() is computed using both circles, with similar cutoffs. (4) bounds() uses both circles too.
-
-
Field Summary
Fields Modifier and Type Field Description protected SidedPlane
boundaryPlane1
protected SidedPlane
boundaryPlane2
protected SidedPlane
circlePlane1
First circleprotected SidedPlane
circlePlane2
Second circleprotected Membership[]
cutoffPlanes
Both cutoff planes are included hereprotected GeoPoint[]
notablePoints1
Notable points for first circleprotected GeoPoint[]
notablePoints2
Notable points for second circle-
Fields inherited from class org.apache.lucene.spatial3d.geom.GeoStandardPath.BaseSegmentEndpoint
NO_MEMBERSHIP, point, previous
-
Fields inherited from class org.apache.lucene.spatial3d.geom.BasePlanetObject
planetModel
-
-
Constructor Summary
Constructors Constructor Description CutoffDualCircleSegmentEndpoint(PlanetModel planetModel, GeoStandardPath.PathComponent previous, GeoPoint point, SidedPlane prevCutoffPlane, SidedPlane nextCutoffPlane, GeoPoint prevURHC, GeoPoint prevLRHC, GeoPoint currentULHC, GeoPoint currentLLHC)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
getBounds(Bounds bounds)
Compute bounds for the shape.boolean
intersects(GeoShape geoShape)
Determine if this endpoint intersects a GeoShape.boolean
intersects(Plane p, XYZBounds planeBounds, 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.boolean
isWithinSection(double x, double y, double z)
Check if point is within this section (within cutoff planes).boolean
isWithinSection(Vector point)
Check if point is within this section (within cutoff planes).double
nearestPathDistance(DistanceStyle distanceStyle, double x, double y, double z)
Compute nearest path distance (distance from start of segment to point adjacent the one specitied, if reachable by this segment).double
pathCenterDistance(DistanceStyle distanceStyle, double x, double y, double z)
Compute path center distance (distance from the point to center of the path, if reachable by this segment).java.lang.String
toString()
-
Methods inherited from class org.apache.lucene.spatial3d.geom.GeoStandardPath.BaseSegmentEndpoint
distance, equals, fullPathDistance, getStartingDistance, hashCode, nearestDistance, outsideDistance, pathDeltaDistance, pathDistance
-
Methods inherited from class org.apache.lucene.spatial3d.geom.BasePlanetObject
getPlanetModel, write
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.spatial3d.geom.PlanetObject
getPlanetModel
-
Methods inherited from interface org.apache.lucene.spatial3d.geom.SerializableObject
write
-
-
-
-
Field Detail
-
circlePlane1
protected final SidedPlane circlePlane1
First circle
-
circlePlane2
protected final SidedPlane circlePlane2
Second circle
-
notablePoints1
protected final GeoPoint[] notablePoints1
Notable points for first circle
-
notablePoints2
protected final GeoPoint[] notablePoints2
Notable points for second circle
-
cutoffPlanes
protected final Membership[] cutoffPlanes
Both cutoff planes are included here
-
boundaryPlane1
protected final SidedPlane boundaryPlane1
-
boundaryPlane2
protected final SidedPlane boundaryPlane2
-
-
Constructor Detail
-
CutoffDualCircleSegmentEndpoint
public CutoffDualCircleSegmentEndpoint(PlanetModel planetModel, GeoStandardPath.PathComponent previous, GeoPoint point, SidedPlane prevCutoffPlane, SidedPlane nextCutoffPlane, GeoPoint prevURHC, GeoPoint prevLRHC, GeoPoint currentULHC, GeoPoint currentLLHC)
-
-
Method Detail
-
isWithin
public boolean isWithin(Vector point)
Description copied from interface:GeoStandardPath.PathComponent
Check if point is within this endpoint.- Specified by:
isWithin
in interfaceGeoStandardPath.PathComponent
- Specified by:
isWithin
in interfaceMembership
- 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.PathComponent
Check if point is within this endpoint.- Specified by:
isWithin
in interfaceGeoStandardPath.PathComponent
- Specified by:
isWithin
in interfaceMembership
- 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.
-
isWithinSection
public boolean isWithinSection(Vector point)
Description copied from interface:GeoStandardPath.PathComponent
Check if point is within this section (within cutoff planes).- Specified by:
isWithinSection
in interfaceGeoStandardPath.PathComponent
- Overrides:
isWithinSection
in classGeoStandardPath.BaseSegmentEndpoint
-
isWithinSection
public boolean isWithinSection(double x, double y, double z)
Description copied from interface:GeoStandardPath.PathComponent
Check if point is within this section (within cutoff planes).- Specified by:
isWithinSection
in interfaceGeoStandardPath.PathComponent
- Overrides:
isWithinSection
in classGeoStandardPath.BaseSegmentEndpoint
-
intersects
public boolean intersects(Plane p, XYZBounds planeBounds, GeoPoint[] notablePoints, Membership[] bounds)
Description copied from interface:GeoStandardPath.PathComponent
Determine if this endpoint intersects a specified plane.- Specified by:
intersects
in interfaceGeoStandardPath.PathComponent
- Overrides:
intersects
in classGeoStandardPath.BaseSegmentEndpoint
- Parameters:
p
- is the plane.planeBounds
- are the XYZBounds of the plane we're looking for an intersection with.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.PathComponent
Determine if this endpoint intersects a GeoShape.- Specified by:
intersects
in interfaceGeoStandardPath.PathComponent
- Overrides:
intersects
in classGeoStandardPath.BaseSegmentEndpoint
- Parameters:
geoShape
- is the GeoShape.- Returns:
- true if there is shape intersect this endpoint.
-
nearestPathDistance
public double nearestPathDistance(DistanceStyle distanceStyle, double x, double y, double z)
Description copied from interface:GeoStandardPath.PathComponent
Compute nearest path distance (distance from start of segment to point adjacent the one specitied, if reachable by this segment).- Specified by:
nearestPathDistance
in interfaceGeoStandardPath.PathComponent
- 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, in aggregation form.
-
pathCenterDistance
public double pathCenterDistance(DistanceStyle distanceStyle, double x, double y, double z)
Description copied from interface:GeoStandardPath.PathComponent
Compute path center distance (distance from the point to center of the path, if reachable by this segment).- Specified by:
pathCenterDistance
in interfaceGeoStandardPath.PathComponent
- 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 path segment.
-
getBounds
public void getBounds(Bounds bounds)
Description copied from interface:Bounded
Compute bounds for the shape.- Specified by:
getBounds
in interfaceBounded
- Specified by:
getBounds
in interfaceGeoStandardPath.PathComponent
- Overrides:
getBounds
in classGeoStandardPath.BaseSegmentEndpoint
- Parameters:
bounds
- is the input bounds object. The input object will be modified.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classGeoStandardPath.BaseSegmentEndpoint
-
-