Struct ark_api::world::CollisionMatrix
source · [−]pub struct CollisionMatrix { /* private fields */ }
Expand description
A collision matrix, specifying what can collide with what.
Due to its triangular shape, for fast access it’s simply replicated twice in the array, mirrored across the diagonal.
Create one, then use Environment::set_collision_matrix
to apply it to all future created
physics objects. Does not change existing objects!
Implementations
sourceimpl CollisionMatrix
impl CollisionMatrix
sourcepub fn new_full() -> Self
pub fn new_full() -> Self
Creates a new collision matrix where all layers can collide with all other layers.
sourcepub fn new_empty() -> Self
pub fn new_empty() -> Self
Creates a collision matrix where no layers can collide against any other layer.
Trait Implementations
sourceimpl Clone for CollisionMatrix
impl Clone for CollisionMatrix
sourcefn clone(&self) -> CollisionMatrix
fn clone(&self) -> CollisionMatrix
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl PartialEq<CollisionMatrix> for CollisionMatrix
impl PartialEq<CollisionMatrix> for CollisionMatrix
sourcefn eq(&self, other: &CollisionMatrix) -> bool
fn eq(&self, other: &CollisionMatrix) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Eq for CollisionMatrix
impl StructuralEq for CollisionMatrix
impl StructuralPartialEq for CollisionMatrix
Auto Trait Implementations
impl RefUnwindSafe for CollisionMatrix
impl Send for CollisionMatrix
impl Sync for CollisionMatrix
impl Unpin for CollisionMatrix
impl UnwindSafe for CollisionMatrix
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more