Package com.google.common.geometry
Class S2Predicates.EdgeCircumcenterSign
java.lang.Object
com.google.common.geometry.S2Predicates.EdgeCircumcenterSign
- Enclosing class:
S2Predicates
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic int
Returns a BigDecimal-based test result.static int
Returns a BigDecimal-based test result.static int
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
Returns a double-based test result.
-
Constructor Details
-
EdgeCircumcenterSign
private EdgeCircumcenterSign()No instantiation.
-
-
Method Details
-
triage
Returns a double-based test result. Faster but has a larger margin of uncertainty. -
exact
Returns a BigDecimal-based test result. Exact but very slow. -
exact
Returns a BigDecimal-based test result. Exact but very slow. -
sos
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.)
-