pub struct CollisionShapeEditor {Show 17 fields
pub shape_type: CollisionShapeType,
pub box_half_extents: Vec3,
pub sphere_radius: f32,
pub capsule_radius: f32,
pub capsule_half_height: f32,
pub cylinder_radius: f32,
pub cylinder_half_height: f32,
pub convex_hull_points: Vec<Vec3>,
pub triangle_mesh: Vec<(Vec3, Vec3, Vec3)>,
pub heightfield: Option<HeightfieldShape>,
pub aabb: Aabb,
pub obb: Option<Obb>,
pub mass_properties_dirty: bool,
pub volume: f32,
pub surface_area: f32,
pub margin: f32,
pub local_transform: Mat4,
}Fields§
§shape_type: CollisionShapeType§box_half_extents: Vec3§sphere_radius: f32§capsule_radius: f32§capsule_half_height: f32§cylinder_radius: f32§cylinder_half_height: f32§convex_hull_points: Vec<Vec3>§triangle_mesh: Vec<(Vec3, Vec3, Vec3)>§heightfield: Option<HeightfieldShape>§aabb: Aabb§obb: Option<Obb>§mass_properties_dirty: bool§volume: f32§surface_area: f32§margin: f32§local_transform: Mat4Implementations§
Source§impl CollisionShapeEditor
impl CollisionShapeEditor
pub fn new() -> Self
pub fn compute_aabb(&mut self)
pub fn compute_volume(&mut self)
pub fn compute_surface_area(&mut self)
pub fn fit_to_point_cloud(&mut self, points: &[Vec3])
pub fn generate_box_wireframe(&self) -> Vec<(Vec3, Vec3)>
pub fn generate_sphere_wireframe(&self, segments: usize) -> Vec<(Vec3, Vec3)>
Trait Implementations§
Source§impl Clone for CollisionShapeEditor
impl Clone for CollisionShapeEditor
Auto Trait Implementations§
impl Freeze for CollisionShapeEditor
impl RefUnwindSafe for CollisionShapeEditor
impl Send for CollisionShapeEditor
impl Sync for CollisionShapeEditor
impl Unpin for CollisionShapeEditor
impl UnsafeUnpin for CollisionShapeEditor
impl UnwindSafe for CollisionShapeEditor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.