[−][src]Struct mgf::RigidBodyVec
A vector of rigid bodies.
Fields
x: Vec<Point3<f32>>
q: Vec<Quaternion<f32>>
collider: Vec<Moving<Component>>
Methods
impl RigidBodyVec
[src]
pub fn new() -> Self
[src]
Create an empty RigidBodyVec.
pub fn add_body(
&mut self,
collider: Component,
mass: f32,
restitution: f32,
friction: f32,
world_force: Vector3<f32>
) -> RigidBodyRef
[src]
&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]
Calculate the rotation, velocity, tensor, and collider for each rigid body.
pub fn colliders(&self) -> Iter<Moving<Component>>
[src]
Return an iterator for the colliders of the rigid body.
pub fn complete_motion(&mut self)
[src]
Finish all motion that was initiated at the beginning of the frame by integrate.
Trait Implementations
impl Clone for RigidBodyVec
[src]
fn clone(&self) -> RigidBodyVec
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl ConstrainedSet<RigidBodyRef, Velocity, RigidBodyInfo> for RigidBodyVec
[src]
fn get(&self, i: RigidBodyRef) -> (Velocity, RigidBodyInfo)
[src]
fn set(&mut self, i: RigidBodyRef, v: Velocity)
[src]
Auto Trait Implementations
impl RefUnwindSafe for RigidBodyVec
impl Send for RigidBodyVec
impl Sync for RigidBodyVec
impl Unpin for RigidBodyVec
impl UnwindSafe for RigidBodyVec
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,