pub struct BodySim {Show 16 fields
pub transform: WorldTransform,
pub center: Pos,
pub rotation0: Rot,
pub center0: Pos,
pub local_center: Vec2,
pub force: Vec2,
pub torque: f32,
pub inv_mass: f32,
pub inv_inertia: f32,
pub min_extent: f32,
pub max_extent: f32,
pub linear_damping: f32,
pub angular_damping: f32,
pub gravity_scale: f32,
pub body_id: i32,
pub flags: u32,
}Expand description
Body simulation data used for integration of position and velocity. Transform data used for collision and solver preparation. (b2BodySim)
Fields§
§transform: WorldTransformtransform for body origin, double translation in large world mode
center: Poscenter of mass position in world space
rotation0: Rotprevious rotation and COM for TOI
center0: Pos§local_center: Vec2location of center of mass relative to the body origin
force: Vec2§torque: f32§inv_mass: f32inverse mass and inertia
inv_inertia: f32§min_extent: f32§max_extent: f32§linear_damping: f32§angular_damping: f32§gravity_scale: f32§body_id: i32Index of Body
flags: u32body_flags bits
Trait Implementations§
impl Copy for BodySim
impl StructuralPartialEq for BodySim
Auto Trait Implementations§
impl Freeze for BodySim
impl RefUnwindSafe for BodySim
impl Send for BodySim
impl Sync for BodySim
impl Unpin for BodySim
impl UnsafeUnpin for BodySim
impl UnwindSafe for BodySim
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