Class S2EdgeUtil.WedgeIntersects

java.lang.Object
com.google.common.geometry.S2EdgeUtil.WedgeIntersects
All Implemented Interfaces:
S2EdgeUtil.WedgeProcessor
Enclosing class:
S2EdgeUtil

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

    • WedgeIntersects

      public WedgeIntersects()
  • Method Details

    • 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