pub struct BodyDesc {Show 18 fields
pub colliders: Vec<ColliderDesc>,
pub position: [f32; 3],
pub orientation: [f32; 4],
pub velocity: [f32; 3],
pub angular_velocity: [f32; 3],
pub mass: f32,
pub density: Option<f32>,
pub com: Option<[f32; 3]>,
pub inertia: Option<[f32; 6]>,
pub collision_group: u32,
pub collision_mask: u32,
pub linear_damping: Option<f32>,
pub angular_damping: Option<f32>,
pub gravity_scale: f32,
pub sleep_velocity: Option<f32>,
pub sleep_angular_velocity: Option<f32>,
pub kinematic: bool,
pub ccd: bool,
}Fields§
§colliders: Vec<ColliderDesc>§position: [f32; 3]§orientation: [f32; 4]§velocity: [f32; 3]§angular_velocity: [f32; 3]§mass: f32§density: Option<f32>§com: Option<[f32; 3]>§inertia: Option<[f32; 6]>§collision_group: u32§collision_mask: u32§linear_damping: Option<f32>§angular_damping: Option<f32>§gravity_scale: f32§sleep_velocity: Option<f32>§sleep_angular_velocity: Option<f32>§kinematic: bool§ccd: boolImplementations§
Source§impl BodyDesc
impl BodyDesc
pub fn new(collider: ColliderDesc) -> Self
pub fn collider(self, collider: ColliderDesc) -> Self
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 static_sphere(radius: f32) -> Self
pub fn compound(handles: &[ShapeSourceHandle]) -> Self
pub fn inverse_mass(&self) -> f32
pub fn position(self, position: [f32; 3]) -> Self
pub fn restitution(self, restitution: f32) -> Self
pub fn friction(self, friction: f32) -> Self
pub fn sensor(self, sensor: bool) -> Self
pub fn orientation(self, orientation: [f32; 4]) -> Self
pub fn velocity(self, velocity: [f32; 3]) -> Self
pub fn angular_velocity(self, angular_velocity: [f32; 3]) -> Self
pub fn mass(self, mass: f32) -> Self
pub fn density(self, density: f32) -> Self
pub fn damping(self, damping: f32) -> Self
pub fn angular_damping(self, angular_damping: f32) -> Self
pub fn gravity_scale(self, gravity_scale: f32) -> Self
pub fn sleep_thresholds(self, velocity: f32, angular_velocity: f32) -> Self
pub fn com(self, com: [f32; 3]) -> Self
pub fn inertia(self, inertia: [f32; 6]) -> Self
pub fn mass_properties( &self, geometry: impl Fn(&Shape) -> Option<SolidGeometry>, ) -> MassProperties
pub fn effective_mass( &self, geometry: impl Fn(&Shape) -> Option<SolidGeometry>, ) -> f32
pub fn collision_group(self, group: u32) -> Self
pub fn collision_mask(self, mask: u32) -> Self
pub fn kinematic(self, kinematic: bool) -> Self
pub fn ccd(self, ccd: bool) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BodyDesc
impl RefUnwindSafe for BodyDesc
impl Send for BodyDesc
impl Sync for BodyDesc
impl Unpin for BodyDesc
impl UnsafeUnpin for BodyDesc
impl UnwindSafe for BodyDesc
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