pub struct RigidBodyInspector {Show 28 fields
pub id: u64,
pub name: String,
pub mass: f32,
pub inertia_tensor: Mat4,
pub center_of_mass: Vec3,
pub linear_damping: f32,
pub angular_damping: f32,
pub linear_sleep_threshold: f32,
pub angular_sleep_threshold: f32,
pub is_kinematic: bool,
pub is_static: bool,
pub use_gravity: bool,
pub gravity_scale: f32,
pub collision_group: u32,
pub collision_mask: u32,
pub ccd_enabled: bool,
pub max_linear_velocity: f32,
pub max_angular_velocity: f32,
pub shape_type: RigidBodyShapeType,
pub shape_params: ShapeParameters,
pub position: Vec3,
pub orientation: Quat,
pub linear_velocity: Vec3,
pub angular_velocity: Vec3,
pub force_accumulator: Vec3,
pub torque_accumulator: Vec3,
pub sleeping: bool,
pub sleep_timer: f32,
}Fields§
§id: u64§name: String§mass: f32§inertia_tensor: Mat4§center_of_mass: Vec3§linear_damping: f32§angular_damping: f32§linear_sleep_threshold: f32§angular_sleep_threshold: f32§is_kinematic: bool§is_static: bool§use_gravity: bool§gravity_scale: f32§collision_group: u32§collision_mask: u32§ccd_enabled: bool§max_linear_velocity: f32§max_angular_velocity: f32§shape_type: RigidBodyShapeType§shape_params: ShapeParameters§position: Vec3§orientation: Quat§linear_velocity: Vec3§angular_velocity: Vec3§force_accumulator: Vec3§torque_accumulator: Vec3§sleeping: bool§sleep_timer: f32Implementations§
Source§impl RigidBodyInspector
impl RigidBodyInspector
pub fn new(id: u64, name: &str) -> Self
Sourcepub fn recompute_inertia(&mut self)
pub fn recompute_inertia(&mut self)
Recompute inertia tensor based on current shape type and parameters
Sourcepub fn integrate(&mut self, dt: f32)
pub fn integrate(&mut self, dt: f32)
Integrate linear/angular velocity over dt using symplectic Euler
pub fn apply_force(&mut self, force: Vec3)
pub fn apply_torque(&mut self, torque: Vec3)
pub fn apply_force_at_point(&mut self, force: Vec3, world_point: Vec3)
pub fn wake_up(&mut self)
Trait Implementations§
Source§impl Clone for RigidBodyInspector
impl Clone for RigidBodyInspector
Auto Trait Implementations§
impl Freeze for RigidBodyInspector
impl RefUnwindSafe for RigidBodyInspector
impl Send for RigidBodyInspector
impl Sync for RigidBodyInspector
impl Unpin for RigidBodyInspector
impl UnsafeUnpin for RigidBodyInspector
impl UnwindSafe for RigidBodyInspector
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.