pub trait Predicates {
// Required methods
fn orient2d(a: P2, b: P2, c: P2) -> Sign;
fn orient3d(a: P3, b: P3, c: P3, d: P3) -> Sign;
fn incircle(a: P2, b: P2, c: P2, d: P2) -> Sign;
fn insphere(a: P3, b: P3, c: P3, d: P3, e: P3) -> Sign;
// Provided methods
fn is_left_of(a: P2, b: P2, c: P2) -> bool { ... }
fn are_collinear(a: P2, b: P2, c: P2) -> bool { ... }
fn are_coplanar(a: P3, b: P3, c: P3, d: P3) -> bool { ... }
}Expand description
Orientation and incircle/insphere tests.
Implementations must agree on sign conventions; only their accuracy and cost may differ.
Required Methods§
Sourcefn orient2d(a: P2, b: P2, c: P2) -> Sign
fn orient2d(a: P2, b: P2, c: P2) -> Sign
Sign of the area of triangle (a, b, c).
Sign::Positive when the three points are counter-clockwise,
Sign::Zero when collinear.
Sourcefn orient3d(a: P3, b: P3, c: P3, d: P3) -> Sign
fn orient3d(a: P3, b: P3, c: P3, d: P3) -> Sign
Sign of the volume of tetrahedron (a, b, c, d).
Sign::Positive when d lies below the plane through a, b, c,
where “below” is the side from which a, b, c appear clockwise.
Sign::Zero when the four points are coplanar.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".