pub struct PhysicsShape { /* private fields */ }Expand description
One collision shape reference — SHAP/SHP2. Points at an entry of the box/capsule/sphere/polytope array named by @ref shapeType.
Implementations§
Source§impl PhysicsShape
impl PhysicsShape
pub fn shape_type(&self) -> PhysicsShapeType
pub fn set_shape_type(&mut self, value: PhysicsShapeType)
pub fn shape_index(&self) -> i16
pub fn set_shape_index(&mut self, value: i16)
Sourcepub fn padding_04(&self) -> u32
pub fn padding_04(&self) -> u32
Zero in every corpus shape.
pub fn set_padding_04(&mut self, value: u32)
pub fn friction(&self) -> f32
pub fn set_friction(&mut self, value: f32)
pub fn restitution(&self) -> f32
pub fn set_restitution(&mut self, value: f32)
pub fn density(&self) -> f32
pub fn set_density(&mut self, value: f32)
Sourcepub fn unknown_14(&self) -> f32
pub fn unknown_14(&self) -> f32
SHP2+. Unidentified, but a float: only 0, 0.01, 0.8 and 1.0 occur. The one dmFixtureDef float the rest of this struct does not account for is m_rollingResistance.
pub fn set_unknown_14(&mut self, value: f32)
Sourcepub fn scale(&self) -> f32
pub fn scale(&self) -> f32
SHP2+. 1.0 in 3229 of 3230 shapes, matching the m_scaleOrRadius the client hands every fixture.
pub fn set_scale(&mut self, value: f32)
Sourcepub fn unknown_1c(&self) -> u16
pub fn unknown_1c(&self) -> u16
SHP2+. Zero in every corpus shape.
pub fn set_unknown_1c(&mut self, value: u16)
Sourcepub fn padding_1e(&self) -> u16
pub fn padding_1e(&self) -> u16
SHP2+. Uninitialised on disk; kept so writes match.
pub fn set_padding_1e(&mut self, value: u16)
Trait Implementations§
Source§impl Debug for PhysicsShape
impl Debug for PhysicsShape
Source§impl Default for PhysicsShape
impl Default for PhysicsShape
Source§impl Drop for PhysicsShape
impl Drop for PhysicsShape
impl Send for PhysicsShape
Auto Trait Implementations§
impl !Sync for PhysicsShape
impl Freeze for PhysicsShape
impl RefUnwindSafe for PhysicsShape
impl Unpin for PhysicsShape
impl UnsafeUnpin for PhysicsShape
impl UnwindSafe for PhysicsShape
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