pub enum Shape {
Sphere {
radius: f32,
},
Box {
half_extents: [f32; 3],
},
Capsule {
radius: f32,
half_height: f32,
},
Cylinder {
radius: f32,
half_height: f32,
},
Hull(ShapeSourceHandle),
Mesh(ShapeSourceHandle),
HeightField(ShapeSourceHandle),
}Variants§
Sphere
Box
Capsule
Cylinder
Hull(ShapeSourceHandle)
Mesh(ShapeSourceHandle)
HeightField(ShapeSourceHandle)
Implementations§
Source§impl Shape
impl Shape
pub fn sphere(radius: f32) -> Self
pub fn cuboid(half_extents: [f32; 3]) -> Self
pub fn capsule(radius: f32, half_height: f32) -> Self
pub fn cylinder(radius: f32, half_height: f32) -> Self
pub fn hull(source: ShapeSourceHandle) -> Self
pub fn mesh(source: ShapeSourceHandle) -> Self
pub fn height_field(source: ShapeSourceHandle) -> Self
pub fn bounding_radius(&self) -> f32
pub fn is_world_geometry(&self) -> bool
pub fn is_convex(&self) -> bool
Trait Implementations§
impl Copy for Shape
impl StructuralPartialEq for Shape
Auto Trait Implementations§
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