pub enum Collider3D {
AABB(BoundingBox3D),
Box3(BoxUnaligned3D),
Face(TriFace3D),
}
Expand description
Collider enumeration for 3D space
Variants§
Implementations§
Source§impl Collider3D
impl Collider3D
pub fn collides_with(&self, other: &Self) -> bool
Trait Implementations§
Source§impl HasBoundingBox3D for Collider3D
impl HasBoundingBox3D for Collider3D
Source§fn bounding_box(&self) -> BoundingBox3D
fn bounding_box(&self) -> BoundingBox3D
Should return the bounding box
Source§impl HasBoundingBox3DMaybe for Collider3D
impl HasBoundingBox3DMaybe for Collider3D
Source§fn bounding_box_maybe(&self) -> Result<BoundingBox3D>
fn bounding_box_maybe(&self) -> Result<BoundingBox3D>
Should return the bounding box if it can be calculated
Source§impl HasColliders3D for Collider3D
impl HasColliders3D for Collider3D
Source§fn has_additional_colliders(&self) -> bool
fn has_additional_colliders(&self) -> bool
Whether has colliders in addition to the bounding box, otherwise just use AABB
Source§fn with_colliders(&self, f: &mut dyn FnMut(&Collider3D))
fn with_colliders(&self, f: &mut dyn FnMut(&Collider3D))
Apply function to each of the colliders
fn collides_with_collider(&self, other: &Collider3D) -> bool
fn collides_with(&self, other: &dyn HasColliders3D) -> bool
Auto Trait Implementations§
impl Freeze for Collider3D
impl RefUnwindSafe for Collider3D
impl Send for Collider3D
impl Sync for Collider3D
impl Unpin for Collider3D
impl UnwindSafe for Collider3D
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more