#[non_exhaustive]pub enum SoftBodyError {
NodeIndexOutOfBounds {
index: u32,
node_count: u32,
},
InvalidPoissonsRatio {
value: f32,
},
InvalidYoungsModulus {
value: f32,
},
DegenerateTetrahedron {
volume: f32,
},
NodeOffsetOverflow,
NoCompatibleAdapter,
DeviceRequestFailed(String),
}Expand description
Errors produced by fallible soft-body construction and simulation operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NodeIndexOutOfBounds
A tetrahedral element referenced a node index that does not exist yet.
index is the offending node index and node_count is the number of
nodes currently present in the mesh.
InvalidPoissonsRatio
Poisson’s ratio was outside the physically valid range [0.0, 0.5).
Values >= 0.5 produce a singular / negative Lamé lambda
(incompressible limit) and values < 0.0 are unsupported here.
InvalidYoungsModulus
Young’s modulus was not a finite, strictly-positive value.
DegenerateTetrahedron
A tetrahedral element was (near-)degenerate: its rest volume is not a finite, strictly-positive value above the acceptance epsilon.
Such elements have a singular reference shape matrix (Dm), so the
deformation gradient and the derived elastic forces are undefined
(near-zero stiffness / NaN propagation). volume is the offending rest
volume that was computed.
NodeOffsetOverflow
The flattened GPU node offset overflowed u32 (too many nodes across
all soft bodies in a single step).
NoCompatibleAdapter
No compatible GPU adapter could be acquired.
DeviceRequestFailed(String)
Requesting a logical GPU device from the adapter failed.
Trait Implementations§
Source§impl Clone for SoftBodyError
impl Clone for SoftBodyError
Source§fn clone(&self) -> SoftBodyError
fn clone(&self) -> SoftBodyError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SoftBodyError
impl Debug for SoftBodyError
Source§impl Display for SoftBodyError
impl Display for SoftBodyError
Source§impl Error for SoftBodyError
impl Error for SoftBodyError
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()
Source§impl PartialEq for SoftBodyError
impl PartialEq for SoftBodyError
impl StructuralPartialEq for SoftBodyError
Auto Trait Implementations§
impl Freeze for SoftBodyError
impl RefUnwindSafe for SoftBodyError
impl Send for SoftBodyError
impl Sync for SoftBodyError
impl Unpin for SoftBodyError
impl UnsafeUnpin for SoftBodyError
impl UnwindSafe for SoftBodyError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<E> ExternalError for E
impl<E> ExternalError for E
fn into_lua_err(self) -> Error
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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