Module org.apache.lucene.spatial3d
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 Object
implements GeoComplexPolygon.CountingEdgeIterator
Count the number of verifiable edge crossings for a dual-leg journey.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SidedPlane
private final SidedPlane
private boolean
private int
private SidedPlane
private SidedPlane
private final GeoPoint
private boolean
private int
private SidedPlane
private SidedPlane
private Set<GeoComplexPolygon.Edge>
private final GeoPoint
private final Plane
private final Plane
private final SidedPlane
private Plane
private final SidedPlane
private Plane
private final Plane
private final double
private final double
private final double
private final Plane
private final Plane
private Plane
private Plane
private final Plane
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
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
boolean
isOnEdge()
boolean
private GeoPoint
pickProximate
(GeoPoint[] points)
-
Field Details
-
seenEdges
-
testPoint
-
testPointPlane
-
testPointAbovePlane
-
testPointBelowPlane
-
travelPlane
-
travelAbovePlane
-
travelBelowPlane
-
thePointX
private final double thePointX -
thePointY
private final double thePointY -
thePointZ
private final double thePointZ -
intersectionPoint
-
testPointCutoffPlane
-
checkPointCutoffPlane
-
testPointOtherCutoffPlane
-
checkPointOtherCutoffPlane
-
computedInsideOutside
private boolean computedInsideOutside -
testPointInsidePlane
-
testPointOutsidePlane
-
travelInsidePlane
-
travelOutsidePlane
-
insideTestPointCutoffPlane
-
insideTravelCutoffPlane
-
outsideTestPointCutoffPlane
-
outsideTravelCutoffPlane
-
onEdge
private boolean onEdge -
innerCrossingCount
private int innerCrossingCount -
outerCrossingCount
private int outerCrossingCount
-
-
Constructor Details
-
DualCrossingEdgeIterator
-
-
Method Details
-
computeInsideOutside
protected void computeInsideOutside() -
pickProximate
-
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
- 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. -
edgeCrossesEnvelope
private boolean edgeCrossesEnvelope(Plane edgePlane, GeoPoint intersectionPoint, Plane envelopePlane) Return true if the edge crosses the envelope plane, given the envelope intersection point.
-