Struct mgf::RigidBodyVec [−][src]
pub struct RigidBodyVec { pub x: Vec<Point3<f32>>, pub q: Vec<Quaternion<f32>>, pub collider: Vec<Moving<Component>>, // some fields omitted }
A vector of rigid bodies.
Fields
x: Vec<Point3<f32>>
q: Vec<Quaternion<f32>>
collider: Vec<Moving<Component>>
Methods
impl RigidBodyVec
[src]
impl RigidBodyVec
pub fn new() -> Self
[src]
pub fn new() -> Self
Create an empty RigidBodyVec.
pub fn add_body(
&mut self,
collider: Component,
mass: f32,
restitution: f32,
friction: f32,
world_force: Vector3<f32>
) -> RigidBodyRef
[src]
pub fn add_body(
&mut self,
collider: Component,
mass: f32,
restitution: f32,
friction: f32,
world_force: Vector3<f32>
) -> RigidBodyRef
Add a body to the rigid body.
pub fn integrate(&mut self, dt: f32)
[src]
pub fn integrate(&mut self, dt: f32)
Calculate the rotation, velocity, tensor, and collider for each rigid body.
pub fn colliders(&self) -> Iter<Moving<Component>>
[src]
pub fn colliders(&self) -> Iter<Moving<Component>>
Return an iterator for the colliders of the rigid body.
pub fn complete_motion(&mut self)
[src]
pub fn complete_motion(&mut self)
Finish all motion that was initiated at the beginning of the frame by integrate.
Trait Implementations
impl Clone for RigidBodyVec
[src]
impl Clone for RigidBodyVec
fn clone(&self) -> RigidBodyVec
[src]
fn clone(&self) -> RigidBodyVec
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl ConstrainedSet<RigidBodyRef, Velocity, RigidBodyInfo> for RigidBodyVec
[src]
impl ConstrainedSet<RigidBodyRef, Velocity, RigidBodyInfo> for RigidBodyVec
fn get(&self, i: RigidBodyRef) -> (Velocity, RigidBodyInfo)
[src]
fn get(&self, i: RigidBodyRef) -> (Velocity, RigidBodyInfo)
fn set(&mut self, i: RigidBodyRef, v: Velocity)
[src]
fn set(&mut self, i: RigidBodyRef, v: Velocity)
Auto Trait Implementations
impl Send for RigidBodyVec
impl Send for RigidBodyVec
impl Sync for RigidBodyVec
impl Sync for RigidBodyVec