#[non_exhaustive]#[repr(u32)]pub enum ForceMode {
Force = 0,
Impulse = 1,
VelocityChange = 2,
Acceleration = 3,
}
Expand description
Used with add_force
/ add_force_at
.
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.
Force = 0
Add a continuous force to the entity, using its mass.
Impulse = 1
Add an instant force impulse to the entity, using its mass.
VelocityChange = 2
Add an instant velocity change to the entity, ignoring its mass.
Acceleration = 3
Add a continuous acceleration to the entity, ignoring its mass.
Trait Implementations§
Source§impl CheckedBitPattern for ForceMode
impl CheckedBitPattern for ForceMode
Source§type Bits = u32
type Bits = u32
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(bits: &Self::Bits) -> bool
fn is_valid_bit_pattern(bits: &Self::Bits) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.Source§impl TryFromPrimitive for ForceMode
impl TryFromPrimitive for ForceMode
impl Copy for ForceMode
impl Eq for ForceMode
impl NoUninit for ForceMode
impl StructuralPartialEq for ForceMode
Auto Trait Implementations§
impl Freeze for ForceMode
impl RefUnwindSafe for ForceMode
impl Send for ForceMode
impl Sync for ForceMode
impl Unpin for ForceMode
impl UnwindSafe for ForceMode
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