|
Rapier C — 3D / f64 0.36.0+c.0
|
Descriptions and live, world-bound handles. More...
Data Structures | |
| struct | R3RigidBodyHandle |
| Copyable non-owning handle: world pointer plus entity index and generation. More... | |
| struct | R3RigidBodyDesc |
| Stack-allocated rigid-body construction data. More... | |
| struct | R3RigidBodyState |
| A copied state snapshot, with no pointers or ownership obligations. More... | |
Macros | |
| #define | R3_DYNAMIC 0 |
| Dynamic body affected by forces and contacts. | |
| #define | R3_FIXED 1 |
| Immovable body. | |
| #define | R3_KINEMATIC_POSITION_BASED 2 |
| Kinematic body controlled by its next pose. | |
| #define | R3_KINEMATIC_VELOCITY_BASED 3 |
| Kinematic body controlled by its velocity. | |
| #define | R3_LOCK_TRANSLATION_X 1 |
| Rigid-body lock bit: translation x. | |
| #define | R3_LOCK_TRANSLATION_Y 2 |
| Rigid-body lock bit: translation y. | |
| #define | R3_LOCK_TRANSLATION_Z 4 |
| Rigid-body lock bit: translation z. | |
| #define | R3_LOCK_ROTATION_X 8 |
| Rigid-body lock bit: rotation x. | |
| #define | R3_LOCK_ROTATION_Y 16 |
| Rigid-body lock bit: rotation y. | |
| #define | R3_LOCK_ROTATION_Z 32 |
| Rigid-body lock bit: rotation z. | |
Typedefs | |
| typedef struct R3RigidBodyHandle | R3RigidBodyHandle |
| Copyable non-owning handle: world pointer plus entity index and generation. | |
| typedef struct R3RigidBodyDesc | R3RigidBodyDesc |
| Stack-allocated rigid-body construction data. | |
| typedef struct R3RigidBodyState | R3RigidBodyState |
| A copied state snapshot, with no pointers or ownership obligations. | |
Functions | |
| struct R3RigidBodyDesc | r3DynamicRigidBodyDesc (void) |
| Return a dynamic rigid-body description with native defaults; no allocation. | |
| struct R3RigidBodyDesc | r3FixedRigidBodyDesc (void) |
| Return a fixed rigid-body description with native defaults; no allocation. | |
| struct R3RigidBodyDesc | r3KinematicPositionBasedRigidBodyDesc (void) |
| Return a kinematic position based rigid-body description with native defaults; no allocation. | |
| struct R3RigidBodyDesc | r3KinematicVelocityBasedRigidBodyDesc (void) |
| Return a kinematic velocity based rigid-body description with native defaults; no allocation. | |
| struct R3RigidBodyHandle | r3InsertRigidBody (struct R3World *world, const struct R3RigidBodyDesc *desc) |
| Create a body from the description and return its world-bound handle. | |
| R3Status | r3RigidBodyPropagateModifiedBodyPositionsToColliders (struct R3World *world) |
| Propagate all modified body poses to attached colliders. | |
| R3Status | r3RigidBody_WakeUp (struct R3RigidBodyHandle handle, R3Bool strong) |
| Wake a body by handle, including a soft-body cluster proxy. | |
| size_t | r3RigidBodyCount (const struct R3World *world) |
| Return the number of rigid body objects in the world. | |
| size_t | r3RigidBodyHandles (const struct R3World *world, struct R3RigidBodyHandle *buffer, size_t capacity) |
| Copy entity handles. | |
| R3Bool | r3RigidBody_Contains (struct R3RigidBodyHandle handle) |
| Test whether the live world contains this rigid body handle. | |
| R3Status | r3RemoveRigidBody (struct R3RigidBodyHandle handle, R3Bool remove_attached_colliders) |
| Remove a body and its joints, optionally keeping colliders as standalone objects. | |
| struct R3Pose | r3RigidBody_Position (struct R3RigidBodyHandle handle) |
| Return the rigid body world-space pose. | |
| struct R3Vector | r3RigidBody_Translation (struct R3RigidBodyHandle handle) |
| Return the rigid body world-space translation. | |
| struct R3Vector | r3RigidBody_Linvel (struct R3RigidBodyHandle handle) |
| Return the rigid body world-space linear velocity. | |
| R3AngVector | r3RigidBody_Angvel (struct R3RigidBodyHandle handle) |
| Return the rigid body world-space angular velocity (radians per second). | |
| R3Bool | r3RigidBody_IsSleeping (struct R3RigidBodyHandle handle) |
| Return whether the rigid body is sleeping. | |
| R3Bool | r3RigidBody_IsEnabled (struct R3RigidBodyHandle handle) |
| Return whether the rigid body is enabled. | |
| struct R3UserData | r3RigidBody_UserData (struct R3RigidBodyHandle handle) |
| Return the rigid body application-owned 128-bit user value. | |
| R3Status | r3RigidBody_SetPosition (struct R3RigidBodyHandle handle, struct R3Pose value, R3Bool wake_up) |
| Set the rigid body world-space pose. | |
| R3Status | r3RigidBody_SetTranslation (struct R3RigidBodyHandle handle, struct R3Vector value, R3Bool wake_up) |
| Set the rigid body world-space translation. | |
| R3Status | r3RigidBody_SetLinvel (struct R3RigidBodyHandle handle, struct R3Vector value, R3Bool wake_up) |
| Set the rigid body world-space linear velocity. | |
| R3Status | r3RigidBody_SetAngvel (struct R3RigidBodyHandle handle, R3AngVector value, R3Bool wake_up) |
| Set the rigid body world-space angular velocity (radians per second). | |
| R3Status | r3RigidBody_SetNextKinematicPosition (struct R3RigidBodyHandle handle, struct R3Pose value) |
| Set the rigid body next kinematic world-space pose. | |
| R3Status | r3RigidBody_SetNextKinematicTranslation (struct R3RigidBodyHandle handle, struct R3Vector value) |
| Set the rigid body next kinematic world-space translation. | |
| R3Status | r3RigidBody_SetGravityScale (struct R3RigidBodyHandle handle, R3Real value, R3Bool wake_up) |
| Set the rigid body gravity multiplier. | |
| R3Status | r3RigidBody_SetLinearDamping (struct R3RigidBodyHandle handle, R3Real value) |
| Set the rigid body linear damping coefficient. | |
| R3Status | r3RigidBody_SetAngularDamping (struct R3RigidBodyHandle handle, R3Real value) |
| Set the rigid body angular damping coefficient. | |
| R3Status | r3RigidBody_SetEnabled (struct R3RigidBodyHandle handle, R3Bool value) |
| Enable or disable the rigid body. | |
| R3Status | r3RigidBody_SetUserData (struct R3RigidBodyHandle handle, struct R3UserData value) |
| Set the rigid body application-owned 128-bit user value. | |
| R3Status | r3RigidBody_ApplyImpulse (struct R3RigidBodyHandle handle, struct R3Vector value, R3Bool wake_up) |
| Apply a world-space linear impulse. | |
| R3Status | r3RigidBody_ApplyImpulseAtPoint (struct R3RigidBodyHandle handle, struct R3Vector value, struct R3Vector point, R3Bool wake_up) |
| Apply a world-space impulse at a world-space point. | |
| R3Status | r3RigidBody_AddForce (struct R3RigidBodyHandle handle, struct R3Vector value, R3Bool wake_up) |
| Accumulate a world-space force; it persists until reset. | |
| R3Status | r3RigidBody_ResetForces (struct R3RigidBodyHandle handle, R3Bool wake_up) |
| Clear accumulated user forces. | |
| R3Status | r3RigidBody_Sleep (struct R3RigidBodyHandle handle) |
| Put the body to sleep. | |
| size_t | r3RigidBodyReadStates (const struct R3World *world, const struct R3RigidBodyHandle *handles, size_t handle_count, struct R3RigidBodyState *states, size_t capacity) |
| Copies states in the same order as handles, without allocating temporary storage. | |
| int8_t | r3RigidBody_DominanceGroup (struct R3RigidBodyHandle handle) |
| Return the rigid body signed dominance group. | |
| size_t | r3RigidBody_AdditionalSolverIterations (struct R3RigidBodyHandle handle) |
| Return the rigid body additional solver iterations for connected bodies. | |
| size_t | r3RigidBody_AdditionalPgsIterations (struct R3RigidBodyHandle handle) |
| Return the rigid body additional PGS iterations for connected bodies. | |
| R3Bool | r3RigidBody_IsFastRotationAllowed (struct R3RigidBodyHandle handle) |
| Return whether the rigid body may exceed the angular-velocity limit of its CCD. | |
| R3Status | r3RigidBody_SetAllowFastRotation (struct R3RigidBodyHandle handle, R3Bool value) |
| Allow or disallow the rigid body to exceed the angular-velocity limit of its CCD (e.g. | |
| R3Status | r3RigidBody_SetAdditionalMassProperties (struct R3RigidBodyHandle handle, struct R3MassProperties properties, R3Bool wake_up) |
| Set the rigid body local mass properties added to collider contributions. | |
| R3Status | r3RigidBody_RecomputeMassPropertiesFromColliders (struct R3RigidBodyHandle handle) |
| Recompute body mass and inertia from attached colliders and additional mass properties. | |
| R3Status | r3RigidBody_SetLockedAxes (struct R3RigidBodyHandle handle, uint8_t axes, R3Bool wake_up) |
| Set the rigid body translation/rotation lock bitmask. | |
| uint8_t | r3RigidBody_LockedAxes (struct R3RigidBodyHandle handle) |
| Return the rigid body translation/rotation lock bitmask. | |
| struct R3Pose | r3RigidBody_NextPosition (struct R3RigidBodyHandle handle) |
| Return the rigid body next kinematic world-space pose. | |
| struct R3Rotation | r3RigidBody_Rotation (struct R3RigidBodyHandle handle) |
| Return the rigid body world-space rotation. | |
| struct R3Vector | r3RigidBody_CenterOfMass (struct R3RigidBodyHandle handle) |
| Return the rigid body world-space center of mass. | |
| struct R3Vector | r3RigidBody_LocalCenterOfMass (struct R3RigidBodyHandle handle) |
| Return the rigid body body-local center of mass. | |
| struct R3Vector | r3RigidBody_UserForce (struct R3RigidBodyHandle handle) |
| Return the rigid body accumulated user-applied world-space force. | |
| R3AngVector | r3RigidBody_UserTorque (struct R3RigidBodyHandle handle) |
| Return the rigid body accumulated user-applied world-space torque. | |
| uint32_t | r3RigidBody_BodyType (struct R3RigidBodyHandle handle) |
| Return the rigid body body type (R3_DYNAMIC, R3_FIXED, or a kinematic kind). | |
| R3Real | r3RigidBody_Mass (struct R3RigidBodyHandle handle) |
| Return the rigid body mass. | |
| R3Real | r3RigidBody_GravityScale (struct R3RigidBodyHandle handle) |
| Return the rigid body gravity multiplier. | |
| R3Real | r3RigidBody_LinearDamping (struct R3RigidBodyHandle handle) |
| Return the rigid body linear damping coefficient. | |
| R3Real | r3RigidBody_AngularDamping (struct R3RigidBodyHandle handle) |
| Return the rigid body angular damping coefficient. | |
| R3Real | r3RigidBody_KineticEnergy (struct R3RigidBodyHandle handle) |
| Return the rigid body kinetic energy. | |
| R3Real | r3RigidBody_SoftCcdPrediction (struct R3RigidBodyHandle handle) |
| Return the rigid body soft-CCD prediction distance. | |
| R3Bool | r3RigidBody_IsCcdEnabled (struct R3RigidBodyHandle handle) |
| Return whether the rigid body is using continuous collision detection. | |
| R3Bool | r3RigidBody_IsDynamic (struct R3RigidBodyHandle handle) |
| Return whether the rigid body is dynamic. | |
| R3Bool | r3RigidBody_IsFixed (struct R3RigidBodyHandle handle) |
| Return whether the rigid body is fixed. | |
| R3Bool | r3RigidBody_IsKinematic (struct R3RigidBodyHandle handle) |
| Return whether the rigid body is kinematic. | |
| R3Bool | r3RigidBody_IsMoving (struct R3RigidBodyHandle handle) |
| Return whether the rigid body is moving. | |
| R3Bool | r3RigidBody_IsCcdActive (struct R3RigidBodyHandle handle) |
| Return whether the rigid body is currently using CCD for its motion. | |
| R3Status | r3RigidBody_SetRotation (struct R3RigidBodyHandle handle, struct R3Rotation value, R3Bool wake_up) |
| Set the rigid body world-space rotation. | |
| R3Status | r3RigidBody_SetBodyType (struct R3RigidBodyHandle handle, uint32_t value, R3Bool wake_up) |
| Set the rigid body body type (R3_DYNAMIC, R3_FIXED, or a kinematic kind). | |
| R3Status | r3RigidBody_SetNextKinematicRotation (struct R3RigidBodyHandle handle, struct R3Rotation value) |
| Set the rigid body next kinematic world-space rotation. | |
| R3Status | r3RigidBody_SetAdditionalMass (struct R3RigidBodyHandle handle, R3Real value, R3Bool wake_up) |
| Set the rigid body mass added to collider contributions. | |
| R3Status | r3RigidBody_SetSoftCcdPrediction (struct R3RigidBodyHandle handle, R3Real value) |
| Set the rigid body soft-CCD prediction distance. | |
| R3Status | r3RigidBody_SetCcdEnabled (struct R3RigidBodyHandle handle, R3Bool value) |
| Enable or disable using continuous collision detection for the rigid body. | |
| R3Status | r3RigidBody_SetTranslationsLocked (struct R3RigidBodyHandle handle, R3Bool value, R3Bool wake_up) |
| Enable or disable locking translation for the rigid body. | |
| R3Status | r3RigidBody_SetRotationsLocked (struct R3RigidBodyHandle handle, R3Bool value, R3Bool wake_up) |
| Enable or disable locking rotation for the rigid body. | |
| R3Status | r3RigidBody_SetDominanceGroup (struct R3RigidBodyHandle handle, int8_t value) |
| Set the rigid body signed dominance group. | |
| R3Status | r3RigidBody_SetAdditionalSolverIterations (struct R3RigidBodyHandle handle, size_t value) |
| Set the rigid body additional solver iterations for connected bodies. | |
| R3Status | r3RigidBody_SetAdditionalPgsIterations (struct R3RigidBodyHandle handle, size_t value) |
| Set the rigid body additional PGS iterations. | |
| R3Status | r3RigidBody_AddTorque (struct R3RigidBodyHandle handle, R3AngVector value, R3Bool wake_up) |
| Accumulate a world-space torque; it persists until reset. | |
| R3Status | r3RigidBody_ApplyTorqueImpulse (struct R3RigidBodyHandle handle, R3AngVector value, R3Bool wake_up) |
| Apply a world-space angular impulse. | |
| R3Status | r3RigidBody_AddForceAtPoint (struct R3RigidBodyHandle handle, struct R3Vector value, struct R3Vector point, R3Bool wake_up) |
| Accumulate a world-space force applied at a world-space point. | |
| R3Status | r3RigidBody_ResetTorques (struct R3RigidBodyHandle handle, R3Bool wake_up) |
| Clear accumulated user torques. | |
| struct R3Vector | r3RigidBody_VelocityAtPoint (struct R3RigidBodyHandle handle, struct R3Vector point) |
| Return world-space velocity at a world-space point, including angular motion. | |
| size_t | r3RigidBody_Colliders (struct R3RigidBodyHandle handle, struct R3ColliderHandle *buffer, size_t capacity) |
| Copy attached collider handles. | |
| R3Bool | r3RigidBody_GyroscopicForcesEnabled (struct R3RigidBodyHandle handle) |
| Return whether the rigid body is using gyroscopic forces. | |
| R3Status | r3RigidBody_SetGyroscopicForcesEnabled (struct R3RigidBodyHandle handle, R3Bool enabled) |
| Enable or disable using gyroscopic forces for the rigid body. | |
| R3Status | r3RigidBody_ValidateHandle (struct R3RigidBodyHandle handle) |
| Validate the index and generation in the live owning world. | |
Descriptions and live, world-bound handles.
Accessors return copies. Handle operations report INVALID_HANDLE for a removed/stale entity in a live world.
| #define R3_DYNAMIC 0 |
Dynamic body affected by forces and contacts.
| #define R3_FIXED 1 |
Immovable body.
| #define R3_KINEMATIC_POSITION_BASED 2 |
Kinematic body controlled by its next pose.
| #define R3_KINEMATIC_VELOCITY_BASED 3 |
Kinematic body controlled by its velocity.
| #define R3_LOCK_ROTATION_X 8 |
Rigid-body lock bit: rotation x.
| #define R3_LOCK_ROTATION_Y 16 |
Rigid-body lock bit: rotation y.
| #define R3_LOCK_ROTATION_Z 32 |
Rigid-body lock bit: rotation z.
| #define R3_LOCK_TRANSLATION_X 1 |
Rigid-body lock bit: translation x.
| #define R3_LOCK_TRANSLATION_Y 2 |
Rigid-body lock bit: translation y.
| #define R3_LOCK_TRANSLATION_Z 4 |
Rigid-body lock bit: translation z.
| typedef struct R3RigidBodyDesc R3RigidBodyDesc |
Stack-allocated rigid-body construction data.
Initialize with r3DynamicRigidBodyDesc, r3FixedRigidBodyDesc, or a kinematic description constructor. Copying this value is safe; it owns no resources and must never be freed by Rapier.
| typedef struct R3RigidBodyHandle R3RigidBodyHandle |
Copyable non-owning handle: world pointer plus entity index and generation.
The world must remain alive throughout every use. Copying does not retain it. UINT32_MAX/UINT32_MAX with a NULL world is invalid.
| typedef struct R3RigidBodyState R3RigidBodyState |
A copied state snapshot, with no pointers or ownership obligations.
| struct R3RigidBodyDesc r3DynamicRigidBodyDesc | ( | void | ) |
Return a dynamic rigid-body description with native defaults; no allocation.
| struct R3RigidBodyDesc r3FixedRigidBodyDesc | ( | void | ) |
Return a fixed rigid-body description with native defaults; no allocation.
| struct R3RigidBodyHandle r3InsertRigidBody | ( | struct R3World * | world, |
| const struct R3RigidBodyDesc * | desc ) |
Create a body from the description and return its world-bound handle.
The world owns the body.
| struct R3RigidBodyDesc r3KinematicPositionBasedRigidBodyDesc | ( | void | ) |
Return a kinematic position based rigid-body description with native defaults; no allocation.
| struct R3RigidBodyDesc r3KinematicVelocityBasedRigidBodyDesc | ( | void | ) |
Return a kinematic velocity based rigid-body description with native defaults; no allocation.
| R3Status r3RemoveRigidBody | ( | struct R3RigidBodyHandle | handle, |
| R3Bool | remove_attached_colliders ) |
Remove a body and its joints, optionally keeping colliders as standalone objects.
A removed or stale handle fails with R3_INVALID_HANDLE, like the other Remove functions. Removing a soft-body cluster proxy removes its cluster (see r3SoftBody_RemoveCluster). The root body of a soft body is rejected: remove the soft body with r3RemoveSoftBody.
| R3Status r3RigidBody_AddForce | ( | struct R3RigidBodyHandle | handle, |
| struct R3Vector | value, | ||
| R3Bool | wake_up ) |
Accumulate a world-space force; it persists until reset.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_AddForceAtPoint | ( | struct R3RigidBodyHandle | handle, |
| struct R3Vector | value, | ||
| struct R3Vector | point, | ||
| R3Bool | wake_up ) |
Accumulate a world-space force applied at a world-space point.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| size_t r3RigidBody_AdditionalPgsIterations | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body additional PGS iterations for connected bodies.
| size_t r3RigidBody_AdditionalSolverIterations | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body additional solver iterations for connected bodies.
| R3Status r3RigidBody_AddTorque | ( | struct R3RigidBodyHandle | handle, |
| R3AngVector | value, | ||
| R3Bool | wake_up ) |
Accumulate a world-space torque; it persists until reset.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Real r3RigidBody_AngularDamping | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body angular damping coefficient.
| R3AngVector r3RigidBody_Angvel | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body world-space angular velocity (radians per second).
| R3Status r3RigidBody_ApplyImpulse | ( | struct R3RigidBodyHandle | handle, |
| struct R3Vector | value, | ||
| R3Bool | wake_up ) |
Apply a world-space linear impulse.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_ApplyImpulseAtPoint | ( | struct R3RigidBodyHandle | handle, |
| struct R3Vector | value, | ||
| struct R3Vector | point, | ||
| R3Bool | wake_up ) |
Apply a world-space impulse at a world-space point.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_ApplyTorqueImpulse | ( | struct R3RigidBodyHandle | handle, |
| R3AngVector | value, | ||
| R3Bool | wake_up ) |
Apply a world-space angular impulse.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| uint32_t r3RigidBody_BodyType | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body body type (R3_DYNAMIC, R3_FIXED, or a kinematic kind).
| struct R3Vector r3RigidBody_CenterOfMass | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body world-space center of mass.
| size_t r3RigidBody_Colliders | ( | struct R3RigidBodyHandle | handle, |
| struct R3ColliderHandle * | buffer, | ||
| size_t | capacity ) |
Copy attached collider handles.
| R3Bool r3RigidBody_Contains | ( | struct R3RigidBodyHandle | handle | ) |
Test whether the live world contains this rigid body handle.
A removed/stale handle returns false.
| int8_t r3RigidBody_DominanceGroup | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body signed dominance group.
| R3Real r3RigidBody_GravityScale | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body gravity multiplier.
| R3Bool r3RigidBody_GyroscopicForcesEnabled | ( | struct R3RigidBodyHandle | handle | ) |
Return whether the rigid body is using gyroscopic forces.
| R3Bool r3RigidBody_IsCcdActive | ( | struct R3RigidBodyHandle | handle | ) |
Return whether the rigid body is currently using CCD for its motion.
| R3Bool r3RigidBody_IsCcdEnabled | ( | struct R3RigidBodyHandle | handle | ) |
Return whether the rigid body is using continuous collision detection.
| R3Bool r3RigidBody_IsDynamic | ( | struct R3RigidBodyHandle | handle | ) |
Return whether the rigid body is dynamic.
| R3Bool r3RigidBody_IsEnabled | ( | struct R3RigidBodyHandle | handle | ) |
Return whether the rigid body is enabled.
| R3Bool r3RigidBody_IsFastRotationAllowed | ( | struct R3RigidBodyHandle | handle | ) |
Return whether the rigid body may exceed the angular-velocity limit of its CCD.
| R3Bool r3RigidBody_IsFixed | ( | struct R3RigidBodyHandle | handle | ) |
Return whether the rigid body is fixed.
| R3Bool r3RigidBody_IsKinematic | ( | struct R3RigidBodyHandle | handle | ) |
Return whether the rigid body is kinematic.
| R3Bool r3RigidBody_IsMoving | ( | struct R3RigidBodyHandle | handle | ) |
Return whether the rigid body is moving.
| R3Bool r3RigidBody_IsSleeping | ( | struct R3RigidBodyHandle | handle | ) |
Return whether the rigid body is sleeping.
| R3Real r3RigidBody_KineticEnergy | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body kinetic energy.
| R3Real r3RigidBody_LinearDamping | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body linear damping coefficient.
| struct R3Vector r3RigidBody_Linvel | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body world-space linear velocity.
| struct R3Vector r3RigidBody_LocalCenterOfMass | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body body-local center of mass.
| uint8_t r3RigidBody_LockedAxes | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body translation/rotation lock bitmask.
| R3Real r3RigidBody_Mass | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body mass.
| struct R3Pose r3RigidBody_NextPosition | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body next kinematic world-space pose.
| struct R3Pose r3RigidBody_Position | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body world-space pose.
| R3Status r3RigidBody_RecomputeMassPropertiesFromColliders | ( | struct R3RigidBodyHandle | handle | ) |
Recompute body mass and inertia from attached colliders and additional mass properties.
| R3Status r3RigidBody_ResetForces | ( | struct R3RigidBodyHandle | handle, |
| R3Bool | wake_up ) |
Clear accumulated user forces.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_ResetTorques | ( | struct R3RigidBodyHandle | handle, |
| R3Bool | wake_up ) |
Clear accumulated user torques.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| struct R3Rotation r3RigidBody_Rotation | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body world-space rotation.
| R3Status r3RigidBody_SetAdditionalMass | ( | struct R3RigidBodyHandle | handle, |
| R3Real | value, | ||
| R3Bool | wake_up ) |
Set the rigid body mass added to collider contributions.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_SetAdditionalMassProperties | ( | struct R3RigidBodyHandle | handle, |
| struct R3MassProperties | properties, | ||
| R3Bool | wake_up ) |
Set the rigid body local mass properties added to collider contributions.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_SetAdditionalPgsIterations | ( | struct R3RigidBodyHandle | handle, |
| size_t | value ) |
Set the rigid body additional PGS iterations.
| R3Status r3RigidBody_SetAdditionalSolverIterations | ( | struct R3RigidBodyHandle | handle, |
| size_t | value ) |
Set the rigid body additional solver iterations for connected bodies.
| R3Status r3RigidBody_SetAllowFastRotation | ( | struct R3RigidBodyHandle | handle, |
| R3Bool | value ) |
Allow or disallow the rigid body to exceed the angular-velocity limit of its CCD (e.g.
for wheels).
| R3Status r3RigidBody_SetAngularDamping | ( | struct R3RigidBodyHandle | handle, |
| R3Real | value ) |
Set the rigid body angular damping coefficient.
| R3Status r3RigidBody_SetAngvel | ( | struct R3RigidBodyHandle | handle, |
| R3AngVector | value, | ||
| R3Bool | wake_up ) |
Set the rigid body world-space angular velocity (radians per second).
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_SetBodyType | ( | struct R3RigidBodyHandle | handle, |
| uint32_t | value, | ||
| R3Bool | wake_up ) |
Set the rigid body body type (R3_DYNAMIC, R3_FIXED, or a kinematic kind).
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_SetCcdEnabled | ( | struct R3RigidBodyHandle | handle, |
| R3Bool | value ) |
Enable or disable using continuous collision detection for the rigid body.
| R3Status r3RigidBody_SetDominanceGroup | ( | struct R3RigidBodyHandle | handle, |
| int8_t | value ) |
Set the rigid body signed dominance group.
| R3Status r3RigidBody_SetEnabled | ( | struct R3RigidBodyHandle | handle, |
| R3Bool | value ) |
Enable or disable the rigid body.
| R3Status r3RigidBody_SetGravityScale | ( | struct R3RigidBodyHandle | handle, |
| R3Real | value, | ||
| R3Bool | wake_up ) |
Set the rigid body gravity multiplier.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_SetGyroscopicForcesEnabled | ( | struct R3RigidBodyHandle | handle, |
| R3Bool | enabled ) |
Enable or disable using gyroscopic forces for the rigid body.
| R3Status r3RigidBody_SetLinearDamping | ( | struct R3RigidBodyHandle | handle, |
| R3Real | value ) |
Set the rigid body linear damping coefficient.
| R3Status r3RigidBody_SetLinvel | ( | struct R3RigidBodyHandle | handle, |
| struct R3Vector | value, | ||
| R3Bool | wake_up ) |
Set the rigid body world-space linear velocity.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_SetLockedAxes | ( | struct R3RigidBodyHandle | handle, |
| uint8_t | axes, | ||
| R3Bool | wake_up ) |
Set the rigid body translation/rotation lock bitmask.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_SetNextKinematicPosition | ( | struct R3RigidBodyHandle | handle, |
| struct R3Pose | value ) |
Set the rigid body next kinematic world-space pose.
| R3Status r3RigidBody_SetNextKinematicRotation | ( | struct R3RigidBodyHandle | handle, |
| struct R3Rotation | value ) |
Set the rigid body next kinematic world-space rotation.
| R3Status r3RigidBody_SetNextKinematicTranslation | ( | struct R3RigidBodyHandle | handle, |
| struct R3Vector | value ) |
Set the rigid body next kinematic world-space translation.
| R3Status r3RigidBody_SetPosition | ( | struct R3RigidBodyHandle | handle, |
| struct R3Pose | value, | ||
| R3Bool | wake_up ) |
Set the rigid body world-space pose.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_SetRotation | ( | struct R3RigidBodyHandle | handle, |
| struct R3Rotation | value, | ||
| R3Bool | wake_up ) |
Set the rigid body world-space rotation.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_SetRotationsLocked | ( | struct R3RigidBodyHandle | handle, |
| R3Bool | value, | ||
| R3Bool | wake_up ) |
Enable or disable locking rotation for the rigid body.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_SetSoftCcdPrediction | ( | struct R3RigidBodyHandle | handle, |
| R3Real | value ) |
Set the rigid body soft-CCD prediction distance.
| R3Status r3RigidBody_SetTranslation | ( | struct R3RigidBodyHandle | handle, |
| struct R3Vector | value, | ||
| R3Bool | wake_up ) |
Set the rigid body world-space translation.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_SetTranslationsLocked | ( | struct R3RigidBodyHandle | handle, |
| R3Bool | value, | ||
| R3Bool | wake_up ) |
Enable or disable locking translation for the rigid body.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3RigidBody_SetUserData | ( | struct R3RigidBodyHandle | handle, |
| struct R3UserData | value ) |
Set the rigid body application-owned 128-bit user value.
| R3Status r3RigidBody_Sleep | ( | struct R3RigidBodyHandle | handle | ) |
Put the body to sleep.
| R3Real r3RigidBody_SoftCcdPrediction | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body soft-CCD prediction distance.
| struct R3Vector r3RigidBody_Translation | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body world-space translation.
| struct R3UserData r3RigidBody_UserData | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body application-owned 128-bit user value.
| struct R3Vector r3RigidBody_UserForce | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body accumulated user-applied world-space force.
| R3AngVector r3RigidBody_UserTorque | ( | struct R3RigidBodyHandle | handle | ) |
Return the rigid body accumulated user-applied world-space torque.
| R3Status r3RigidBody_ValidateHandle | ( | struct R3RigidBodyHandle | handle | ) |
Validate the index and generation in the live owning world.
Cannot detect a world pointer that has already been freed.
| struct R3Vector r3RigidBody_VelocityAtPoint | ( | struct R3RigidBodyHandle | handle, |
| struct R3Vector | point ) |
Return world-space velocity at a world-space point, including angular motion.
| R3Status r3RigidBody_WakeUp | ( | struct R3RigidBodyHandle | handle, |
| R3Bool | strong ) |
Wake a body by handle, including a soft-body cluster proxy.
| size_t r3RigidBodyCount | ( | const struct R3World * | world | ) |
Return the number of rigid body objects in the world.
| size_t r3RigidBodyHandles | ( | const struct R3World * | world, |
| struct R3RigidBodyHandle * | buffer, | ||
| size_t | capacity ) |
Copy entity handles.
Propagate all modified body poses to attached colliders.
Run collision detection or step before querying the broad phase.
| size_t r3RigidBodyReadStates | ( | const struct R3World * | world, |
| const struct R3RigidBodyHandle * | handles, | ||
| size_t | handle_count, | ||
| struct R3RigidBodyState * | states, | ||
| size_t | capacity ) |
Copies states in the same order as handles, without allocating temporary storage.
All handles are validated before writing. On INVALID_HANDLE outputs are unchanged. NULL/0 is a size query. BUFFER_TOO_SMALL returns the required count and leaves states untouched.