pub trait CollisionObjectSet<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§
Sourcetype CollisionObject: CollisionObjectRef<N>
type CollisionObject: CollisionObjectRef<N>
Type of the collision object stored into this set.
Sourcetype CollisionObjectHandle: CollisionObjectHandle
type CollisionObjectHandle: CollisionObjectHandle
Type of the handles identifying collision objects.
Required Methods§
Sourcefn collision_object(
&self,
handle: Self::CollisionObjectHandle,
) -> Option<&Self::CollisionObject>
fn collision_object( &self, handle: Self::CollisionObjectHandle, ) -> Option<&Self::CollisionObject>
Gets the collision object identified by the given handle
.
Sourcefn foreach(
&self,
f: impl FnMut(Self::CollisionObjectHandle, &Self::CollisionObject),
)
fn foreach( &self, f: impl FnMut(Self::CollisionObjectHandle, &Self::CollisionObject), )
Applies a closure to every collision object (and their handle) stored into this set.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.