pub struct BodyDesc {
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 collision_group: u32,
pub collision_mask: u32,
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§collision_group: u32§collision_mask: u32§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 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 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