pub enum Geometry {
Sphere {
radius: f64,
},
Capsule {
radius: f64,
length: f64,
},
Box {
half_extents: Vec3,
},
Cylinder {
radius: f64,
height: f64,
},
Mesh {
vertices: Vec<Vec3>,
faces: Vec<[usize; 3]>,
},
Plane {
normal: Vec3,
},
}Expand description
Collision geometry types.
Variants§
Sphere
Sphere with given radius.
Capsule
Capsule: cylinder with hemispheres at ends.
Fields
Box
Box with half-extents (width/2, height/2, depth/2).
Cylinder
Cylinder along Z axis.
Mesh
Convex mesh (vertices only; convex hull assumed).
Fields
Plane
Infinite plane with outward normal.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Geometry
impl RefUnwindSafe for Geometry
impl Send for Geometry
impl Sync for Geometry
impl Unpin for Geometry
impl UnsafeUnpin for Geometry
impl UnwindSafe for Geometry
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