pub enum ConvexShape3D {
Sphere {
center: Vec3,
radius: f32,
},
Box {
center: Vec3,
half_extents: Vec3,
rotation: Quat,
},
Capsule {
center: Vec3,
half_height: f32,
radius: f32,
rotation: Quat,
},
Cylinder {
center: Vec3,
half_height: f32,
radius: f32,
rotation: Quat,
},
ConvexHull {
vertices: Vec<Vec3>,
position: Vec3,
rotation: Quat,
},
}Expand description
Convex 3D primitive or hull supported by GjkEpaSolver3D.
Variants§
Sphere
Solid 3D sphere centered at center with radius.
Box
Oriented 3D box (OBB) with center, local half-extents, and unit rotation quaternion.
Fields
Capsule
Oriented 3D capsule aligned along its local Y axis [-half_height, +half_height].
Fields
Cylinder
Oriented 3D cylinder aligned along its local Y axis [-half_height, +half_height].
Fields
ConvexHull
Arbitrary convex polyhedron defined by local-space vertices and a world rigid transform.
Implementations§
Source§impl ConvexShape3D
Support mapping and translation helpers for ConvexShape3D.
impl ConvexShape3D
Support mapping and translation helpers for ConvexShape3D.
Sourcepub fn center_hint(&self) -> Vec3
pub fn center_hint(&self) -> Vec3
Returns the approximate geometric center of this convex shape.
§Returns
Vec3- World-space reference center.
Sourcepub fn translated(&self, delta: Vec3) -> Self
pub fn translated(&self, delta: Vec3) -> Self
Trait Implementations§
Source§impl Clone for ConvexShape3D
impl Clone for ConvexShape3D
Source§impl Debug for ConvexShape3D
impl Debug for ConvexShape3D
Source§impl PartialEq for ConvexShape3D
impl PartialEq for ConvexShape3D
impl StructuralPartialEq for ConvexShape3D
Auto Trait Implementations§
impl Forget for ConvexShape3D
impl Freeze for ConvexShape3D
impl Move for ConvexShape3D
impl RefUnwindSafe for ConvexShape3D
impl Send for ConvexShape3Dwhere
RawVecInner: Send,
impl Sync for ConvexShape3Dwhere
RawVecInner: Sync,
impl Unpin for ConvexShape3D
impl UnsafeUnpin for ConvexShape3D
impl UnwindSafe for ConvexShape3Dwhere
RawVecInner: UnwindSafe,
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