[−][src]Trait nphysics2d::object::Body
Trait implemented by all bodies supported by nphysics.
Required methods
fn name(&self) -> &str
The name of this body.
fn set_name(&mut self, name: String)
Sets the name of this body.
fn update_kinematics(&mut self)
Updates the kinematics, e.g., positions and jacobians, of this body.
fn update_dynamics(&mut self, dt: N)
Update the dynamics property of this body.
fn update_acceleration(
&mut self,
gravity: &Vector<N>,
params: &IntegrationParameters<N>
)
&mut self,
gravity: &Vector<N>,
params: &IntegrationParameters<N>
)
Update the acceleration of this body given the forces it is subject to and the gravity.
fn clear_forces(&mut self)
Reset the timestep-specific dynamic information of this body.
fn clear_update_flags(&mut self)
Clear all the update flags of this body.
fn update_status(&self) -> BodyUpdateStatus
The flags tracking what modifications were applied to a body.
fn apply_displacement(&mut self, disp: &[N])
Applies a generalized displacement to this body.
fn handle(&self) -> BodyHandle
The handle of this body.
fn status(&self) -> BodyStatus
The status of this body.
fn set_status(&mut self, status: BodyStatus)
Set the status of this body.
fn activation_status(&self) -> &ActivationStatus<N>
Information regarding activation and deactivation (sleeping) of this body.
fn set_deactivation_threshold(&mut self, threshold: Option<N>)
Sets the energy bellow which this body is put to sleep.
If set to None
the body will never sleep.
fn ndofs(&self) -> usize
The number of degrees of freedom of this body.
fn generalized_acceleration(&self) -> DVectorSlice<N>
The generalized accelerations at each degree of freedom of this body.
fn generalized_velocity(&self) -> DVectorSlice<N>
The generalized velocities of this body.
fn companion_id(&self) -> usize
The companion ID of this body.
fn set_companion_id(&mut self, id: usize)
Set the companion ID of this body (may be reinitialized by nphysics).
fn generalized_velocity_mut(&mut self) -> DVectorSliceMut<N>
The mutable generalized velocities of this body.
fn integrate(&mut self, params: &IntegrationParameters<N>)
Integrate the position of this body.
fn activate_with_energy(&mut self, energy: N)
Force the activation of this body with the given level of energy.
fn deactivate(&mut self)
Put this body to sleep.
fn part(&self, i: usize) -> Option<&dyn BodyPart<N>>
A reference to the specified body part.
fn deformed_positions(&self) -> Option<(DeformationsType, &[N])>
If this is a deformable body, returns its deformed positions.
fn deformed_positions_mut(&mut self) -> Option<(DeformationsType, &mut [N])>
If this is a deformable body, returns a mutable reference to its deformed positions.
fn fill_constraint_geometry(
&self,
part: &dyn BodyPart<N>,
ndofs: usize,
center: &Point<N>,
dir: &ForceDirection<N>,
j_id: usize,
wj_id: usize,
jacobians: &mut [N],
inv_r: &mut N,
ext_vels: Option<&DVectorSlice<N>>,
out_vel: Option<&mut N>
)
&self,
part: &dyn BodyPart<N>,
ndofs: usize,
center: &Point<N>,
dir: &ForceDirection<N>,
j_id: usize,
wj_id: usize,
jacobians: &mut [N],
inv_r: &mut N,
ext_vels: Option<&DVectorSlice<N>>,
out_vel: Option<&mut N>
)
Fills all the jacobians (and the jacobians multiplied by the inverse augmented mass matrix) for a
constraint applying a force at the point center
(relative to the body part's center of mass) and
the direction dir
.
If the force is a torque, it is applied at the center of mass of the body part.
fn world_point_at_material_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
Transform the given point expressed in material coordinates to world-space.
fn position_at_material_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Isometry<N>
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Isometry<N>
Transform the given point expressed in material coordinates to world-space.
fn material_point_at_world_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
Transform the given point expressed in material coordinates to world-space.
fn has_active_internal_constraints(&mut self) -> bool
Returns true
if this bodies contains internal constraints that need to be solved.
fn setup_internal_velocity_constraints(
&mut self,
ext_vels: &DVectorSlice<N>,
params: &IntegrationParameters<N>
)
&mut self,
ext_vels: &DVectorSlice<N>,
params: &IntegrationParameters<N>
)
Initializes the internal velocity constraints of a body.
fn warmstart_internal_velocity_constraints(
&mut self,
dvels: &mut DVectorSliceMut<N>
)
&mut self,
dvels: &mut DVectorSliceMut<N>
)
For warmstarting the solver, modifies the delta velocity applied by the internal constraints of this body.
fn step_solve_internal_velocity_constraints(
&mut self,
dvels: &mut DVectorSliceMut<N>
)
&mut self,
dvels: &mut DVectorSliceMut<N>
)
Execute one step for the iterative resolution of this body's internal velocity constraints.
fn step_solve_internal_position_constraints(
&mut self,
params: &IntegrationParameters<N>
)
&mut self,
params: &IntegrationParameters<N>
)
Execute one step for the iterative resolution of this body's internal position constraints.
fn gravity_enabled(&self) -> bool
Whether this body is affected by gravity.
fn enable_gravity(&mut self, enabled: bool)
Enable or disable gravity for this body.
fn apply_force(
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
Apply a force at the center of mass of a part of this body.
fn apply_local_force(
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
Apply a local force at the center of mass of a part of this body.
fn apply_force_at_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
Apply a force at a given point of a part of this body.
fn apply_local_force_at_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
Apply a local force at a given point of a part of this body.
fn apply_force_at_local_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
Apply a force at a given local point of a part of this body.
fn apply_local_force_at_local_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
Apply a local force at a given local point of a part of this body.
Provided methods
fn is_ground(&self) -> bool
Returns true
if this body is the ground.
fn update_activation_status(&mut self)
Update whether this body needs to be waken up after a user-interaction.
fn add_local_inertia_and_com(
&mut self,
_part_index: usize,
_com: Point<N>,
_inertia: Inertia<N>
)
&mut self,
_part_index: usize,
_com: Point<N>,
_inertia: Inertia<N>
)
Add the given inertia to the local inertia of this body part.
fn status_dependent_ndofs(&self) -> usize
The number of degrees of freedom (DOF) of this body, taking its status into account.
In particular, this returns 0 for any body with a status different than BodyStatus::Dynamic
.
fn status_dependent_body_part_velocity(
&self,
part: &dyn BodyPart<N>
) -> Velocity<N>
&self,
part: &dyn BodyPart<N>
) -> Velocity<N>
The velocity of the specified body part, taking this body status into account.
This will return a zero velocity for any body with a status different than BodyStatus::Dynamic
.
fn is_active(&self) -> bool
Check if this body is active.
fn is_dynamic(&self) -> bool
Whether or not the status of this body is dynamic.
fn is_kinematic(&self) -> bool
Whether or not the status of this body is kinematic.
fn is_static(&self) -> bool
Whether or not the status of this body is static.
fn activate(&mut self)
Force the activation of this body.
Methods
impl<N> dyn Body<N> where
N: Any + 'static,
N: Real,
N: Any + 'static,
N: Real,
pub fn is<__T: Body<N>>(&self) -> bool
Returns true if the trait object wraps an object of type __T
.
pub fn downcast<__T: Body<N>>(self: Box<Self>) -> Result<Box<__T>, Box<Self>>
Returns a boxed object from a boxed trait object if the underlying object is of type
__T
. Returns the original boxed trait if it isn't.
pub fn downcast_ref<__T: Body<N>>(&self) -> Option<&__T>
Returns a reference to the object within the trait object if it is of type __T
, or
None
if it isn't.
pub fn downcast_mut<__T: Body<N>>(&mut self) -> Option<&mut __T>
Returns a mutable reference to the object within the trait object if it is of type
__T
, or None
if it isn't.
Implementors
impl<N: Real> Body<N> for FEMSurface<N>
[src]
fn name(&self) -> &str
[src]
fn set_name(&mut self, name: String)
[src]
fn gravity_enabled(&self) -> bool
[src]
fn enable_gravity(&mut self, enabled: bool)
[src]
fn deformed_positions(&self) -> Option<(DeformationsType, &[N])>
[src]
fn deformed_positions_mut(&mut self) -> Option<(DeformationsType, &mut [N])>
[src]
fn update_kinematics(&mut self)
[src]
fn update_dynamics(&mut self, dt: N)
[src]
Update the dynamics property of this deformable surface.
fn update_acceleration(
&mut self,
gravity: &Vector<N>,
params: &IntegrationParameters<N>
)
[src]
&mut self,
gravity: &Vector<N>,
params: &IntegrationParameters<N>
)
Update the dynamics property of this deformable surface.
fn clear_forces(&mut self)
[src]
fn clear_update_flags(&mut self)
[src]
fn update_status(&self) -> BodyUpdateStatus
[src]
fn apply_displacement(&mut self, disp: &[N])
[src]
fn handle(&self) -> BodyHandle
[src]
fn status(&self) -> BodyStatus
[src]
fn set_status(&mut self, status: BodyStatus)
[src]
fn activation_status(&self) -> &ActivationStatus<N>
[src]
fn ndofs(&self) -> usize
[src]
fn generalized_acceleration(&self) -> DVectorSlice<N>
[src]
fn generalized_velocity(&self) -> DVectorSlice<N>
[src]
fn companion_id(&self) -> usize
[src]
fn set_companion_id(&mut self, id: usize)
[src]
fn generalized_velocity_mut(&mut self) -> DVectorSliceMut<N>
[src]
fn integrate(&mut self, params: &IntegrationParameters<N>)
[src]
fn activate_with_energy(&mut self, energy: N)
[src]
fn deactivate(&mut self)
[src]
fn set_deactivation_threshold(&mut self, threshold: Option<N>)
[src]
fn part(&self, id: usize) -> Option<&dyn BodyPart<N>>
[src]
fn world_point_at_material_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
[src]
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
fn position_at_material_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Isometry<N>
[src]
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Isometry<N>
fn material_point_at_world_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
[src]
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
fn fill_constraint_geometry(
&self,
part: &dyn BodyPart<N>,
_: usize,
center: &Point<N>,
force_dir: &ForceDirection<N>,
j_id: usize,
wj_id: usize,
jacobians: &mut [N],
inv_r: &mut N,
ext_vels: Option<&DVectorSlice<N>>,
out_vel: Option<&mut N>
)
[src]
&self,
part: &dyn BodyPart<N>,
_: usize,
center: &Point<N>,
force_dir: &ForceDirection<N>,
j_id: usize,
wj_id: usize,
jacobians: &mut [N],
inv_r: &mut N,
ext_vels: Option<&DVectorSlice<N>>,
out_vel: Option<&mut N>
)
fn has_active_internal_constraints(&mut self) -> bool
[src]
fn setup_internal_velocity_constraints(
&mut self,
_: &DVectorSlice<N>,
_: &IntegrationParameters<N>
)
[src]
&mut self,
_: &DVectorSlice<N>,
_: &IntegrationParameters<N>
)
fn warmstart_internal_velocity_constraints(
&mut self,
_: &mut DVectorSliceMut<N>
)
[src]
&mut self,
_: &mut DVectorSliceMut<N>
)
fn step_solve_internal_velocity_constraints(
&mut self,
_: &mut DVectorSliceMut<N>
)
[src]
&mut self,
_: &mut DVectorSliceMut<N>
)
fn step_solve_internal_position_constraints(
&mut self,
_: &IntegrationParameters<N>
)
[src]
&mut self,
_: &IntegrationParameters<N>
)
fn apply_force_at_local_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_force(
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force(
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_force_at_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force_at_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force_at_local_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn is_ground(&self) -> bool
[src]
fn update_activation_status(&mut self)
[src]
fn add_local_inertia_and_com(
&mut self,
_part_index: usize,
_com: Point<N>,
_inertia: Inertia<N>
)
[src]
&mut self,
_part_index: usize,
_com: Point<N>,
_inertia: Inertia<N>
)
fn status_dependent_ndofs(&self) -> usize
[src]
fn status_dependent_body_part_velocity(
&self,
part: &dyn BodyPart<N>
) -> Velocity<N>
[src]
&self,
part: &dyn BodyPart<N>
) -> Velocity<N>
fn is_active(&self) -> bool
[src]
fn is_dynamic(&self) -> bool
[src]
fn is_kinematic(&self) -> bool
[src]
fn is_static(&self) -> bool
[src]
fn activate(&mut self)
[src]
impl<N: Real> Body<N> for Ground<N>
[src]
fn name(&self) -> &str
[src]
fn set_name(&mut self, name: String)
[src]
fn gravity_enabled(&self) -> bool
[src]
fn enable_gravity(&mut self, _: bool)
[src]
fn update_kinematics(&mut self)
[src]
fn update_dynamics(&mut self, _: N)
[src]
fn update_acceleration(&mut self, _: &Vector<N>, _: &IntegrationParameters<N>)
[src]
fn clear_forces(&mut self)
[src]
fn clear_update_flags(&mut self)
[src]
fn update_status(&self) -> BodyUpdateStatus
[src]
fn part(&self, _: usize) -> Option<&dyn BodyPart<N>>
[src]
fn is_ground(&self) -> bool
[src]
fn apply_displacement(&mut self, _: &[N])
[src]
fn handle(&self) -> BodyHandle
[src]
fn status(&self) -> BodyStatus
[src]
fn set_status(&mut self, _: BodyStatus)
[src]
fn activation_status(&self) -> &ActivationStatus<N>
[src]
fn is_active(&self) -> bool
[src]
fn is_dynamic(&self) -> bool
[src]
fn is_kinematic(&self) -> bool
[src]
fn is_static(&self) -> bool
[src]
fn deformed_positions(&self) -> Option<(DeformationsType, &[N])>
[src]
fn deformed_positions_mut(&mut self) -> Option<(DeformationsType, &mut [N])>
[src]
fn ndofs(&self) -> usize
[src]
fn generalized_acceleration(&self) -> DVectorSlice<N>
[src]
fn generalized_velocity(&self) -> DVectorSlice<N>
[src]
fn companion_id(&self) -> usize
[src]
fn set_companion_id(&mut self, id: usize)
[src]
fn generalized_velocity_mut(&mut self) -> DVectorSliceMut<N>
[src]
fn integrate(&mut self, _: &IntegrationParameters<N>)
[src]
fn activate(&mut self)
[src]
fn activate_with_energy(&mut self, _: N)
[src]
fn deactivate(&mut self)
[src]
fn set_deactivation_threshold(&mut self, _: Option<N>)
[src]
fn world_point_at_material_point(
&self,
_: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
[src]
&self,
_: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
fn position_at_material_point(
&self,
_: &dyn BodyPart<N>,
point: &Point<N>
) -> Isometry<N>
[src]
&self,
_: &dyn BodyPart<N>,
point: &Point<N>
) -> Isometry<N>
fn material_point_at_world_point(
&self,
_: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
[src]
&self,
_: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
fn fill_constraint_geometry(
&self,
_: &dyn BodyPart<N>,
_: usize,
_: &Point<N>,
_: &ForceDirection<N>,
_: usize,
_: usize,
_: &mut [N],
_: &mut N,
_: Option<&DVectorSlice<N>>,
_: Option<&mut N>
)
[src]
&self,
_: &dyn BodyPart<N>,
_: usize,
_: &Point<N>,
_: &ForceDirection<N>,
_: usize,
_: usize,
_: &mut [N],
_: &mut N,
_: Option<&DVectorSlice<N>>,
_: Option<&mut N>
)
fn has_active_internal_constraints(&mut self) -> bool
[src]
fn setup_internal_velocity_constraints(
&mut self,
_: &DVectorSlice<N>,
_: &IntegrationParameters<N>
)
[src]
&mut self,
_: &DVectorSlice<N>,
_: &IntegrationParameters<N>
)
fn warmstart_internal_velocity_constraints(
&mut self,
_: &mut DVectorSliceMut<N>
)
[src]
&mut self,
_: &mut DVectorSliceMut<N>
)
fn step_solve_internal_velocity_constraints(
&mut self,
_: &mut DVectorSliceMut<N>
)
[src]
&mut self,
_: &mut DVectorSliceMut<N>
)
fn step_solve_internal_position_constraints(
&mut self,
_: &IntegrationParameters<N>
)
[src]
&mut self,
_: &IntegrationParameters<N>
)
fn apply_force(&mut self, _: usize, _: &Force<N>, _: ForceType, _: bool)
[src]
fn apply_local_force(&mut self, _: usize, _: &Force<N>, _: ForceType, _: bool)
[src]
fn apply_force_at_point(
&mut self,
_: usize,
_: &Vector<N>,
_: &Point<N>,
_: ForceType,
_: bool
)
[src]
&mut self,
_: usize,
_: &Vector<N>,
_: &Point<N>,
_: ForceType,
_: bool
)
fn apply_local_force_at_point(
&mut self,
_: usize,
_: &Vector<N>,
_: &Point<N>,
_: ForceType,
_: bool
)
[src]
&mut self,
_: usize,
_: &Vector<N>,
_: &Point<N>,
_: ForceType,
_: bool
)
fn apply_force_at_local_point(
&mut self,
_: usize,
_: &Vector<N>,
_: &Point<N>,
_: ForceType,
_: bool
)
[src]
&mut self,
_: usize,
_: &Vector<N>,
_: &Point<N>,
_: ForceType,
_: bool
)
fn apply_local_force_at_local_point(
&mut self,
_: usize,
_: &Vector<N>,
_: &Point<N>,
_: ForceType,
_: bool
)
[src]
&mut self,
_: usize,
_: &Vector<N>,
_: &Point<N>,
_: ForceType,
_: bool
)
fn update_activation_status(&mut self)
[src]
fn add_local_inertia_and_com(
&mut self,
_part_index: usize,
_com: Point<N>,
_inertia: Inertia<N>
)
[src]
&mut self,
_part_index: usize,
_com: Point<N>,
_inertia: Inertia<N>
)
fn status_dependent_ndofs(&self) -> usize
[src]
fn status_dependent_body_part_velocity(
&self,
part: &dyn BodyPart<N>
) -> Velocity<N>
[src]
&self,
part: &dyn BodyPart<N>
) -> Velocity<N>
impl<N: Real> Body<N> for MassConstraintSystem<N>
[src]
fn name(&self) -> &str
[src]
fn set_name(&mut self, name: String)
[src]
fn gravity_enabled(&self) -> bool
[src]
fn enable_gravity(&mut self, enabled: bool)
[src]
fn update_kinematics(&mut self)
[src]
fn update_dynamics(&mut self, _: N)
[src]
fn update_acceleration(
&mut self,
gravity: &Vector<N>,
params: &IntegrationParameters<N>
)
[src]
&mut self,
gravity: &Vector<N>,
params: &IntegrationParameters<N>
)
fn clear_forces(&mut self)
[src]
fn apply_displacement(&mut self, disp: &[N])
[src]
fn handle(&self) -> BodyHandle
[src]
fn status(&self) -> BodyStatus
[src]
fn set_status(&mut self, status: BodyStatus)
[src]
fn clear_update_flags(&mut self)
[src]
fn update_status(&self) -> BodyUpdateStatus
[src]
fn activation_status(&self) -> &ActivationStatus<N>
[src]
fn set_deactivation_threshold(&mut self, threshold: Option<N>)
[src]
fn ndofs(&self) -> usize
[src]
fn generalized_acceleration(&self) -> DVectorSlice<N>
[src]
fn generalized_velocity(&self) -> DVectorSlice<N>
[src]
fn companion_id(&self) -> usize
[src]
fn set_companion_id(&mut self, id: usize)
[src]
fn generalized_velocity_mut(&mut self) -> DVectorSliceMut<N>
[src]
fn integrate(&mut self, params: &IntegrationParameters<N>)
[src]
fn activate_with_energy(&mut self, energy: N)
[src]
fn deactivate(&mut self)
[src]
fn part(&self, id: usize) -> Option<&dyn BodyPart<N>>
[src]
fn deformed_positions(&self) -> Option<(DeformationsType, &[N])>
[src]
fn deformed_positions_mut(&mut self) -> Option<(DeformationsType, &mut [N])>
[src]
fn world_point_at_material_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
[src]
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
fn position_at_material_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Isometry<N>
[src]
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Isometry<N>
fn material_point_at_world_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
[src]
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
fn fill_constraint_geometry(
&self,
part: &dyn BodyPart<N>,
_: usize,
center: &Point<N>,
force_dir: &ForceDirection<N>,
j_id: usize,
wj_id: usize,
jacobians: &mut [N],
inv_r: &mut N,
ext_vels: Option<&DVectorSlice<N>>,
out_vel: Option<&mut N>
)
[src]
&self,
part: &dyn BodyPart<N>,
_: usize,
center: &Point<N>,
force_dir: &ForceDirection<N>,
j_id: usize,
wj_id: usize,
jacobians: &mut [N],
inv_r: &mut N,
ext_vels: Option<&DVectorSlice<N>>,
out_vel: Option<&mut N>
)
fn has_active_internal_constraints(&mut self) -> bool
[src]
fn setup_internal_velocity_constraints(
&mut self,
_: &DVectorSlice<N>,
_: &IntegrationParameters<N>
)
[src]
&mut self,
_: &DVectorSlice<N>,
_: &IntegrationParameters<N>
)
fn warmstart_internal_velocity_constraints(
&mut self,
dvels: &mut DVectorSliceMut<N>
)
[src]
&mut self,
dvels: &mut DVectorSliceMut<N>
)
fn step_solve_internal_velocity_constraints(
&mut self,
dvels: &mut DVectorSliceMut<N>
)
[src]
&mut self,
dvels: &mut DVectorSliceMut<N>
)
fn step_solve_internal_position_constraints(
&mut self,
params: &IntegrationParameters<N>
)
[src]
&mut self,
params: &IntegrationParameters<N>
)
fn apply_force_at_local_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_force(
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force(
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_force_at_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force_at_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force_at_local_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn is_ground(&self) -> bool
[src]
fn update_activation_status(&mut self)
[src]
fn add_local_inertia_and_com(
&mut self,
_part_index: usize,
_com: Point<N>,
_inertia: Inertia<N>
)
[src]
&mut self,
_part_index: usize,
_com: Point<N>,
_inertia: Inertia<N>
)
fn status_dependent_ndofs(&self) -> usize
[src]
fn status_dependent_body_part_velocity(
&self,
part: &dyn BodyPart<N>
) -> Velocity<N>
[src]
&self,
part: &dyn BodyPart<N>
) -> Velocity<N>
fn is_active(&self) -> bool
[src]
fn is_dynamic(&self) -> bool
[src]
fn is_kinematic(&self) -> bool
[src]
fn is_static(&self) -> bool
[src]
fn activate(&mut self)
[src]
impl<N: Real> Body<N> for MassSpringSystem<N>
[src]
fn name(&self) -> &str
[src]
fn set_name(&mut self, name: String)
[src]
fn gravity_enabled(&self) -> bool
[src]
fn enable_gravity(&mut self, enabled: bool)
[src]
fn update_kinematics(&mut self)
[src]
fn update_dynamics(&mut self, dt: N)
[src]
fn update_acceleration(
&mut self,
gravity: &Vector<N>,
params: &IntegrationParameters<N>
)
[src]
&mut self,
gravity: &Vector<N>,
params: &IntegrationParameters<N>
)
fn clear_forces(&mut self)
[src]
fn apply_displacement(&mut self, disp: &[N])
[src]
fn handle(&self) -> BodyHandle
[src]
fn status(&self) -> BodyStatus
[src]
fn set_status(&mut self, status: BodyStatus)
[src]
fn clear_update_flags(&mut self)
[src]
fn update_status(&self) -> BodyUpdateStatus
[src]
fn activation_status(&self) -> &ActivationStatus<N>
[src]
fn set_deactivation_threshold(&mut self, threshold: Option<N>)
[src]
fn ndofs(&self) -> usize
[src]
fn generalized_acceleration(&self) -> DVectorSlice<N>
[src]
fn generalized_velocity(&self) -> DVectorSlice<N>
[src]
fn companion_id(&self) -> usize
[src]
fn set_companion_id(&mut self, id: usize)
[src]
fn generalized_velocity_mut(&mut self) -> DVectorSliceMut<N>
[src]
fn integrate(&mut self, params: &IntegrationParameters<N>)
[src]
fn activate_with_energy(&mut self, energy: N)
[src]
fn deactivate(&mut self)
[src]
fn part(&self, id: usize) -> Option<&dyn BodyPart<N>>
[src]
fn deformed_positions(&self) -> Option<(DeformationsType, &[N])>
[src]
fn deformed_positions_mut(&mut self) -> Option<(DeformationsType, &mut [N])>
[src]
fn world_point_at_material_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
[src]
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
fn position_at_material_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Isometry<N>
[src]
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Isometry<N>
fn material_point_at_world_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
[src]
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
fn fill_constraint_geometry(
&self,
part: &dyn BodyPart<N>,
_: usize,
center: &Point<N>,
force_dir: &ForceDirection<N>,
j_id: usize,
wj_id: usize,
jacobians: &mut [N],
inv_r: &mut N,
ext_vels: Option<&DVectorSlice<N>>,
out_vel: Option<&mut N>
)
[src]
&self,
part: &dyn BodyPart<N>,
_: usize,
center: &Point<N>,
force_dir: &ForceDirection<N>,
j_id: usize,
wj_id: usize,
jacobians: &mut [N],
inv_r: &mut N,
ext_vels: Option<&DVectorSlice<N>>,
out_vel: Option<&mut N>
)
fn has_active_internal_constraints(&mut self) -> bool
[src]
fn setup_internal_velocity_constraints(
&mut self,
_: &DVectorSlice<N>,
_: &IntegrationParameters<N>
)
[src]
&mut self,
_: &DVectorSlice<N>,
_: &IntegrationParameters<N>
)
fn warmstart_internal_velocity_constraints(
&mut self,
_: &mut DVectorSliceMut<N>
)
[src]
&mut self,
_: &mut DVectorSliceMut<N>
)
fn step_solve_internal_velocity_constraints(
&mut self,
_: &mut DVectorSliceMut<N>
)
[src]
&mut self,
_: &mut DVectorSliceMut<N>
)
fn step_solve_internal_position_constraints(
&mut self,
_: &IntegrationParameters<N>
)
[src]
&mut self,
_: &IntegrationParameters<N>
)
fn apply_force_at_local_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_force(
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force(
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_force_at_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force_at_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force_at_local_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn is_ground(&self) -> bool
[src]
fn update_activation_status(&mut self)
[src]
fn add_local_inertia_and_com(
&mut self,
_part_index: usize,
_com: Point<N>,
_inertia: Inertia<N>
)
[src]
&mut self,
_part_index: usize,
_com: Point<N>,
_inertia: Inertia<N>
)
fn status_dependent_ndofs(&self) -> usize
[src]
fn status_dependent_body_part_velocity(
&self,
part: &dyn BodyPart<N>
) -> Velocity<N>
[src]
&self,
part: &dyn BodyPart<N>
) -> Velocity<N>
fn is_active(&self) -> bool
[src]
fn is_dynamic(&self) -> bool
[src]
fn is_kinematic(&self) -> bool
[src]
fn is_static(&self) -> bool
[src]
fn activate(&mut self)
[src]
impl<N: Real> Body<N> for Multibody<N>
[src]
fn name(&self) -> &str
[src]
fn set_name(&mut self, name: String)
[src]
fn part(&self, id: usize) -> Option<&dyn BodyPart<N>>
[src]
fn deformed_positions(&self) -> Option<(DeformationsType, &[N])>
[src]
fn deformed_positions_mut(&mut self) -> Option<(DeformationsType, &mut [N])>
[src]
fn clear_update_flags(&mut self)
[src]
fn update_status(&self) -> BodyUpdateStatus
[src]
fn integrate(&mut self, params: &IntegrationParameters<N>)
[src]
fn apply_displacement(&mut self, disp: &[N])
[src]
fn clear_forces(&mut self)
[src]
fn update_kinematics(&mut self)
[src]
fn update_dynamics(&mut self, dt: N)
[src]
fn update_acceleration(
&mut self,
gravity: &Vector<N>,
_: &IntegrationParameters<N>
)
[src]
&mut self,
gravity: &Vector<N>,
_: &IntegrationParameters<N>
)
fn generalized_acceleration(&self) -> DVectorSlice<N>
[src]
fn generalized_velocity(&self) -> DVectorSlice<N>
[src]
fn generalized_velocity_mut(&mut self) -> DVectorSliceMut<N>
[src]
fn gravity_enabled(&self) -> bool
[src]
fn enable_gravity(&mut self, enabled: bool)
[src]
fn handle(&self) -> BodyHandle
[src]
fn activation_status(&self) -> &ActivationStatus<N>
[src]
fn activate_with_energy(&mut self, energy: N)
[src]
fn deactivate(&mut self)
[src]
fn set_deactivation_threshold(&mut self, threshold: Option<N>)
[src]
fn set_status(&mut self, status: BodyStatus)
[src]
fn status(&self) -> BodyStatus
[src]
fn companion_id(&self) -> usize
[src]
fn set_companion_id(&mut self, id: usize)
[src]
fn ndofs(&self) -> usize
[src]
fn world_point_at_material_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
[src]
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
fn position_at_material_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Isometry<N>
[src]
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Isometry<N>
fn material_point_at_world_point(
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
[src]
&self,
part: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
fn fill_constraint_geometry(
&self,
part: &dyn BodyPart<N>,
ndofs: usize,
point: &Point<N>,
force_dir: &ForceDirection<N>,
j_id: usize,
wj_id: usize,
jacobians: &mut [N],
inv_r: &mut N,
ext_vels: Option<&DVectorSlice<N>>,
out_vel: Option<&mut N>
)
[src]
&self,
part: &dyn BodyPart<N>,
ndofs: usize,
point: &Point<N>,
force_dir: &ForceDirection<N>,
j_id: usize,
wj_id: usize,
jacobians: &mut [N],
inv_r: &mut N,
ext_vels: Option<&DVectorSlice<N>>,
out_vel: Option<&mut N>
)
fn has_active_internal_constraints(&mut self) -> bool
[src]
fn setup_internal_velocity_constraints(
&mut self,
ext_vels: &DVectorSlice<N>,
params: &IntegrationParameters<N>
)
[src]
&mut self,
ext_vels: &DVectorSlice<N>,
params: &IntegrationParameters<N>
)
fn warmstart_internal_velocity_constraints(
&mut self,
dvels: &mut DVectorSliceMut<N>
)
[src]
&mut self,
dvels: &mut DVectorSliceMut<N>
)
fn step_solve_internal_velocity_constraints(
&mut self,
dvels: &mut DVectorSliceMut<N>
)
[src]
&mut self,
dvels: &mut DVectorSliceMut<N>
)
fn step_solve_internal_position_constraints(
&mut self,
params: &IntegrationParameters<N>
)
[src]
&mut self,
params: &IntegrationParameters<N>
)
fn add_local_inertia_and_com(
&mut self,
part_id: usize,
com: Point<N>,
inertia: Inertia<N>
)
[src]
&mut self,
part_id: usize,
com: Point<N>,
inertia: Inertia<N>
)
fn apply_force(
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force(
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_force_at_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force_at_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_force_at_local_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force_at_local_point(
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
part_id: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn is_ground(&self) -> bool
[src]
fn update_activation_status(&mut self)
[src]
fn status_dependent_ndofs(&self) -> usize
[src]
fn status_dependent_body_part_velocity(
&self,
part: &dyn BodyPart<N>
) -> Velocity<N>
[src]
&self,
part: &dyn BodyPart<N>
) -> Velocity<N>
fn is_active(&self) -> bool
[src]
fn is_dynamic(&self) -> bool
[src]
fn is_kinematic(&self) -> bool
[src]
fn is_static(&self) -> bool
[src]
fn activate(&mut self)
[src]
impl<N: Real> Body<N> for RigidBody<N>
[src]
fn name(&self) -> &str
[src]
fn set_name(&mut self, name: String)
[src]
fn activation_status(&self) -> &ActivationStatus<N>
[src]
fn activate_with_energy(&mut self, energy: N)
[src]
fn deactivate(&mut self)
[src]
fn set_deactivation_threshold(&mut self, threshold: Option<N>)
[src]
fn update_status(&self) -> BodyUpdateStatus
[src]
fn status(&self) -> BodyStatus
[src]
fn set_status(&mut self, status: BodyStatus)
[src]
fn deformed_positions(&self) -> Option<(DeformationsType, &[N])>
[src]
fn deformed_positions_mut(&mut self) -> Option<(DeformationsType, &mut [N])>
[src]
fn companion_id(&self) -> usize
[src]
fn set_companion_id(&mut self, id: usize)
[src]
fn handle(&self) -> BodyHandle
[src]
fn ndofs(&self) -> usize
[src]
fn generalized_velocity(&self) -> DVectorSlice<N>
[src]
fn generalized_velocity_mut(&mut self) -> DVectorSliceMut<N>
[src]
fn generalized_acceleration(&self) -> DVectorSlice<N>
[src]
fn integrate(&mut self, params: &IntegrationParameters<N>)
[src]
fn clear_forces(&mut self)
[src]
fn clear_update_flags(&mut self)
[src]
fn update_kinematics(&mut self)
[src]
fn update_dynamics(&mut self, dt: N)
[src]
fn update_acceleration(
&mut self,
gravity: &Vector<N>,
_: &IntegrationParameters<N>
)
[src]
&mut self,
gravity: &Vector<N>,
_: &IntegrationParameters<N>
)
fn part(&self, _: usize) -> Option<&dyn BodyPart<N>>
[src]
fn apply_displacement(&mut self, displacement: &[N])
[src]
fn world_point_at_material_point(
&self,
_: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
[src]
&self,
_: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
fn position_at_material_point(
&self,
_: &dyn BodyPart<N>,
point: &Point<N>
) -> Isometry<N>
[src]
&self,
_: &dyn BodyPart<N>,
point: &Point<N>
) -> Isometry<N>
fn material_point_at_world_point(
&self,
_: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
[src]
&self,
_: &dyn BodyPart<N>,
point: &Point<N>
) -> Point<N>
fn gravity_enabled(&self) -> bool
[src]
fn enable_gravity(&mut self, enabled: bool)
[src]
fn fill_constraint_geometry(
&self,
_: &dyn BodyPart<N>,
_: usize,
point: &Point<N>,
force_dir: &ForceDirection<N>,
j_id: usize,
wj_id: usize,
jacobians: &mut [N],
inv_r: &mut N,
ext_vels: Option<&DVectorSlice<N>>,
out_vel: Option<&mut N>
)
[src]
&self,
_: &dyn BodyPart<N>,
_: usize,
point: &Point<N>,
force_dir: &ForceDirection<N>,
j_id: usize,
wj_id: usize,
jacobians: &mut [N],
inv_r: &mut N,
ext_vels: Option<&DVectorSlice<N>>,
out_vel: Option<&mut N>
)
fn has_active_internal_constraints(&mut self) -> bool
[src]
fn setup_internal_velocity_constraints(
&mut self,
_: &DVectorSlice<N>,
_: &IntegrationParameters<N>
)
[src]
&mut self,
_: &DVectorSlice<N>,
_: &IntegrationParameters<N>
)
fn warmstart_internal_velocity_constraints(
&mut self,
_: &mut DVectorSliceMut<N>
)
[src]
&mut self,
_: &mut DVectorSliceMut<N>
)
fn step_solve_internal_velocity_constraints(
&mut self,
_: &mut DVectorSliceMut<N>
)
[src]
&mut self,
_: &mut DVectorSliceMut<N>
)
fn step_solve_internal_position_constraints(
&mut self,
_: &IntegrationParameters<N>
)
[src]
&mut self,
_: &IntegrationParameters<N>
)
fn add_local_inertia_and_com(
&mut self,
_: usize,
com: Point<N>,
inertia: Inertia<N>
)
[src]
&mut self,
_: usize,
com: Point<N>,
inertia: Inertia<N>
)
fn apply_force(
&mut self,
_: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
_: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force(
&mut self,
_: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
_: usize,
force: &Force<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_force_at_point(
&mut self,
_: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
_: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force_at_point(
&mut self,
_: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
_: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_force_at_local_point(
&mut self,
_: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
_: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn apply_local_force_at_local_point(
&mut self,
_: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
[src]
&mut self,
_: usize,
force: &Vector<N>,
point: &Point<N>,
force_type: ForceType,
auto_wake_up: bool
)
fn is_ground(&self) -> bool
[src]
fn update_activation_status(&mut self)
[src]
fn status_dependent_ndofs(&self) -> usize
[src]
fn status_dependent_body_part_velocity(
&self,
part: &dyn BodyPart<N>
) -> Velocity<N>
[src]
&self,
part: &dyn BodyPart<N>
) -> Velocity<N>