Package org.apache.lucene.spatial3d.geom
Class GeoComplexPolygon.FullLinearCrossingEdgeIterator
- java.lang.Object
-
- org.apache.lucene.spatial3d.geom.GeoComplexPolygon.FullLinearCrossingEdgeIterator
-
- All Implemented Interfaces:
GeoComplexPolygon.CountingEdgeIterator,GeoComplexPolygon.EdgeIterator
- Enclosing class:
- GeoComplexPolygon
private class GeoComplexPolygon.FullLinearCrossingEdgeIterator extends java.lang.Object implements GeoComplexPolygon.CountingEdgeIterator
Count the number of verifiable edge crossings for a full 1/2 a world.
-
-
Field Summary
Fields Modifier and Type Field Description private intaboveCrossingCountprivate PlaneabovePlaneprivate intbelowCrossingCountprivate PlanebelowPlaneprivate Membershipboundprivate booleanonEdgeprivate Planeplaneprivate doublethePointXprivate doublethePointYprivate doublethePointZ
-
Constructor Summary
Constructors Constructor Description FullLinearCrossingEdgeIterator(GeoPoint testPoint, Plane plane, Plane abovePlane, Plane belowPlane, double thePointX, double thePointY, double thePointZ)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private intcountCrossings(GeoComplexPolygon.Edge edge, Plane envelopePlane, Membership envelopeBound)Find the intersections with an envelope plane, and assess those intersections for whether they truly describe crossings.private booleanedgeCrossesEnvelope(Plane edgePlane, GeoPoint intersectionPoint, Plane envelopePlane)intgetCrossingCount()booleanisOnEdge()booleanmatches(GeoComplexPolygon.Edge edge)
-
-
-
Field Detail
-
plane
private final Plane plane
-
abovePlane
private final Plane abovePlane
-
belowPlane
private final Plane belowPlane
-
bound
private final Membership bound
-
thePointX
private final double thePointX
-
thePointY
private final double thePointY
-
thePointZ
private final double thePointZ
-
onEdge
private boolean onEdge
-
aboveCrossingCount
private int aboveCrossingCount
-
belowCrossingCount
private int belowCrossingCount
-
-
Method Detail
-
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
public boolean matches(GeoComplexPolygon.Edge edge)
- 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 envelopePlane, Membership envelopeBound)
Find the intersections with an envelope plane, and assess those intersections for whether they truly describe crossings.
-
-