[][src]Struct nphysics3d::object::MassConstraintSystem

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

A deformable surface using a mass-LengthConstraint model with triangular elements.

Methods

impl<N: RealField> MassConstraintSystem<N>[src]

pub fn from_trimesh(mesh: &TriMesh<N>, mass: N, stiffness: Option<N>) -> Self[src]

Creates a new deformable surface following the mass-LengthConstraint model.

The surface is initialized with a set of links corresponding to each trimesh edges.

pub fn from_polyline(
    polyline: &Polyline<N>,
    mass: N,
    stiffness: Option<N>
) -> Self
[src]

Builds a mass-spring system from a polyline.

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 quad(
    transform: &Isometry<N>,
    extents: &Vector2<N>,
    nx: usize,
    ny: usize,
    mass: N,
    stiffness: Option<N>
) -> Self
[src]

Creates a rectangular-shaped quad.

pub fn add_constraint(
    &mut self,
    node1: usize,
    node2: usize,
    stiffness: Option<N>
)
[src]

Add one constraint to this mass-constraint system.

pub fn generate_neighbor_constraints(&mut self, stiffness: Option<N>)[src]

Generate additional constraints between nodes that are transitively neighbors.

Given three nodes a, b, c, if a constraint exists between a and b, and between b and c, then a constraint between a and c is created if it does not already exists.

pub fn num_nodes(&self) -> usize[src]

The number of nodes of this mass-constraint system.

pub fn mass(&self) -> N[src]

The total mass of this body.

pub fn set_warmstart_coefficient(&mut self, coeff: N)[src]

The coefficient used for warm-starting the resolution of internal constraints of this soft body (default: 0.5).

pub fn warmstart_coefficient(&self) -> N[src]

The coefficient used for warm-starting the resolution of internal constraints of this soft body (default: 0.5).

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-constraint system.

Trait Implementations

impl<N: RealField> Body<N> for MassConstraintSystem<N>[src]

Auto Trait Implementations

impl<N> !RefUnwindSafe for MassConstraintSystem<N>

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

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

impl<N> Unpin for MassConstraintSystem<N> where
    N: Scalar + Unpin

impl<N> !UnwindSafe for MassConstraintSystem<N>

Blanket Implementations

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

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

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

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<V, T> VZip<V> for T where
    V: MultiLane<T>,