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 (mirrors phyz-collision’s shapes for convenience).
Variants§
Sphere
A ball centred on the body frame origin.
Capsule
A capsule (swept sphere) aligned with the body frame Z axis.
Fields
Box
An axis-aligned box centred on the body frame origin.
Cylinder
A cylinder aligned with the body frame Z axis.
Mesh
An arbitrary triangle mesh in body frame coordinates.
Fields
Plane
A half-space through the body frame origin.
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