Package com.google.common.geometry
Interface S2EdgeUtil.WedgeProcessor
-
- All Known Implementing Classes:
S2EdgeUtil.WedgeContains
,S2EdgeUtil.WedgeContainsOrCrosses
,S2EdgeUtil.WedgeContainsOrIntersects
,S2EdgeUtil.WedgeIntersects
- Enclosing class:
- S2EdgeUtil
public static interface S2EdgeUtil.WedgeProcessor
Wedge processors are used to determine the local relationship between two polygons that share a common vertex.Given an edge chain (x0, x1, x2), the wedge at x1 is the region to the left of the edges. More precisely, it is the set of all rays from x1x0 (inclusive) to x1x2 (exclusive) in the *clockwise* direction.
Implementations compare two *non-empty* wedges that share the same middle vertex: A=(a0, ab1, a2) and B=(b0, ab1, b2).
All wedge processors require that a0 != a2 and b0 != b2. Other degenerate cases (such as a0 == b2) are handled as expected. The parameter "ab1" denotes the common vertex a1 == b1.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
test(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2)
A wedge processor's test method accepts two edge chains A=(a0,a1,a2) and B=(b0,b1,b2) where a1==b1, and returns either -1, 0, or 1 to indicate the relationship between the region to the left of A and the region to the left of B.
-
-
-
Method Detail
-
test
int test(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2)
A wedge processor's test method accepts two edge chains A=(a0,a1,a2) and B=(b0,b1,b2) where a1==b1, and returns either -1, 0, or 1 to indicate the relationship between the region to the left of A and the region to the left of B.
-
-