pub enum CompoundError {
NonFinitePart {
index: usize,
},
InvertedPart {
index: usize,
},
NoParts,
TooManyParts {
count: usize,
},
NonUnitRotation {
index: usize,
},
NoVolume,
UnweighableMass,
}Expand description
Why AabbCompound::new or crate::CompoundShape::new refused a set
of parts. The query compound refuses only the first two;
the rest are the collision shape’s, which must also be a body.
Variants§
NonFinitePart
A corner of the part at index holds a NaN or an infinity. A
poisoned part would turn every query that reaches it into a NaN, and
an infinite one bounds nothing a body can be.
Fields
index: usizeThe part’s index in the slice given to AabbCompound::new.
InvertedPart
The part at index has min past max on an axis, so it is empty
(Aabb::is_empty) and not a part of anything. A flat box, with min
equal to max on an axis, is accepted.
Fields
index: usizeThe part’s index in the slice given to AabbCompound::new.
NoParts
A collision shape with no parts: nothing to collide or weigh.
TooManyParts
A collision shape with more than crate::CompoundShape::MAX_PARTS
parts.
NonUnitRotation
The part at index of a collision shape has a rotation that is not a
unit quaternion, which would scale the box as it turned it.
NoVolume
Every part of a collision shape is flat, so a density weighs nothing.
UnweighableMass
A collision shape’s parts are so large or so small that their mass
properties overflow or underflow an f64: no rigid body can carry
them, and crate::RigidBody::with_inertia would refuse the tensor.
Trait Implementations§
Source§impl Clone for CompoundError
impl Clone for CompoundError
impl Copy for CompoundError
Source§impl Debug for CompoundError
impl Debug for CompoundError
Source§impl Display for CompoundError
impl Display for CompoundError
impl Eq for CompoundError
Source§impl Error for CompoundError
impl Error for CompoundError
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()