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<'__de, __Context> BorrowDecode<'__de, __Context> for ColliderShape
impl<'__de, __Context> BorrowDecode<'__de, __Context> for ColliderShape
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
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 (const: unstable) · 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<__Context> Decode<__Context> for ColliderShape
impl<__Context> Decode<__Context> 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
Source§impl Encode for ColliderShape
impl Encode for ColliderShape
Auto Trait Implementations§
impl Freeze for ColliderShape
impl RefUnwindSafe for ColliderShape
impl Send for ColliderShape
impl Sync for ColliderShape
impl Unpin for ColliderShape
impl UnsafeUnpin for ColliderShape
impl UnwindSafe for ColliderShape
Blanket Implementations§
Source§impl<T> AppLifecycle for Twhere
T: ?Sized,
impl<T> AppLifecycle for Twhere
T: ?Sized,
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