Type Definition nphysics3d::force_generator::DefaultForceGeneratorSet[][src]

type DefaultForceGeneratorSet<N: RealField, Handle: BodyHandle = DefaultBodyHandle> = Arena<Box<dyn ForceGenerator<N, Handle>>>;
Expand description

Default force generator set based on an arena with generational indices.

Trait Implementations

impl<N: RealField, Handle: BodyHandle> ForceGeneratorSet<N, Handle> for DefaultForceGeneratorSet<N, Handle>[src]

type ForceGenerator = dyn ForceGenerator<N, Handle>

Type of a force generator stored in this set.

type Handle = DefaultForceGeneratorHandle

Type of a force generator handle identifying a force generator in this set.

fn get(&self, handle: Self::Handle) -> Option<&Self::ForceGenerator>[src]

Gets a reference to the force generator identified by handle.

fn get_mut(&mut self, handle: Self::Handle) -> Option<&mut Self::ForceGenerator>[src]

Gets a mutable reference to the force generator identified by handle.

fn contains(&self, handle: Self::Handle) -> bool[src]

Check if this set contains a force generator identified by handle.

fn foreach(&self, f: impl FnMut(Self::Handle, &Self::ForceGenerator))[src]

Iterate through all the force generators on this set, applying the closure f on them.

fn foreach_mut(
    &mut self,
    f: impl FnMut(Self::Handle, &mut Self::ForceGenerator)
)
[src]

Mutable iterates through all the force generators on this set, applying the closure f on them.