s2.s2predicates

Undocumented in source.

Members

Aliases

Vector3_xf
alias Vector3_xf = Vector3!ExactFloat
Undocumented in source.

Enums

Excluded
enum Excluded
Undocumented in source.

Functions

compareDistance
int compareDistance(S2Point x, S2Point y, S1ChordAngle r)
Undocumented in source. Be warned that the author may not have intended to support it.
compareDistances
int compareDistances(S2Point x, S2Point a, S2Point b)
Undocumented in source. Be warned that the author may not have intended to support it.
compareEdgeDirections
int compareEdgeDirections(S2Point a0, S2Point a1, S2Point b0, S2Point b1)

Returns -1, 0, or +1 according to whether the normal of edge A has negative, zero, or positive dot product with the normal of edge B. This essentially measures whether the edges A and B are closer to proceeding in the same direction or in opposite directions around the sphere.

compareEdgeDistance
int compareEdgeDistance(S2Point x, S2Point a0, S2Point a1, S1ChordAngle r)

Returns -1, 0, or +1 according to whether the distance from the point X to the edge A is less than, equal to, or greater than "r" respectively. Distances are measured with respect the positions of all points as though they were projected to lie exactly on the surface of the unit sphere.

edgeCircumcenterSign
int edgeCircumcenterSign(S2Point x0, S2Point x1, S2Point a, S2Point b, S2Point c)

Returns Sign(X0, X1, Z) where Z is the circumcenter of triangle ABC. The return value is -1 if Z is to the left of edge X, and +1 if Z is to the right of edge X. The return value is zero if A == B, B == C, or C == A (exactly), and also if X0 and X1 project to identical points on the sphere (e.g., X0 == X1).

exactCompareDistance
int exactCompareDistance(Vector3_xf x, Vector3_xf y, ExactFloat r2)
Undocumented in source. Be warned that the author may not have intended to support it.
exactCompareDistances
int exactCompareDistances(Vector3_xf x, Vector3_xf a, Vector3_xf b)
Undocumented in source. Be warned that the author may not have intended to support it.
exactCompareEdgeDirections
int exactCompareEdgeDirections(Vector3_xf a0, Vector3_xf a1, Vector3_xf b0, Vector3_xf b1)
Undocumented in source.
exactCompareEdgeDistance
int exactCompareEdgeDistance(S2Point x, S2Point a0, S2Point a1, S1ChordAngle r)
Undocumented in source. Be warned that the author may not have intended to support it.
exactEdgeCircumcenterSign
int exactEdgeCircumcenterSign(Vector3_xf x0, Vector3_xf x1, Vector3_xf a, Vector3_xf b, Vector3_xf c, int abc_sign)
Undocumented in source. Be warned that the author may not have intended to support it.
exactSign
int exactSign(S2Point a, S2Point b, S2Point c, bool perturb)

/ /

exactVoronoiSiteExclusion
Excluded exactVoronoiSiteExclusion(Vector3_xf a, Vector3_xf b, Vector3_xf x0, Vector3_xf x1, ExactFloat r2)
Undocumented in source.
expensiveSign
int expensiveSign(S2Point a, S2Point b, S2Point c, bool perturb)

This function is invoked by Sign() if the sign of the determinant is uncertain. It always returns a non-zero result unless two of the input points are the same. It uses a combination of multiple-precision arithmetic and symbolic perturbations to ensure that its results are always self-consistent (cf. Simulation of Simplicity, Edelsbrunner and Muecke). The basic idea is to assign an infinitesimal symbolic perturbation to every possible S2Point such that no three S2Points are collinear and no four S2Points are coplanar. These perturbations are so small that they do not affect the sign of any determinant that was non-zero before the perturbations. If "perturb" is false, then instead the exact sign of the unperturbed input points is returned, which can be zero even when all three points are distinct.

getVoronoiSiteExclusion
Excluded getVoronoiSiteExclusion(S2Point a, S2Point b, S2Point x0, S2Point x1, S1ChordAngle r)

This is a specialized method that is used to compute the intersection of an edge X with the Voronoi diagram of a set of points, where each Voronoi region is intersected with a disc of fixed radius "r".

