[][src]Struct ncollide3d::world::CollisionObjectSlab

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]

pub fn new() -> CollisionObjectSlab<N, T>[src]

Creates a new empty collecton of collision objects.

pub fn insert(&mut self, co: CollisionObject<N, T>) -> CollisionObjectHandle[src]

Inserts a new collision object into this collection and returns the corresponding handle.

pub fn remove(&mut self, handle: CollisionObjectHandle) -> CollisionObject<N, T>[src]

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]

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]

If it exists, retrieves a mutable reference to the collision object identified by the given handle.

pub fn contains(&self, handle: CollisionObjectHandle) -> bool[src]

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]

Retrieves an iterator yielding references to each collision object.

pub fn len(&self) -> usize[src]

The number of collision objects on this slab.

Trait Implementations

impl<N: Real, T> Index<CollisionObjectHandle> for CollisionObjectSlab<N, T>[src]

type Output = CollisionObject<N, T>

The returned type after indexing.

impl<N: Real, T> IndexMut<CollisionObjectHandle> for CollisionObjectSlab<N, T>[src]

Auto Trait Implementations

impl<N, T> Send for CollisionObjectSlab<N, T> where
    N: Scalar,
    T: Send

impl<N, T> Sync for CollisionObjectSlab<N, T> where
    N: Scalar,
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> Same for T

type Output = T

Should always be Self