Struct nphysics3d::object::Multibody [−][src]
pub struct Multibody<N: Real> { /* fields omitted */ }
An articulated body simulated using the reduced-coordinates approach.
Methods
impl<N: Real> Multibody<N>
[src]
impl<N: Real> Multibody<N>
pub fn new() -> Self
[src]
pub fn new() -> Self
Creates a new multibody with no link.
pub fn handle(&self) -> BodyHandle
[src]
pub fn handle(&self) -> BodyHandle
The handle of this multibody.
This is the same as the handle of the link at the root of the multibody's kinematic tree.
pub fn activation_status(&self) -> &ActivationStatus<N>
[src]
pub fn activation_status(&self) -> &ActivationStatus<N>
Informations regarding activation and deactivation (sleeping) of this multibody.
pub fn activation_status_mut(&mut self) -> &mut ActivationStatus<N>
[src]
pub fn activation_status_mut(&mut self) -> &mut ActivationStatus<N>
Mutable informations regarding activation and deactivation (sleeping) of this multibody.
pub fn activate(&mut self)
[src]
pub fn activate(&mut self)
Force the activation of this multibody link.
pub fn activate_with_energy(&mut self, energy: N)
[src]
pub fn activate_with_energy(&mut self, energy: N)
Force the activation of this multibody link with the given level of energy.
pub fn deactivate(&mut self)
[src]
pub fn deactivate(&mut self)
Put this multibody to sleep.
pub fn is_active(&self) -> bool
[src]
pub fn is_active(&self) -> bool
Return true
if this multibody is kinematic or dynamic and awake.
pub fn status(&self) -> BodyStatus
[src]
pub fn status(&self) -> BodyStatus
The status of this multibody.
pub fn set_status(&mut self, status: BodyStatus)
[src]
pub fn set_status(&mut self, status: BodyStatus)
Set the status of this body.
pub fn companion_id(&self) -> usize
[src]
pub fn companion_id(&self) -> usize
The companion ID of this multibody.
pub fn set_companion_id(&mut self, id: usize)
[src]
pub fn set_companion_id(&mut self, id: usize)
Set the companion ID of this multibody.
This value may be overriden by nphysics during a timestep.
pub fn is_dynamic(&self) -> bool
[src]
pub fn is_dynamic(&self) -> bool
Whether or not the status of this multibody is dynamic.
pub fn is_static(&self) -> bool
[src]
pub fn is_static(&self) -> bool
Whether or not the status of this multibody is static.
pub fn is_kinematic(&self) -> bool
[src]
pub fn is_kinematic(&self) -> bool
Whether or not the status of this multibody is kinematic.
pub fn ndofs(&self) -> usize
[src]
pub fn ndofs(&self) -> usize
The total number of degrees of freedom of this multibody.
ⓘImportant traits for MultibodyLinks<'a, N>pub fn links(&self) -> MultibodyLinks<N>
[src]
pub fn links(&self) -> MultibodyLinks<N>
Iterator through all the links of this multibody.alloc_jemalloc
All link are guarenteed to be yielded before its descendet.
pub fn link(&self, rb_id: MultibodyLinkId) -> MultibodyLinkRef<N>
[src]
pub fn link(&self, rb_id: MultibodyLinkId) -> MultibodyLinkRef<N>
Get a reference to a specific multibody link.
pub fn link_mut(&mut self, rb_id: MultibodyLinkId) -> MultibodyLinkMut<N>
[src]
pub fn link_mut(&mut self, rb_id: MultibodyLinkId) -> MultibodyLinkMut<N>
Get a mutable reference to a specific multibody link.
pub fn generalized_velocity(&self) -> DVectorSlice<N>
[src]
pub fn generalized_velocity(&self) -> DVectorSlice<N>
The vector of generalized velocities of this multibody.
pub fn generalized_velocity_slice(&self) -> &[N]
[src]
pub fn generalized_velocity_slice(&self) -> &[N]
The slice of generalized velocities of this multibody.
pub fn generalized_velocity_mut(&mut self) -> DVectorSliceMut<N>
[src]
pub fn generalized_velocity_mut(&mut self) -> DVectorSliceMut<N>
The mutable vector of generalized velocities of this multibody.
pub fn generalized_velocity_slice_mut(&mut self) -> &mut [N]
[src]
pub fn generalized_velocity_slice_mut(&mut self) -> &mut [N]
The mutable slice of generalized velocities of this multibody.
pub fn generalized_acceleration(&self) -> DVectorSlice<N>
[src]
pub fn generalized_acceleration(&self) -> DVectorSlice<N>
The vector of generalized accelerations of this multibody.
pub fn damping(&self) -> DVectorSlice<N>
[src]
pub fn damping(&self) -> DVectorSlice<N>
The vector of damping applied to this multibody.
pub fn damping_mut(&mut self) -> DVectorSliceMut<N>
[src]
pub fn damping_mut(&mut self) -> DVectorSliceMut<N>
Mutable vector of damping applied to this multibody.
pub fn impulses(&self) -> DVectorSlice<N>
[src]
pub fn impulses(&self) -> DVectorSlice<N>
Generalized impulses applied to each degree of freedom.
pub fn remove_links(self, links: &[MultibodyLinkId]) -> Vec<Multibody<N>>
[src]
pub fn remove_links(self, links: &[MultibodyLinkId]) -> Vec<Multibody<N>>
Remove a set of links from this multibody.
pub fn integrate(&mut self, params: &IntegrationParameters<N>)
[src]
pub fn integrate(&mut self, params: &IntegrationParameters<N>)
Integrate the position of all the links of this multibody.
pub fn apply_displacement(&mut self, disp: &[N])
[src]
pub fn apply_displacement(&mut self, disp: &[N])
Apply a displacement to each degrees of freedom of this multibody.
pub fn clear_dynamics(&mut self)
[src]
pub fn clear_dynamics(&mut self)
Reset the timestep-specific dynamic information of this multibody.
pub fn update_kinematics(&mut self)
[src]
pub fn update_kinematics(&mut self)
Updates the positions of the rigid bodies.
pub fn update_dynamics(
&mut self,
gravity: &Vector<N>,
params: &IntegrationParameters<N>,
workspace: &mut MultibodyWorkspace<N>
)
[src]
pub fn update_dynamics(
&mut self,
gravity: &Vector<N>,
params: &IntegrationParameters<N>,
workspace: &mut MultibodyWorkspace<N>
)
Computes the constant terms of the dynamics.
pub fn body_jacobian_mul_force(
&self,
rb_id: MultibodyLinkId,
force: &Force<N>,
out: &mut [N]
)
[src]
pub fn body_jacobian_mul_force(
&self,
rb_id: MultibodyLinkId,
force: &Force<N>,
out: &mut [N]
)
Convert a force applied to the center of mass of the link rb_id
into generalized force.
pub fn inv_mass_mul_generalized_forces(&self, generalized_force: &mut [N])
[src]
pub fn inv_mass_mul_generalized_forces(&self, generalized_force: &mut [N])
Convert generalized forces applied to this multibody into generalized accelerations.
pub fn inv_mass_mul_force(
&self,
rb_id: MultibodyLinkId,
force: &Force<N>,
out: &mut [N]
)
[src]
pub fn inv_mass_mul_force(
&self,
rb_id: MultibodyLinkId,
force: &Force<N>,
out: &mut [N]
)
Convert a force applied to this multibody's link rb_id
center of mass into generalized accelerations.
pub fn inv_mass_mul_unit_joint_force(
&self,
rb_id: MultibodyLinkId,
dof_id: usize,
force: N,
out: &mut [N]
)
[src]
pub fn inv_mass_mul_unit_joint_force(
&self,
rb_id: MultibodyLinkId,
dof_id: usize,
force: N,
out: &mut [N]
)
Convert a generalized force applied to le link rb_id
's degrees of freedom into generalized accelerations.
The joint attaching this link to its parent is assumed to be a unit joint.
pub fn inv_mass_mul_joint_force(
&self,
rb_id: MultibodyLinkId,
force: DVectorSlice<N>,
out: &mut [N]
)
[src]
pub fn inv_mass_mul_joint_force(
&self,
rb_id: MultibodyLinkId,
force: DVectorSlice<N>,
out: &mut [N]
)
Convert a generalized force applied to the link rb_id
's degrees of freedom into generalized accelerations.
pub fn augmented_mass(&self) -> &DMatrix<N>
[src]
pub fn augmented_mass(&self) -> &DMatrix<N>
The augmented mass (inluding gyroscropic and coriolis terms) in world-space of this multibody.
pub fn constraints(
&mut self,
params: &IntegrationParameters<N>,
ext_vels: &DVector<N>,
ground_j_id: &mut usize,
jacobians: &mut [N],
constraints: &mut ConstraintSet<N>
)
[src]
pub fn constraints(
&mut self,
params: &IntegrationParameters<N>,
ext_vels: &DVector<N>,
ground_j_id: &mut usize,
jacobians: &mut [N],
constraints: &mut ConstraintSet<N>
)
Generates the set of velocity and position constraints needed for joint limits and motors at each link of this multibody.
pub fn cache_impulses(&mut self, constraints: &ConstraintSet<N>)
[src]
pub fn cache_impulses(&mut self, constraints: &ConstraintSet<N>)
Store impulses computed by the solver for joint limits and motors.