Struct bevy_rapier2d::prelude::Multibody [−][src]
pub struct Multibody { /* fields omitted */ }
Expand description
An articulated body simulated using the reduced-coordinates approach.
Implementations
The first link of this multibody.
Mutable reference to the first link of this multibody.
Reference i
-th multibody link of this multibody.
Return None
if there is less than i + 1
multibody links.
Mutable reference to the multibody link with the given id.
Return None
if the given id does not identifies a multibody link part of self
.
pub fn links_with_name(
&'a self,
name: &'a str
) -> impl Iterator<Item = (usize, &'a MultibodyLink)>
pub fn links_with_name(
&'a self,
name: &'a str
) -> impl Iterator<Item = (usize, &'a MultibodyLink)>
The links of this multibody with the given name
.
Iterator through all the links of this multibody.
All link are guaranteed to be yielded before its descendant.
Mutable iterator through all the links of this multibody.
All link are guaranteed to be yielded before its descendant.
The vector of damping applied to this multibody.
pub fn damping_mut(
&mut self
) -> &mut Matrix<f32, Dynamic, Const<1_usize>, VecStorage<f32, Dynamic, Const<1_usize>>>
pub fn damping_mut(
&mut self
) -> &mut Matrix<f32, Dynamic, Const<1_usize>, VecStorage<f32, Dynamic, Const<1_usize>>>
Mutable vector of damping applied to this multibody.
pub fn add_link(
&mut self,
parent: Option<usize>,
dof: MultibodyJoint,
body: RigidBodyHandle
) -> &mut MultibodyLink
pub fn update_acceleration<Bodies>(&mut self, bodies: &Bodies) where
Bodies: ComponentSet<RigidBodyMassProps> + ComponentSet<RigidBodyForces> + ComponentSet<RigidBodyVelocity>,
pub fn update_dynamics<Bodies>(&mut self, dt: f32, bodies: &mut Bodies) where
Bodies: ComponentSetMut<RigidBodyVelocity> + ComponentSet<RigidBodyMassProps>,
pub fn update_dynamics<Bodies>(&mut self, dt: f32, bodies: &mut Bodies) where
Bodies: ComponentSetMut<RigidBodyVelocity> + ComponentSet<RigidBodyMassProps>,
Computes the constant terms of the dynamics.
pub fn generalized_acceleration(
&self
) -> Matrix<f32, Dynamic, Const<1_usize>, SliceStorage<'_, f32, Dynamic, Const<1_usize>, Const<1_usize>, Dynamic>>
pub fn generalized_velocity(
&self
) -> Matrix<f32, Dynamic, Const<1_usize>, SliceStorage<'_, f32, Dynamic, Const<1_usize>, Const<1_usize>, Dynamic>>
pub fn generalized_velocity_mut(
&mut self
) -> Matrix<f32, Dynamic, Const<1_usize>, SliceStorageMut<'_, f32, Dynamic, Const<1_usize>, Const<1_usize>, Dynamic>>
pub fn update_root_type<Bodies>(&mut self, bodies: &mut Bodies) where
Bodies: ComponentSet<RigidBodyType> + ComponentSet<RigidBodyPosition>,
pub fn forward_kinematics_next<Bodies>(
&mut self,
bodies: &mut Bodies,
update_mass_props: bool
) where
Bodies: ComponentSet<RigidBodyType> + ComponentSetMut<RigidBodyMassProps> + ComponentSetMut<RigidBodyPosition>,
pub fn fill_jacobians(
&self,
link_id: usize,
unit_force: Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 2_usize, 1_usize>>,
unit_torque: Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, {_: usize}, 1_usize>>,
j_id: &mut usize,
jacobians: &mut Matrix<f32, Dynamic, Const<1_usize>, VecStorage<f32, Dynamic, Const<1_usize>>>
) -> (f32, f32)
pub fn generate_internal_constraints(
&self,
params: &IntegrationParameters,
j_id: &mut usize,
jacobians: &mut Matrix<f32, Dynamic, Const<1_usize>, VecStorage<f32, Dynamic, Const<1_usize>>>,
out: &mut Vec<AnyJointVelocityConstraint, Global>
)
Auto Trait Implementations
impl RefUnwindSafe for Multibody
impl UnwindSafe for Multibody
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more