API
The pseudo type :: 2
indicate Tuple{Float64,Float64}
or any type T
such that ExactPredicates.coord(::T)
or Base.Tuple(::T)
outputs a Tuple{Float64,Float64}
. Similaly, :: 3
indicates Tuple{Float64,Float64,Float64}
or any type convertible to it coord
or Tuple
.
Planar predicates
ExactPredicates.closest
— Method.closest(p :: 2, q :: 2, a :: 2) -> Int
- Return 1 if
a
is closer top
than toq
. - Return –1 if
a
is closer toq
than top
. - Return 0 is
a
is equaly close to both.
ExactPredicates.incircle
— Method.incircle(a :: 2, b :: 2, c :: 2, p :: 2) -> Int
Assume that a
, b
and c
define a counterclockwise triangle.
- Return 1 if
p
is strictly inside the circumcircle of this triangle. - Return –1 if
p
is outside. - Return 0 if
p
is on the circle.
If the triangle is oriented clockwise, the signs are reversed. If a
, b
and c
are collinear, this degenerate to an orientation test.
If two of the four arguments are equal, return 0.
ExactPredicates.orient
— Method.orient(p :: 2, q :: 2, r :: 2) -> Int
- Return 1 if
r
is on the left of the oriented line defined byp
andq
. - Return –1 if
r
is on the right. - Return 0 if
r
is on the line or ifp == q
.
Spatial predicates
ExactPredicates.closest
— Method.closest(p :: 3, q :: 3, a :: 3) -> Int
Return 1 if a
is closer to p
than to q
. Return –1 if a
is closer to q
than to p
. Return 0 is a
is equaly close to both.
ExactPredicates.insphere
— Method.insphere(p :: 3, q :: 3, r :: 3, s :: 3, a :: 3)
- Return 1 if
a
is inside the circumscribed sphere defined by the four pointsp
,q
,r
ands
. - Return –1 if
a
is outside. - Return 0 is
a
lies on the sphere or if the four points are coplanar.
ExactPredicates.orient
— Method.orient(p :: 3, q :: 3, r :: 3, a :: 3) -> Int
Consider the oriented plane on which the triangle pqr
is positively oriented.
- Return 1 if
a
is below this plane. - Return –1 if
a
is above this plane. - Return 0 if
a
lies on this plane.