[][src]Struct nphysics3d::joint::DefaultJointConstraintSet

pub struct DefaultJointConstraintSet<N: RealField, Handle: BodyHandle = DefaultBodyHandle> { /* fields omitted */ }

A set containing all the joint-constraints added to the world.

It is based on an arena using generational indices to avoid the ABA problem.

Methods

impl<N: RealField, Handle: BodyHandle> DefaultJointConstraintSet<N, Handle>[src]

pub fn new() -> Self[src]

Creates an empty set.

pub fn insert(
    &mut self,
    constraint: impl JointConstraint<N, Handle>
) -> DefaultJointConstraintHandle
[src]

Adds a joint to this set.

pub fn insert_boxed(
    &mut self,
    constraint: Box<dyn JointConstraint<N, Handle>>
) -> DefaultJointConstraintHandle
[src]

Adds a joint (represented as a boxed trait-object) to this set.

pub fn remove(
    &mut self,
    to_remove: DefaultJointConstraintHandle
) -> Option<Box<dyn JointConstraint<N, Handle>>>
[src]

Removes a joint from this set.

pub fn contains(&self, handle: DefaultJointConstraintHandle) -> bool[src]

Check if this set contains a joint identified by handle.

pub fn get(
    &self,
    handle: DefaultJointConstraintHandle
) -> Option<&dyn JointConstraint<N, Handle>>
[src]

Gets a reference to the joint identified by handle.

pub fn get_mut(
    &mut self,
    handle: DefaultJointConstraintHandle
) -> Option<&mut dyn JointConstraint<N, Handle>>
[src]

Gets a mutable reference to the joint identified by handle.

pub fn iter(
    &self
) -> impl Iterator<Item = (DefaultJointConstraintHandle, &dyn JointConstraint<N, Handle>)>
[src]

Iter through all the joints and their handles.

pub fn iter_mut(
    &mut self
) -> impl Iterator<Item = (DefaultJointConstraintHandle, &mut dyn JointConstraint<N, Handle>)>
[src]

Mutably iter through all the joints and their handles.

Trait Implementations

impl<N: RealField, Handle: BodyHandle> JointConstraintSet<N, Handle> for DefaultJointConstraintSet<N, Handle>[src]

type JointConstraint = dyn JointConstraint<N, Handle>

Type of a constraint-based joints stored in this set.

type Handle = DefaultJointConstraintHandle

Type of a joint handle identifying a joint in this set.

Auto Trait Implementations

impl<N, Handle = Index> !RefUnwindSafe for DefaultJointConstraintSet<N, Handle>

impl<N, Handle> Send for DefaultJointConstraintSet<N, Handle>

impl<N, Handle> Sync for DefaultJointConstraintSet<N, Handle>

impl<N, Handle> Unpin for DefaultJointConstraintSet<N, Handle> where
    Handle: Unpin

impl<N, Handle = Index> !UnwindSafe for DefaultJointConstraintSet<N, Handle>

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>,