[−][src]Struct nphysics2d::joint::DefaultJointConstraintSet
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.
Implementations
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]
&mut self,
constraint: impl JointConstraint<N, Handle>
) -> DefaultJointConstraintHandle
Adds a joint to this set.
pub fn insert_boxed(
&mut self,
constraint: Box<dyn JointConstraint<N, Handle>>
) -> DefaultJointConstraintHandle
[src]
&mut self,
constraint: Box<dyn JointConstraint<N, Handle>>
) -> DefaultJointConstraintHandle
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]
&mut self,
to_remove: DefaultJointConstraintHandle
) -> Option<Box<dyn JointConstraint<N, Handle>>>
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]
&self,
handle: DefaultJointConstraintHandle
) -> Option<&dyn JointConstraint<N, Handle>>
Gets a reference to the joint identified by handle
.
pub fn get_mut(
&mut self,
handle: DefaultJointConstraintHandle
) -> Option<&mut dyn JointConstraint<N, Handle>>
[src]
&mut self,
handle: DefaultJointConstraintHandle
) -> Option<&mut dyn JointConstraint<N, Handle>>
Gets a mutable reference to the joint identified by handle
.
pub fn iter(
&self
) -> impl Iterator<Item = (DefaultJointConstraintHandle, &dyn JointConstraint<N, Handle>)>
[src]
&self
) -> impl Iterator<Item = (DefaultJointConstraintHandle, &dyn JointConstraint<N, Handle>)>
Iter through all the joints and their handles.
pub fn iter_mut(
&mut self
) -> impl Iterator<Item = (DefaultJointConstraintHandle, &mut dyn JointConstraint<N, Handle>)>
[src]
&mut self
) -> impl Iterator<Item = (DefaultJointConstraintHandle, &mut dyn JointConstraint<N, Handle>)>
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.
fn get(&self, handle: Self::Handle) -> Option<&Self::JointConstraint>
[src]
fn get_mut(
&mut self,
handle: Self::Handle
) -> Option<&mut Self::JointConstraint>
[src]
&mut self,
handle: Self::Handle
) -> Option<&mut Self::JointConstraint>
fn contains(&self, handle: Self::Handle) -> bool
[src]
fn foreach(&self, f: impl FnMut(Self::Handle, &Self::JointConstraint))
[src]
fn foreach_mut(
&mut self,
f: impl FnMut(Self::Handle, &mut Self::JointConstraint)
)
[src]
&mut self,
f: impl FnMut(Self::Handle, &mut Self::JointConstraint)
)
fn pop_insertion_event(
&mut self
) -> Option<(Self::Handle, BodyPartHandle<Handle>, BodyPartHandle<Handle>)>
[src]
&mut self
) -> Option<(Self::Handle, BodyPartHandle<Handle>, BodyPartHandle<Handle>)>
fn pop_removal_event(
&mut self
) -> Option<(Self::Handle, BodyPartHandle<Handle>, BodyPartHandle<Handle>)>
[src]
&mut self
) -> Option<(Self::Handle, BodyPartHandle<Handle>, BodyPartHandle<Handle>)>
fn remove(&mut self, to_remove: Self::Handle)
[src]
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,
Handle: Unpin,
impl<N, Handle = Index> !UnwindSafe for DefaultJointConstraintSet<N, Handle>
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,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
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>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
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>,