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§
source§impl 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§
source§impl Clone for CollisionMatrix
impl Clone for CollisionMatrix
source§fn clone(&self) -> CollisionMatrix
fn clone(&self) -> CollisionMatrix
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl PartialEq<CollisionMatrix> for CollisionMatrix
impl PartialEq<CollisionMatrix> for CollisionMatrix
source§fn 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 ==.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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more