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 Details

    • seenEdges

      private 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 Details

    • 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 Details

    • computeInsideOutside

      protected void computeInsideOutside()
    • pickProximate

      private GeoPoint pickProximate(GeoPoint[] points)
    • getCrossingCount

      public int getCrossingCount()
      Specified by:
      getCrossingCount in interface GeoComplexPolygon.CountingEdgeIterator
      Returns:
      the number of edges that were crossed.
    • isOnEdge

      public boolean isOnEdge()
      Specified by:
      isOnEdge in interface GeoComplexPolygon.CountingEdgeIterator
      Returns:
      true if the endpoint was on an edge.
    • matches

      public boolean matches(GeoComplexPolygon.Edge edge)
      Specified by:
      matches in interface GeoComplexPolygon.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.