Package com.google.common.geometry
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 java.lang.Object implements S2EdgeUtil.WedgeProcessor
Returns true if wedge A intersects wedge B. Equivalent to but faster thangetWedgeRelation() != 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.
-
-
-
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 interfaceS2EdgeUtil.WedgeProcessor
-
-