#[non_exhaustive]pub enum BarycentricError {
NonFinite,
Degenerate {
thickness: Scalar,
},
TooFewVertices {
count: usize,
},
ShortEdge {
index: usize,
},
SelfIntersecting {
first: usize,
second: usize,
},
Undefined,
NotConvex {
index: usize,
},
VertexIndex {
face: usize,
index: usize,
len: usize,
},
}Expand description
Why coordinates could not be computed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NonFinite
A corner or the query point is not finite.
Degenerate
The triangle, tetrahedron or polygon is thinner than the linear
tolerance: its least altitude (for a polygon, twice its area over its
perimeter) is thickness.
TooFewVertices
A polygon has fewer than three vertices.
ShortEdge
Polygon edge index, from vertex index to the next, is no longer
than the linear tolerance.
SelfIntersecting
Polygon edges first and second cross, touch or fold back onto
each other within the linear tolerance, so the polygon is not simple.
Undefined
The mean-value weights cancel at this point, which can happen only outside a non-convex polygon: the coordinates are undefined there.
NotConvex
Wachspress and discrete harmonic coordinates require a strictly
convex polygon; vertex index turns the other way.
VertexIndex
A face of a triangle mesh names vertex index, but the mesh has only
len vertices.
Trait Implementations§
Source§impl Clone for BarycentricError
impl Clone for BarycentricError
Source§fn clone(&self) -> BarycentricError
fn clone(&self) -> BarycentricError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BarycentricError
Source§impl Debug for BarycentricError
impl Debug for BarycentricError
Source§impl Display for BarycentricError
impl Display for BarycentricError
Source§impl Error for BarycentricError
impl Error for BarycentricError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()