pub trait ReadRigidBodyForces: ReadRigidBodyForcesInternal {
// Provided methods
fn position(&self) -> &Position { ... }
fn rotation(&self) -> &Rotation { ... }
fn linear_velocity(&self) -> Vector { ... }
fn angular_velocity(&self) -> Vector { ... }
fn accumulated_linear_acceleration(&self) -> Vector { ... }
fn accumulated_angular_acceleration(&self) -> Vector { ... }
fn velocity_at_point(&self, world_point: Vector) -> Vector { ... }
}Expand description
A trait for reading forces of a dynamic rigid body.
This is implemented as a shared interface for the ForcesItem and NonWakingForcesItem
returned by Forces.
See the documentation of Forces for more information on how to work with forces in Avian.
Provided Methods§
Sourcefn linear_velocity(&self) -> Vector
fn linear_velocity(&self) -> Vector
Returns the LinearVelocity of the body in world space.
Sourcefn angular_velocity(&self) -> Vector
fn angular_velocity(&self) -> Vector
Returns the AngularVelocity of the body in world space.
Sourcefn accumulated_linear_acceleration(&self) -> Vector
fn accumulated_linear_acceleration(&self) -> Vector
Returns the linear acceleration that the body has accumulated before the physics step in world space, including acceleration caused by forces.
This does not include gravity, contact forces, or joint forces.
Only forces and accelerations applied through Forces are included.
Sourcefn accumulated_angular_acceleration(&self) -> Vector
fn accumulated_angular_acceleration(&self) -> Vector
Returns the angular acceleration that the body has accumulated before the physics step in world space, including acceleration caused by torques.
This does not include gravity, contact forces, or joint forces.
Only torques and accelerations applied through Forces are included.
Sourcefn velocity_at_point(&self, world_point: Vector) -> Vector
fn velocity_at_point(&self, world_point: Vector) -> Vector
Returns the velocity of a point in world space on the body.