pub trait CollisionObjectSet<N>where
    N: RealField + Copy,{
    type CollisionObject: CollisionObjectRef<N>;
    type CollisionObjectHandle: CollisionObjectHandle;

    // Required methods
    fn collision_object(
        &self,
        handle: Self::CollisionObjectHandle
    ) -> Option<&Self::CollisionObject>;
    fn foreach(
        &self,
        f: impl FnMut(Self::CollisionObjectHandle, &Self::CollisionObject)
    );
}
Expand description

Trait implemented by sets of collision objects.

A set of collision object map a handle of type Self::CollisionObjectHandle with a collision object of type Self::CollisionObject.

Required Associated Types§

source

type CollisionObject: CollisionObjectRef<N>

Type of the collision object stored into this set.

source

type CollisionObjectHandle: CollisionObjectHandle

Type of the handles identifying collision objects.

Required Methods§

source

fn collision_object( &self, handle: Self::CollisionObjectHandle ) -> Option<&Self::CollisionObject>

Gets the collision object identified by the given handle.

source

fn foreach( &self, f: impl FnMut(Self::CollisionObjectHandle, &Self::CollisionObject) )

Applies a closure to every collision object (and their handle) stored into this set.

Implementors§

source§

impl<'a, N, Bodies, Colliders> CollisionObjectSet<N> for BroadPhasePairFilterSets<'a, N, Bodies, Colliders>where N: RealField + Copy, Bodies: BodySet<N>, Colliders: ColliderSet<N, <Bodies as BodySet<N>>::Handle>,

§

type CollisionObject = Collider<N, <Bodies as BodySet<N>>::Handle>

§

type CollisionObjectHandle = <Colliders as ColliderSet<N, <Bodies as BodySet<N>>::Handle>>::Handle

source§

impl<N, Handle> CollisionObjectSet<N> for DefaultColliderSet<N, Handle>where N: RealField + Copy, Handle: BodyHandle,

§

type CollisionObject = Collider<N, Handle>

§

type CollisionObjectHandle = Index

source§

impl<N, T> CollisionObjectSet<N> for CollisionObjectSlab<N, T>where N: RealField + Copy,