[][src]Struct nphysics3d::object::MassSpringSystem

pub struct MassSpringSystem<N: RealField> { /* fields omitted */ }

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]

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 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 handle(&self) -> BodyHandle[src]

The handle 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]

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 is_ground(&self) -> bool[src]

Returns true if this body is the ground.

fn update_activation_status(&mut self)[src]

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>
)
[src]

Add the given inertia to the local inertia of this body part.

fn status_dependent_ndofs(&self) -> usize[src]

The number of degrees of freedom (DOF) of this body, taking its status into account. Read more

fn status_dependent_body_part_velocity(
    &self,
    part: &dyn BodyPart<N>
) -> Velocity<N>
[src]

The velocity of the specified body part, taking this body status into account. Read more

fn is_active(&self) -> bool[src]

Check if this body is active.

fn is_dynamic(&self) -> bool[src]

Whether or not the status of this body is dynamic.

fn is_kinematic(&self) -> bool[src]

Whether or not the status of this body is kinematic.

fn is_static(&self) -> bool[src]

Whether or not the status of this body is static.

fn activate(&mut self)[src]

Force the activation of this body.

Auto Trait Implementations

impl<N> Send for MassSpringSystem<N> where
    N: Scalar

impl<N> Sync for MassSpringSystem<N> where
    N: Scalar

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Downcast for T where
    T: Any
[src]

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Same for T

type Output = T

Should always be Self