Class S2EdgeUtil.WedgeIntersects

  • All Implemented Interfaces:
    S2EdgeUtil.WedgeProcessor
    Enclosing class:
    S2EdgeUtil

    public static class S2EdgeUtil.WedgeIntersects
    extends java.lang.Object
    implements S2EdgeUtil.WedgeProcessor
    Returns true if wedge A intersects wedge B. Equivalent to but faster than getWedgeRelation() != WEDGE_IS_DISJOINT.
    • Constructor Summary

      Constructors 
      Constructor Description
      WedgeIntersects()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int test​(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2)
      Given two edge chains (see WedgeRelation above), this function returns -1 if the region to the left of A intersects the region to the left of B, and 0 otherwise.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WedgeIntersects

        public WedgeIntersects()
    • Method Detail

      • test

        public int test​(S2Point a0,
                        S2Point ab1,
                        S2Point a2,
                        S2Point b0,
                        S2Point b2)
        Given two edge chains (see WedgeRelation above), this function returns -1 if the region to the left of A intersects the region to the left of B, and 0 otherwise. Note that regions are defined such that points along a boundary are contained by one side or the other, not both. So for example, if A,B,C are distinct points ordered CCW around a vertex O, then the wedges BOA, AOC, and COB do not intersect.
        Specified by:
        test in interface S2EdgeUtil.WedgeProcessor