orderedCCW
bool orderedCCW(S2Point a, S2Point b, S2Point c, S2Point o)
Undocumented in source. Be warned that the author may not have intended to support it.
roundingEpsilon
T roundingEpsilon()
Undocumented in source. Be warned that the author may not have intended to support it.
sign
int sign(S2Point a, S2Point b, S2Point c)
Undocumented in source. Be warned that the author may not have intended to support it.
sign
int sign(S2Point a, S2Point b, S2Point c, Vector3_d a_cross_b)

A more efficient version of Sign that allows the precomputed cross-product of A and B to be specified. (Unlike the 3 argument version this method is also inlined.)

stableSign
int stableSign(S2Point a, S2Point b, S2Point c)
Undocumented in source. Be warned that the author may not have intended to support it.
symbolicCompareDistances
int symbolicCompareDistances(S2Point x, S2Point a, S2Point b)
Undocumented in source. Be warned that the author may not have intended to support it.
symbolicEdgeCircumcenterSign
int symbolicEdgeCircumcenterSign(S2Point x0, S2Point x1, S2Point a_arg, S2Point b_arg, S2Point c_arg)

Given arguments such that ExactEdgeCircumcenterSign(x0, x1, a, b, c) == 0, returns the value of Sign(X0, X1, Z) (where Z is the circumcenter of triangle ABC) after symbolic perturbations are taken into account. The result is zero only if X0 == X1, A == B, B == C, or C == A. (It is nonzero if these pairs are exactly proportional to each other but not equal.)

triageCompareCosDistance
int triageCompareCosDistance(Vector!(T, 3) x, Vector!(T, 3) y, T r2)
Undocumented in source. Be warned that the author may not have intended to support it.
triageCompareCosDistances
int triageCompareCosDistances(Vector!(T, 3) x, Vector!(T, 3) a, Vector!(T, 3) b)
Undocumented in source. Be warned that the author may not have intended to support it.
triageCompareEdgeDirections
int triageCompareEdgeDirections(Vector!(T, 3) a0, Vector!(T, 3) a1, Vector!(T, 3) b0, Vector!(T, 3) b1)
Undocumented in source. Be warned that the author may not have intended to support it.
triageCompareEdgeDistance
int triageCompareEdgeDistance(Vector!(T, 3) x, Vector!(T, 3) a0, Vector!(T, 3) a1, T r2)
Undocumented in source. Be warned that the author may not have intended to support it.
triageCompareSin2Distance
int triageCompareSin2Distance(Vector!(T, 3) x, Vector!(T, 3) y, T r2)
Undocumented in source.
triageCompareSin2Distances
int triageCompareSin2Distances(Vector!(T, 3) x, Vector!(T, 3) a, Vector!(T, 3) b)
Undocumented in source. Be warned that the author may not have intended to support it.
triageEdgeCircumcenterSign
int triageEdgeCircumcenterSign(Vector!(T, 3) x0, Vector!(T, 3) x1, Vector!(T, 3) a, Vector!(T, 3) b, Vector!(T, 3) c, int abc_sign)
Undocumented in source. Be warned that the author may not have intended to support it.
triageSign
int triageSign(S2Point a, S2Point b, S2Point c, Vector3_d a_cross_b)

This version of Sign returns +1 if the points are definitely CCW, -1 if they are definitely CW, and 0 if two points are identical or the result is uncertain. Uncertain cases can be resolved, if desired, by calling ExpensiveSign.

triageVoronoiSiteExclusion
Excluded triageVoronoiSiteExclusion(Vector!(T, 3) a, Vector!(T, 3) b, Vector!(T, 3) x0, Vector!(T, 3) x1, T r2)
Undocumented in source. Be warned that the author may not have intended to support it.
unperturbedSign
int unperturbedSign(S2Point a, S2Point b, S2Point c)

Like Sign, except this method does not use symbolic perturbations when the input points are exactly coplanar with the origin (i.e., linearly dependent). Clients should never use this method, but it is useful here in order to implement the combined pedestal/axis-aligned perturbation scheme used by some methods (such as EdgeCircumcenterSign).

Variables

DBL_ERR
double DBL_ERR;
Undocumented in source.
REAL_ERR
real REAL_ERR;
Undocumented in source.

Meta