[−][src]Struct oxygengine_physics_2d::prelude::DefaultColliderSet
The default set containing all the colliders added to the world.
It is based on an arena using generational indices to avoid the ABA problem.
Implementations
impl<N, Handle> DefaultColliderSet<N, Handle> where
Handle: BodyHandle,
N: RealField,
[src]
Handle: BodyHandle,
N: RealField,
pub fn new() -> DefaultColliderSet<N, Handle>
[src]
Creates an empty set.
pub fn insert(&mut self, collider: Collider<N, Handle>) -> Index
[src]
Adds a collider to this set.
pub fn remove(&mut self, to_remove: Index) -> Option<Collider<N, Handle>>
[src]
Removes a collider from this set.
pub fn get(&self, handle: Index) -> Option<&Collider<N, Handle>>
[src]
Gets a reference to the collider identified by handle
.
pub fn get_mut(&mut self, handle: Index) -> Option<&mut Collider<N, Handle>>
[src]
Gets a mutable reference to the collider identified by handle
.
pub fn iter(&self) -> impl Iterator<Item = (Index, &Collider<N, Handle>)>
[src]
Iterates through all the colliders and their handles.
pub fn iter_mut(
&mut self
) -> impl Iterator<Item = (Index, &mut Collider<N, Handle>)>
[src]
&mut self
) -> impl Iterator<Item = (Index, &mut Collider<N, Handle>)>
Mutably iterate through all the colliders and their handles.
Trait Implementations
impl<N, Handle> ColliderSet<N, Handle> for DefaultColliderSet<N, Handle> where
Handle: BodyHandle,
N: RealField,
[src]
Handle: BodyHandle,
N: RealField,
type Handle = Index
Type of a collider handle identifying a collider in this set.
fn get(
&self,
handle: <DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle
) -> Option<&Collider<N, Handle>>
[src]
&self,
handle: <DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle
) -> Option<&Collider<N, Handle>>
fn get_mut(
&mut self,
handle: <DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle
) -> Option<&mut Collider<N, Handle>>
[src]
&mut self,
handle: <DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle
) -> Option<&mut Collider<N, Handle>>
fn contains(
&self,
handle: <DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle
) -> bool
[src]
&self,
handle: <DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle
) -> bool
fn foreach(
&self,
f: impl FnMut(<DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle, &Collider<N, Handle>)
)
[src]
&self,
f: impl FnMut(<DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle, &Collider<N, Handle>)
)
fn foreach_mut(
&mut self,
f: impl FnMut(<DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle, &mut Collider<N, Handle>)
)
[src]
&mut self,
f: impl FnMut(<DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle, &mut Collider<N, Handle>)
)
fn pop_insertion_event(
&mut self
) -> Option<<DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle>
[src]
&mut self
) -> Option<<DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle>
fn pop_removal_event(
&mut self
) -> Option<(<DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle, ColliderRemovalData<N, Handle>)>
[src]
&mut self
) -> Option<(<DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle, ColliderRemovalData<N, Handle>)>
fn remove(
&mut self,
to_remove: <DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle
) -> Option<&mut ColliderRemovalData<N, Handle>>
[src]
&mut self,
to_remove: <DefaultColliderSet<N, Handle> as ColliderSet<N, Handle>>::Handle
) -> Option<&mut ColliderRemovalData<N, Handle>>
fn get_pair(
&self,
handle1: Self::Handle,
handle2: Self::Handle
) -> (Option<&Collider<N, Handle>>, Option<&Collider<N, Handle>>)
[src]
&self,
handle1: Self::Handle,
handle2: Self::Handle
) -> (Option<&Collider<N, Handle>>, Option<&Collider<N, Handle>>)
impl<N, Handle> CollisionObjectSet<N> for DefaultColliderSet<N, Handle> where
Handle: BodyHandle,
N: RealField,
[src]
Handle: BodyHandle,
N: RealField,
type CollisionObject = Collider<N, Handle>
Type of the collision object stored into this set.
type CollisionObjectHandle = Index
Type of the handles identifying collision objects.
fn collision_object(
&self,
handle: <DefaultColliderSet<N, Handle> as CollisionObjectSet<N>>::CollisionObjectHandle
) -> Option<&<DefaultColliderSet<N, Handle> as CollisionObjectSet<N>>::CollisionObject>
[src]
&self,
handle: <DefaultColliderSet<N, Handle> as CollisionObjectSet<N>>::CollisionObjectHandle
) -> Option<&<DefaultColliderSet<N, Handle> as CollisionObjectSet<N>>::CollisionObject>
fn foreach(
&self,
f: impl FnMut(<DefaultColliderSet<N, Handle> as CollisionObjectSet<N>>::CollisionObjectHandle, &<DefaultColliderSet<N, Handle> as CollisionObjectSet<N>>::CollisionObject)
)
[src]
&self,
f: impl FnMut(<DefaultColliderSet<N, Handle> as CollisionObjectSet<N>>::CollisionObjectHandle, &<DefaultColliderSet<N, Handle> as CollisionObjectSet<N>>::CollisionObject)
)
Auto Trait Implementations
impl<N, Handle = Index> !RefUnwindSafe for DefaultColliderSet<N, Handle>
impl<N, Handle> Send for DefaultColliderSet<N, Handle> where
N: Scalar,
N: Scalar,
impl<N, Handle> Sync for DefaultColliderSet<N, Handle> where
N: Scalar,
N: Scalar,
impl<N, Handle> Unpin for DefaultColliderSet<N, Handle> where
Handle: Unpin,
N: Scalar + Unpin,
Handle: Unpin,
N: Scalar + Unpin,
impl<N, Handle = Index> !UnwindSafe for DefaultColliderSet<N, Handle>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: Any,
T: Any,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,