pub struct RigidBody { /* private fields */ }Expand description
PHRB — Rigid body (v2–v4, 56–104 bytes)
Havok rigid body with density, friction, restitution, damping, gravity scale, and collision shape references.
Implementations§
Source§impl RigidBody
impl RigidBody
Sourcepub fn simulation_type(&self) -> u16
pub fn simulation_type(&self) -> u16
Simulation mode (v3+)
pub fn set_simulation_type(&mut self, value: u16)
Sourcepub fn parent_bone_index(&self) -> u16
pub fn parent_bone_index(&self) -> u16
Parent bone index
pub fn set_parent_bone_index(&mut self, value: u16)
Sourcepub fn physics_type(&self) -> u32
pub fn physics_type(&self) -> u32
Engine-specific body type (v3+)
pub fn set_physics_type(&mut self, value: u32)
pub fn set_density(&mut self, value: f32)
pub fn set_friction(&mut self, value: f32)
Sourcepub fn restitution(&self) -> f32
pub fn restitution(&self) -> f32
Elasticity / bounciness
pub fn set_restitution(&mut self, value: f32)
Sourcepub fn linear_damping(&self) -> f32
pub fn linear_damping(&self) -> f32
Linear velocity damping
pub fn set_linear_damping(&mut self, value: f32)
Sourcepub fn angular_damping(&self) -> f32
pub fn angular_damping(&self) -> f32
Angular velocity damping
pub fn set_angular_damping(&mut self, value: f32)
Sourcepub fn gravity_scale(&self) -> f32
pub fn gravity_scale(&self) -> f32
Gravity influence scale
pub fn set_gravity_scale(&mut self, value: f32)
Sourcepub fn dynamic_state(&self) -> Ref<'_, AnimRefU32>
pub fn dynamic_state(&self) -> Ref<'_, AnimRefU32>
Animated dynamic state (v4+) Borrows the field in place — no copy, no allocation.
pub fn dynamic_state_mut(&mut self) -> RefMut<'_, AnimRefU32>
Sourcepub fn dynamic_blend_out(&self) -> f32
pub fn dynamic_blend_out(&self) -> f32
Dynamic blend-out duration (v4+)
pub fn set_dynamic_blend_out(&mut self, value: f32)
Sourcepub fn rigid_body_shape_len(&self) -> usize
pub fn rigid_body_shape_len(&self) -> usize
Collision shapes (PHSH)
Sourcepub fn rigid_body_shape(&self, index: usize) -> Option<Ref<'_, PhysicsShape>>
pub fn rigid_body_shape(&self, index: usize) -> Option<Ref<'_, PhysicsShape>>
Borrows element index in place. None when out of range.
pub fn rigid_body_shape_mut( &mut self, index: usize, ) -> Option<RefMut<'_, PhysicsShape>>
Sourcepub fn rigid_body_shape_iter(
&self,
) -> impl ExactSizeIterator<Item = Ref<'_, PhysicsShape>>
pub fn rigid_body_shape_iter( &self, ) -> impl ExactSizeIterator<Item = Ref<'_, PhysicsShape>>
Iterate the elements, borrowing each in turn.
pub fn resize_rigid_body_shape(&mut self, count: usize)
Sourcepub fn flags(&self) -> RigidBodyFlag
pub fn flags(&self) -> RigidBodyFlag
Rigid body flags
pub fn set_flags(&mut self, value: RigidBodyFlag)
Sourcepub fn local_forces(&self) -> u16
pub fn local_forces(&self) -> u16
Local force channel bitmask
pub fn set_local_forces(&mut self, value: u16)
Sourcepub fn world_forces(&self) -> u16
pub fn world_forces(&self) -> u16
World force channel bitmask
pub fn set_world_forces(&mut self, value: u16)
pub fn set_priority(&mut self, value: u32)
Trait Implementations§
impl Send for RigidBody
Auto Trait Implementations§
impl !Sync for RigidBody
impl Freeze for RigidBody
impl RefUnwindSafe for RigidBody
impl Unpin for RigidBody
impl UnsafeUnpin for RigidBody
impl UnwindSafe for RigidBody
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