#[non_exhaustive]pub enum BarycentricError {
NonFinite,
Degenerate {
thickness: f64,
},
TooFewVertices {
count: usize,
},
ShortEdge {
index: usize,
},
SelfIntersecting {
first: usize,
second: usize,
},
Undefined,
}Expand description
Why coordinates could not be computed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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.
Trait Implementations§
Source§impl Clone for BarycentricError
impl Clone for BarycentricError
Source§fn clone(&self) -> BarycentricError
fn clone(&self) -> BarycentricError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for BarycentricError
impl PartialEq for BarycentricError
impl Copy for BarycentricError
impl StructuralPartialEq for BarycentricError
Auto Trait Implementations§
impl Freeze for BarycentricError
impl RefUnwindSafe for BarycentricError
impl Send for BarycentricError
impl Sync for BarycentricError
impl Unpin for BarycentricError
impl UnwindSafe for BarycentricError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more