Struct ncollide2d::world::CollisionObjectSlab [−][src]
pub struct CollisionObjectSlab<N: Real, T> { /* fields omitted */ }
A set of collision objects that can be indexed by collision object handles.
Methods
impl<N: Real, T> CollisionObjectSlab<N, T>
[src]
impl<N: Real, T> CollisionObjectSlab<N, T>
pub fn new() -> CollisionObjectSlab<N, T>
[src]
pub fn new() -> CollisionObjectSlab<N, T>
Creates a new empty collecton of collision objects.
pub fn insert(&mut self, co: CollisionObject<N, T>) -> CollisionObjectHandle
[src]
pub fn insert(&mut self, co: CollisionObject<N, T>) -> CollisionObjectHandle
Inserts a new collision object into this collection and returns the corresponding handle.
pub fn remove(&mut self, handle: CollisionObjectHandle) -> CollisionObject<N, T>
[src]
pub fn remove(&mut self, handle: CollisionObjectHandle) -> CollisionObject<N, T>
Removes from this collection the collision object identified by the given handle.
The removed collision object structure is returned.
pub fn get(
&self,
handle: CollisionObjectHandle
) -> Option<&CollisionObject<N, T>>
[src]
pub fn get(
&self,
handle: CollisionObjectHandle
) -> Option<&CollisionObject<N, T>>
If it exists, retrieves a reference to the collision object identified by the given handle.
pub fn get_mut(
&mut self,
handle: CollisionObjectHandle
) -> Option<&mut CollisionObject<N, T>>
[src]
pub fn get_mut(
&mut self,
handle: CollisionObjectHandle
) -> Option<&mut CollisionObject<N, T>>
If it exists, retrieves a mutable reference to the collision object identified by the given handle.
pub fn contains(&self, handle: CollisionObjectHandle) -> bool
[src]
pub fn contains(&self, handle: CollisionObjectHandle) -> bool
Returns true
if the specified handle identifies a collision object stored in this collection.
ⓘImportant traits for CollisionObjects<'a, N, T>pub fn iter(&self) -> CollisionObjects<N, T>
[src]
pub fn iter(&self) -> CollisionObjects<N, T>
Retrieves an iterator yielding references to each collision object.
Trait Implementations
impl<N: Real, T> Index<CollisionObjectHandle> for CollisionObjectSlab<N, T>
[src]
impl<N: Real, T> Index<CollisionObjectHandle> for CollisionObjectSlab<N, T>
type Output = CollisionObject<N, T>
The returned type after indexing.
fn index(&self, handle: CollisionObjectHandle) -> &Self::Output
[src]
fn index(&self, handle: CollisionObjectHandle) -> &Self::Output
Performs the indexing (container[index]
) operation.
impl<N: Real, T> IndexMut<CollisionObjectHandle> for CollisionObjectSlab<N, T>
[src]
impl<N: Real, T> IndexMut<CollisionObjectHandle> for CollisionObjectSlab<N, T>
fn index_mut(&mut self, handle: CollisionObjectHandle) -> &mut Self::Output
[src]
fn index_mut(&mut self, handle: CollisionObjectHandle) -> &mut Self::Output
Performs the mutable indexing (container[index]
) operation.
Auto Trait Implementations
impl<N, T> Send for CollisionObjectSlab<N, T> where
T: Send,
impl<N, T> Send for CollisionObjectSlab<N, T> where
T: Send,
impl<N, T> Sync for CollisionObjectSlab<N, T> where
T: Sync,
impl<N, T> Sync for CollisionObjectSlab<N, T> where
T: Sync,