Package org.apache.lucene.spatial3d.geom
Class GeoComplexPolygon.DualCrossingEdgeIterator
- java.lang.Object
-
- org.apache.lucene.spatial3d.geom.GeoComplexPolygon.DualCrossingEdgeIterator
-
- All Implemented Interfaces:
GeoComplexPolygon.CountingEdgeIterator
,GeoComplexPolygon.EdgeIterator
- Enclosing class:
- GeoComplexPolygon
private class GeoComplexPolygon.DualCrossingEdgeIterator extends java.lang.Object implements GeoComplexPolygon.CountingEdgeIterator
Count the number of verifiable edge crossings for a dual-leg journey.
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description DualCrossingEdgeIterator(GeoPoint testPoint, Plane testPointPlane, Plane testPointAbovePlane, Plane testPointBelowPlane, Plane travelPlane, Plane travelAbovePlane, Plane travelBelowPlane, double thePointX, double thePointY, double thePointZ, GeoPoint intersectionPoint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
computeInsideOutside()
private int
countCrossings(GeoComplexPolygon.Edge edge, Plane travelEnvelopePlane, Membership travelEnvelopeBound1, Membership travelEnvelopeBound2, Plane testPointEnvelopePlane, Membership testPointEnvelopeBound1, Membership testPointEnvelopeBound2)
Find the intersections with a pair of envelope planes, and assess those intersections for duplication and for whether they truly describe crossings.private boolean
edgeCrossesEnvelope(Plane edgePlane, GeoPoint intersectionPoint, Plane envelopePlane)
Return true if the edge crosses the envelope plane, given the envelope intersection point.int
getCrossingCount()
boolean
isOnEdge()
boolean
matches(GeoComplexPolygon.Edge edge)
private GeoPoint
pickProximate(GeoPoint[] points)
-
-
-
Field Detail
-
seenEdges
private java.util.Set<GeoComplexPolygon.Edge> seenEdges
-
testPoint
private final GeoPoint testPoint
-
testPointPlane
private final Plane testPointPlane
-
testPointAbovePlane
private final Plane testPointAbovePlane
-
testPointBelowPlane
private final Plane testPointBelowPlane
-
travelPlane
private final Plane travelPlane
-
travelAbovePlane
private final Plane travelAbovePlane
-
travelBelowPlane
private final Plane travelBelowPlane
-
thePointX
private final double thePointX
-
thePointY
private final double thePointY
-
thePointZ
private final double thePointZ
-
intersectionPoint
private final GeoPoint intersectionPoint
-
testPointCutoffPlane
private final SidedPlane testPointCutoffPlane
-
checkPointCutoffPlane
private final SidedPlane checkPointCutoffPlane
-
testPointOtherCutoffPlane
private final SidedPlane testPointOtherCutoffPlane
-
checkPointOtherCutoffPlane
private final SidedPlane checkPointOtherCutoffPlane
-
computedInsideOutside
private boolean computedInsideOutside
-
testPointInsidePlane
private Plane testPointInsidePlane
-
testPointOutsidePlane
private Plane testPointOutsidePlane
-
travelInsidePlane
private Plane travelInsidePlane
-
travelOutsidePlane
private Plane travelOutsidePlane
-
insideTestPointCutoffPlane
private SidedPlane insideTestPointCutoffPlane
-
insideTravelCutoffPlane
private SidedPlane insideTravelCutoffPlane
-
outsideTestPointCutoffPlane
private SidedPlane outsideTestPointCutoffPlane
-
outsideTravelCutoffPlane
private SidedPlane outsideTravelCutoffPlane
-
onEdge
private boolean onEdge
-
innerCrossingCount
private int innerCrossingCount
-
outerCrossingCount
private int outerCrossingCount
-
-
Constructor Detail
-
DualCrossingEdgeIterator
public DualCrossingEdgeIterator(GeoPoint testPoint, Plane testPointPlane, Plane testPointAbovePlane, Plane testPointBelowPlane, Plane travelPlane, Plane travelAbovePlane, Plane travelBelowPlane, double thePointX, double thePointY, double thePointZ, GeoPoint intersectionPoint)
-
-
Method Detail
-
computeInsideOutside
protected void computeInsideOutside()
-
getCrossingCount
public int getCrossingCount()
- Specified by:
getCrossingCount
in interfaceGeoComplexPolygon.CountingEdgeIterator
- Returns:
- the number of edges that were crossed.
-
isOnEdge
public boolean isOnEdge()
- Specified by:
isOnEdge
in interfaceGeoComplexPolygon.CountingEdgeIterator
- Returns:
- true if the endpoint was on an edge.
-
matches
public boolean matches(GeoComplexPolygon.Edge edge)
- Specified by:
matches
in interfaceGeoComplexPolygon.EdgeIterator
- Parameters:
edge
- is the edge that matched.- Returns:
- true if the iteration should continue, false otherwise.
-
countCrossings
private int countCrossings(GeoComplexPolygon.Edge edge, Plane travelEnvelopePlane, Membership travelEnvelopeBound1, Membership travelEnvelopeBound2, Plane testPointEnvelopePlane, Membership testPointEnvelopeBound1, Membership testPointEnvelopeBound2)
Find the intersections with a pair of envelope planes, and assess those intersections for duplication and for whether they truly describe crossings.
-
-