[−][src]Struct nphysics3d::object::MassSpringSystem
A deformable surface using a mass-spring model with triangular elements.
Methods
impl<N: RealField> MassSpringSystem<N>[src]
pub fn user_data(&self) -> Option<&(dyn Any + Send + Sync)>[src]
Retrieves a reference to the user-defined user-data attached to this object.
pub fn user_data_mut(&mut self) -> Option<&mut (dyn Any + Send + Sync)>[src]
Retrieves a mutable reference to the user-defined user-data attached to this object.
pub fn set_user_data(
&mut self,
data: Option<Box<dyn Any + Send + Sync>>
) -> Option<Box<dyn Any + Send + Sync>>[src]
&mut self,
data: Option<Box<dyn Any + Send + Sync>>
) -> Option<Box<dyn Any + Send + Sync>>
Sets the user-defined data attached to this object.
pub fn take_user_data(&mut self) -> Option<Box<dyn Any + Send + Sync>>[src]
Replace by None the user-defined data attached to this object and returns the old value.
pub fn quad(
transform: &Isometry<N>,
extents: &Vector2<N>,
nx: usize,
ny: usize,
mass: N,
stiffness: N,
damping_ratio: N
) -> Self[src]
transform: &Isometry<N>,
extents: &Vector2<N>,
nx: usize,
ny: usize,
mass: N,
stiffness: N,
damping_ratio: N
) -> Self
Creates a rectangular quad.
pub fn mass(&self) -> N[src]
The total mass of this mass-spring system.
pub fn num_nodes(&self) -> usize[src]
The number of nodes of this mass-spring system.
pub fn generate_neighbor_springs(&mut self, stiffness: N, damping_ratio: N)[src]
Generate additional springs between nodes that are transitively neighbors.
Given three nodes a, b, c, if a spring exists between a and b, and between b and c,
then a spring between a and c is created if it does not already exists.
pub fn add_spring(
&mut self,
node1: usize,
node2: usize,
stiffness: N,
damping_ratio: N
)[src]
&mut self,
node1: usize,
node2: usize,
stiffness: N,
damping_ratio: N
)
Add one spring to this mass-spring system.
pub fn set_node_kinematic(&mut self, i: usize, is_kinematic: bool)[src]
Restrict the specified node acceleration to always be zero so it can be controlled manually by the user at the velocity level.
pub fn clear_kinematic_nodes(&mut self)[src]
Mark all nodes as non-kinematic.
pub fn set_plasticity(&mut self, strain_threshold: N, creep: N, max_force: N)[src]
Sets the plastic properties of this mass-spring system.
Trait Implementations
impl<N: RealField> Body<N> for MassSpringSystem<N>[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>,
parameters: &IntegrationParameters<N>
)[src]
&mut self,
gravity: &Vector<N>,
parameters: &IntegrationParameters<N>
)
fn clear_forces(&mut self)[src]
fn apply_displacement(&mut self, disp: &[N])[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, parameters: &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 velocity_at_point(&self, part_id: usize, point: &Point<N>) -> Velocity<N>[src]
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 advance(&mut self, _time_ratio: N)[src]
fn validate_advancement(&mut self)[src]
fn clamp_advancement(&mut self)[src]
fn part_motion(
&self,
_part_id: usize,
_time_origin: N
) -> Option<BodyPartMotion<N>>[src]
&self,
_part_id: usize,
_time_origin: N
) -> Option<BodyPartMotion<N>>
fn step_started(&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]
Auto Trait Implementations
impl<N> !RefUnwindSafe for MassSpringSystem<N>
impl<N> Send for MassSpringSystem<N> where
N: Scalar,
N: Scalar,
impl<N> Sync for MassSpringSystem<N> where
N: Scalar,
N: Scalar,
impl<N> Unpin for MassSpringSystem<N> where
N: Scalar + Unpin,
N: Scalar + Unpin,
impl<N> !UnwindSafe for MassSpringSystem<N>
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> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,