|
JPH_OVERRIDE_NEW_DELETE EMotionQuality | GetMotionQuality () const |
| Motion quality, or how well it detects collisions when it has a high velocity.
|
|
Vec3 | GetLinearVelocity () const |
| Get world space linear velocity of the center of mass.
|
|
void | SetLinearVelocity (Vec3Arg inLinearVelocity) |
| Set world space linear velocity of the center of mass.
|
|
void | SetLinearVelocityClamped (Vec3Arg inLinearVelocity) |
| Set world space linear velocity of the center of mass, will make sure the value is clamped against the maximum linear velocity.
|
|
Vec3 | GetAngularVelocity () const |
| Get world space angular velocity of the center of mass.
|
|
void | SetAngularVelocity (Vec3Arg inAngularVelocity) |
| Set world space angular velocity of the center of mass.
|
|
void | SetAngularVelocityClamped (Vec3Arg inAngularVelocity) |
| Set world space angular velocity of the center of mass, will make sure the value is clamped against the maximum angular velocity.
|
|
void | MoveKinematic (Vec3Arg inDeltaPosition, QuatArg inDeltaRotation, float inDeltaTime) |
| Set velocity of body such that it will be rotate/translate by inDeltaPosition/Rotation in inDeltaTime seconds.
|
|
void | ClampLinearVelocity () |
| Clamp velocity according to limit.
|
|
void | ClampAngularVelocity () |
|
float | GetLinearDamping () const |
| Get linear damping: dv/dt = -c * v. c must be between 0 and 1 but is usually close to 0.
|
|
void | SetLinearDamping (float inLinearDamping) |
|
float | GetAngularDamping () const |
| Get angular damping: dw/dt = -c * w. c must be between 0 and 1 but is usually close to 0.
|
|
void | SetAngularDamping (float inAngularDamping) |
|
float | GetGravityFactor () const |
| Get gravity factor (1 = normal gravity, 0 = no gravity)
|
|
void | SetGravityFactor (float inGravityFactor) |
|
void | SetMassProperties (const MassProperties &inMassProperties) |
| Set the mass and inertia tensor.
|
|
float | GetInverseMass () const |
| Get inverse mass (1 / mass). Should only be called on a dynamic object (static or kinematic bodies have infinite mass so should be treated as 1 / mass = 0)
|
|
float | GetInverseMassUnchecked () const |
|
void | SetInverseMass (float inInverseMass) |
|
Vec3 | GetInverseInertiaDiagonal () const |
| Diagonal of inverse inertia matrix: D. Should only be called on a dynamic object (static or kinematic bodies have infinite mass so should be treated as D = 0)
|
|
Quat | GetInertiaRotation () const |
| Rotation (R) that takes inverse inertia diagonal to local space: \(I_{body}^{-1} = R \: D \: R^{-1}\).
|
|
void | SetInverseInertia (Vec3Arg inDiagonal, QuatArg inRot) |
|
Mat44 | GetLocalSpaceInverseInertia () const |
| Get inverse inertia matrix ( \(I_{body}^{-1}\)). Will be a matrix of zeros for a static or kinematic object.
|
|
Mat44 | GetLocalSpaceInverseInertiaUnchecked () const |
| Same as GetLocalSpaceInverseInertia() but doesn't check if the body is dynamic.
|
|
Mat44 | GetInverseInertiaForRotation (Mat44Arg inRotation) const |
| Get inverse inertia matrix ( \(I^{-1}\)) for a given object rotation (translation will be ignored). Zero if object is static or kinematic.
|
|
JPH_INLINE Vec3 | MultiplyWorldSpaceInverseInertiaByVector (QuatArg inBodyRotation, Vec3Arg inV) const |
| Multiply a vector with the inverse world space inertia tensor ( \(I_{world}^{-1}\)). Zero if object is static or kinematic.
|
|
JPH_INLINE Vec3 | GetPointVelocityCOM (Vec3Arg inPointRelativeToCOM) const |
| Velocity of point inPoint (in center of mass space, e.g. on the surface of the body) of the body (unit: m/s)
|
|
JPH_INLINE Vec3 | GetAccumulatedForce () const |
|
JPH_INLINE Vec3 | GetAccumulatedTorque () const |
|
void | ApplyForceTorqueAndDragInternal (QuatArg inBodyRotation, Vec3Arg inGravity, float inDeltaTime) |
| Apply all accumulated forces, torques and drag (should only be called by the PhysicsSystem)
|
|
void | ResetForceAndTorqueInternal () |
| At the end of a simulation update the forces and torques need to be reset for the next frame.
|
|
uint32 | GetIslandIndexInternal () const |
| Access to the island index.
|
|
void | SetIslandIndexInternal (uint32 inIndex) |
|
uint32 | GetIndexInActiveBodiesInternal () const |
| Access to the index in the active bodies array.
|
|
void | ResetSleepTestSpheres (const RVec3 *inPoints) |
| Reset spheres to center around inPoints with radius 0.
|
|
void | SaveState (StateRecorder &inStream) const |
| Saving state for replay.
|
|
void | RestoreState (StateRecorder &inStream) |
| Restoring state for replay.
|
|
|
float | GetMaxLinearVelocity () const |
| Maximum linear velocity that a body can achieve. Used to prevent the system from exploding.
|
|
void | SetMaxLinearVelocity (float inLinearVelocity) |
|
float | GetMaxAngularVelocity () const |
| Maximum angular velocity that a body can achieve. Used to prevent the system from exploding.
|
|
void | SetMaxAngularVelocity (float inAngularVelocity) |
|
|
void | AddLinearVelocityStep (Vec3Arg inLinearVelocityChange) |
|
void | SubLinearVelocityStep (Vec3Arg inLinearVelocityChange) |
|
void | AddAngularVelocityStep (Vec3Arg inAngularVelocityChange) |
|
void | SubAngularVelocityStep (Vec3Arg inAngularVelocityChange) |
|
The Body class only keeps track of state for static bodies, the MotionProperties class keeps the additional state needed for a moving Body. It has a 1-on-1 relationship with the body.