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 SidedPlaneprivate final SidedPlaneprivate booleanprivate intprivate SidedPlaneprivate SidedPlaneprivate final GeoPointprivate booleanprivate intprivate SidedPlaneprivate SidedPlaneprivate Set<GeoComplexPolygon.Edge> private final GeoPointprivate final Planeprivate final Planeprivate final SidedPlaneprivate Planeprivate final SidedPlaneprivate Planeprivate final Planeprivate final doubleprivate final doubleprivate final doubleprivate final Planeprivate final Planeprivate Planeprivate Planeprivate final Plane -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprivate intcountCrossings(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 booleanedgeCrossesEnvelope(Plane edgePlane, GeoPoint intersectionPoint, Plane envelopePlane) Return true if the edge crosses the envelope plane, given the envelope intersection point.intbooleanisOnEdge()booleanprivate GeoPointpickProximate(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:
getCrossingCountin interfaceGeoComplexPolygon.CountingEdgeIterator- Returns:
- the number of edges that were crossed.
-
isOnEdge
public boolean isOnEdge()- Specified by:
isOnEdgein interfaceGeoComplexPolygon.CountingEdgeIterator- Returns:
- true if the endpoint was on an edge.
-
matches
- Specified by:
matchesin 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.
-