#[repr(u64)]
#[non_exhaustive]
pub enum JointType {
Fixed,
Ball,
Hinge,
Slider,
Distance,
}
Expand description
The type of a Joint
.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Fixed
Fixed joints are like glue, simply attaches one object to the other. Breakable fixed joints can be useful for a limited destruction simulation.
Ball
Ball joints are what you’d expect - lots of freedom to turn and bend. Great for ragdolls, attaching trailers to cars, etc.
Hinge
A hinge joint has a single axis of rotation, just like a real-world hinge. Useful for not only doors and gates, but also for things like attaching a wheel to a car body.
Slider
A slider joint lets one object slide along a defined axis relative to the other one.
Distance
A distance joint limits the distance between two objects.
Trait Implementations
sourceimpl CheckedBitPattern for JointType
impl CheckedBitPattern for JointType
type Bits = u64
type Bits = u64
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
. Read more
sourcefn is_valid_bit_pattern(bits: &<JointType as CheckedBitPattern>::Bits) -> bool
fn is_valid_bit_pattern(bits: &<JointType as CheckedBitPattern>::Bits) -> bool
If this function returns true, then it must be valid to reinterpret bits
as &Self
. Read more
sourceimpl PartialEq<JointType> for JointType
impl PartialEq<JointType> for JointType
sourceimpl ValueConverterTrait<JointType> for ValueConverter
impl ValueConverterTrait<JointType> for ValueConverter
sourcefn into_value(v: JointType) -> Value
fn into_value(v: JointType) -> Value
Wraps the passed-in value in a Value
enum.
sourcefn from_value(v: &Value) -> JointType
fn from_value(v: &Value) -> JointType
Extracts the value from a Value
enum.
impl Copy for JointType
impl Eq for JointType
impl NoUninit for JointType
impl StructuralEq for JointType
impl StructuralPartialEq for JointType
Auto Trait Implementations
impl RefUnwindSafe for JointType
impl Send for JointType
impl Sync for JointType
impl Unpin for JointType
impl UnwindSafe for JointType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more