[−][src]Struct physme::dim3::RigidBody
The rigid body.
Fields
position: Vec3
Current position of this rigid body.
rotation: Quat
Current rotation of this rigid body.
NOTE: collisions checks may or may not be broken if this is not a multiple of 90 degrees.
linvel: Vec3
Current linear velocity of this rigid body.
terminal: Vec3
The terminal linear velocity of a semikinematic body.
Defaults to f32::INFINITY
.
angvel: Quat
Current angular velocity of this rigid body.
ang_term: f32
The terminal angular velocity of a semikinematic body.
Defaults to f32::INFINITY
.
status: Status
The status, i.e. static or semikinematic.
Affects how forces and collisions affect this rigid body.
Implementations
impl RigidBody
[src]
pub fn new(mass: Mass) -> Self
[src]
Returns a new RigidBody
with just a mass and all other components set to their defaults.
pub fn with_position(self, position: Vec3) -> Self
[src]
Returns a RigidBody
identical to this one, but with the position set to a new one.
pub fn with_rotation(self, rotation: Quat) -> Self
[src]
Returns a RigidBody
identical to this one, but with the rotation set to a new one.
pub fn with_linear_velocity(self, linvel: Vec3) -> Self
[src]
Returns a RigidBody
identical to this one, but with the linear velocity set to a new one.
pub fn with_angular_velocity(self, angvel: Quat) -> Self
[src]
Returns a RigidBody
identical to this one, but with the linear velocity set to a new one.
pub fn with_terminal(self, terminal: Vec3) -> Self
[src]
Returns a RigidBody
identical to this one, but with the terminal linear velocity set to a new one.
pub fn with_angular_terminal(self, terminal: f32) -> Self
[src]
Returns a RigidBody
identical to this one, but with the terminal linear velocity set to a new one.
pub fn with_acceleration(self, acceleration: Vec3) -> Self
[src]
Returns a RigidBody
identical to this one, but with the acceleration set to a new one.
pub fn with_status(self, status: Status) -> Self
[src]
Returns a RigidBody
identical to this one, but with the status set to a new one.
pub fn with_active(self, active: bool) -> Self
[src]
Returns a RigidBody
identical to this one, but with the active flag set to a new one.
pub fn with_sensor(self, sensor: bool) -> Self
[src]
Returns a RigidBody
identical to this one, but with the sensor flag set to a new one.
pub fn apply_linear_impulse(&mut self, impulse: Vec3)
[src]
Applies an impulse to the RigidBody
s linear velocity.
pub fn apply_angular_impulse(&mut self, impulse: Quat)
[src]
Applies an impulse to the RigidBody
s linear velocity.
pub fn apply_force(&mut self, force: Vec3)
[src]
Applies a force to the RigidBody
s acceleration accumulator.
pub fn is_active(&self) -> bool
[src]
Gets the active flag.
pub fn is_sensor(&self) -> bool
[src]
Gets the sensor flag.
pub fn mass(&self) -> f32
[src]
Gets the mass
pub fn inverse_mass(&self) -> f32
[src]
Gets the mass
pub fn set_active(&mut self, active: bool)
[src]
Sets the active flag.
pub fn set_sensor(&mut self, sensor: bool)
[src]
Sets the sensor flag.
pub fn set_mass(&mut self, mass: Mass)
[src]
Sets the mass.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RigidBody
impl Send for RigidBody
impl Sync for RigidBody
impl Unpin for RigidBody
impl UnwindSafe for RigidBody
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<T> Component for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,