pub enum ColliderShape {
Box(Vec3),
Sphere(f32),
Capsule(f32, f32),
}Expand description
Supported collider shapes.
Variants§
Box(Vec3)
Box with half-extents.
Sphere(f32)
Sphere with radius.
Capsule(f32, f32)
Capsule with half-height and radius.
Implementations§
Source§impl ColliderShape
impl ColliderShape
Sourcepub fn compute_aabb(&self) -> Aabb
pub fn compute_aabb(&self) -> Aabb
Computes the axis-aligned bounding box (AABB) for this shape in local space.
Trait Implementations§
Source§impl Clone for ColliderShape
impl Clone for ColliderShape
Source§fn clone(&self) -> ColliderShape
fn clone(&self) -> ColliderShape
Returns a duplicate 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 Debug for ColliderShape
impl Debug for ColliderShape
Source§impl<'de> Deserialize<'de> for ColliderShape
impl<'de> Deserialize<'de> for ColliderShape
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ColliderShape
impl RefUnwindSafe for ColliderShape
impl Send for ColliderShape
impl Sync for ColliderShape
impl Unpin for ColliderShape
impl UnwindSafe for ColliderShape
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