Package com.google.common.geometry
Class S2Predicates.EdgeCircumcenterSign
- java.lang.Object
-
- com.google.common.geometry.S2Predicates.EdgeCircumcenterSign
-
- Enclosing class:
- S2Predicates
static class S2Predicates.EdgeCircumcenterSign extends java.lang.Object
A predicate for whether an edge PQ passes to the left, to the right, or through the center of the circumcircle of triangle ABC. Useful to determine the orientation of an edge with respect to the centers of a Voronoi diagram. Returns sign(P, Q, Z) where Z is the circumcenter of triangle ABC. The return value is -1 if Z is to the left of edge PQ, and +1 if Z is to the right of edge PQ. The return value is zero if the triangle has two or more exactly duplicate vertices, or if the result is indeterminate.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
EdgeCircumcenterSign()
No instantiation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
exact(BigPoint p, BigPoint q, BigPoint a, BigPoint b, BigPoint c, int abc)
Returns a BigDecimal-based test result.static int
exact(S2Point p, S2Point q, S2Point a, S2Point b, S2Point c, int abc)
Returns a BigDecimal-based test result.static int
sos(S2Point p, S2Point q, S2Point a, S2Point b, S2Point c)
Given the exact test resulted in 0, returns a Simulation of Simplicity-based test result, that can only result in zero if P == Q, A == B, B == C, or C == A (the result will be nonzero if these pairs are exactly proportional to each other but not equal.)static int
triage(S2Point p, S2Point q, S2Point a, S2Point b, S2Point c, int abc)
Returns a double-based test result.
-
-
-
Method Detail
-
triage
public static int triage(S2Point p, S2Point q, S2Point a, S2Point b, S2Point c, int abc)
Returns a double-based test result. Faster but has a larger margin of uncertainty.
-
exact
public static int exact(S2Point p, S2Point q, S2Point a, S2Point b, S2Point c, int abc)
Returns a BigDecimal-based test result. Exact but very slow.
-
exact
public static int exact(BigPoint p, BigPoint q, BigPoint a, BigPoint b, BigPoint c, int abc)
Returns a BigDecimal-based test result. Exact but very slow.
-
sos
public static int sos(S2Point p, S2Point q, S2Point a, S2Point b, S2Point c)
Given the exact test resulted in 0, returns a Simulation of Simplicity-based test result, that can only result in zero if P == Q, A == B, B == C, or C == A (the result will be nonzero if these pairs are exactly proportional to each other but not equal.)
-
-