pub enum Shape {
Box {
center: [f32; 3],
half_extents: [f32; 3],
},
Sphere {
center: [f32; 3],
radius: f32,
},
Capsule {
a: [f32; 3],
b: [f32; 3],
radius: f32,
},
Cylinder {
a: [f32; 3],
b: [f32; 3],
radius: f32,
},
Convex {
points: Vec<[f32; 3]>,
},
Heightfield,
}Expand description
A collider’s shape, in the entity’s space, metres.
Variants§
Box
Centred on center, axis-aligned in the entity’s space.
Sphere
Capsule
The segment a-b swept by radius: the caps are included in its length.
Cylinder
A cylinder from a to b (a disc is a short one).
Convex
The convex hull of the points (no faces are stored: a consumer builds the hull).
Heightfield
The entity’s Heightfield.
Trait Implementations§
impl StructuralPartialEq for Shape
Auto Trait Implementations§
impl Forget for Shape
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnsafeUnpin for Shape
impl UnwindSafe for Shape
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