|
Rapier C — 3D / f32 0.36.0+c.0
|
Impulse joints and reduced-coordinate articulations. More...
Data Structures | |
| struct | R3JointLimits |
| Lower and upper axis limits in length units or radians. More... | |
| struct | R3JointMotor |
| Position/velocity motor settings for one joint axis. More... | |
| struct | R3JointDesc |
| Copyable joint configuration. More... | |
| struct | R3ImpulseJointHandle |
| Copyable non-owning handle: world pointer plus entity index and generation. More... | |
| struct | R3MultibodyJointHandle |
| Copyable non-owning handle: world pointer plus entity index and generation. More... | |
| struct | R3JointBodies |
| World-bound handles of the two connected bodies. More... | |
| struct | R3JointImpulses |
| Impulses applied by an impulse joint during the last step, along the axes of its joint frame. More... | |
Macros | |
| #define | R3_JOINT_DOF_COUNT 6 |
| Number of translational and angular joint axes in this dimension. | |
| #define | R3_MOTOR_ACCELERATION_BASED 0 |
| Motor stiffness and damping are acceleration-based, independent of mass. | |
| #define | R3_MOTOR_FORCE_BASED 1 |
| Motor stiffness and damping are force-based, so response depends on mass. | |
| #define | R3_AXIS_LIN_X 0 |
| Joint axis index for translation along local X. | |
| #define | R3_AXIS_LIN_Y 1 |
| Joint axis index for translation along local Y. | |
| #define | R3_AXIS_ANG_X 3 |
| Joint axis index for the first rotation: Z in 2D, local X in 3D. | |
| #define | R3_JOINT_FIXED_AXES 63 |
| Locked-axis mask for a fixed joint: all translations and rotations. | |
| #define | R3_JOINT_REVOLUTE_AXES 55 |
| Locked-axis mask for a revolute joint: only the first angular axis is free. | |
| #define | R3_JOINT_PRISMATIC_AXES 62 |
| Locked-axis mask for a prismatic joint: only translation along local X is free. | |
| #define | R3_AXIS_LIN_Z 2 |
| Joint axis index for translation along local Z. | |
| #define | R3_AXIS_ANG_Y 4 |
| Joint axis index for rotation around local Y. | |
| #define | R3_AXIS_ANG_Z 5 |
| Joint axis index for rotation around local Z. | |
| #define | R3_JOINT_SPHERICAL_AXES 7 |
| Locked-axis mask for a spherical joint: translations locked, rotations free. | |
| #define | R3_MULTIBODY_JOINTS_ARE_KINEMATIC 1 |
| Insert reduced-coordinate joints as kinematic articulations. | |
| #define | R3_MULTIBODY_DISABLE_SELF_CONTACTS 2 |
| Disable contacts between colliders of the inserted articulation. | |
| #define | R3_MULTIBODY_SKIP_LOOP_CLOSURES 4 |
| Do not insert MJCF equality constraints (loop closures) as impulse joints. | |
| #define | R3_MULTIBODY_SKIP_JOINT_MOTORS 8 |
| Do not import joint motors into the articulation. | |
| #define | R3_MULTIBODY_SKIP_JOINT_LIMITS 16 |
| Do not import joint limits into the articulation. | |
| #define | R3_MULTIBODY_SKIP_JOINT_SPRINGS 32 |
| Do not import joint springs into the articulation. | |
Typedefs | |
| typedef struct R3JointLimits | R3JointLimits |
| Lower and upper axis limits in length units or radians. | |
| typedef struct R3JointMotor | R3JointMotor |
| Position/velocity motor settings for one joint axis. | |
| typedef struct R3JointDesc | R3JointDesc |
| Copyable joint configuration. | |
| typedef struct R3ImpulseJointHandle | R3ImpulseJointHandle |
| Copyable non-owning handle: world pointer plus entity index and generation. | |
| typedef struct R3MultibodyJointHandle | R3MultibodyJointHandle |
| Copyable non-owning handle: world pointer plus entity index and generation. | |
| typedef struct R3JointBodies | R3JointBodies |
| World-bound handles of the two connected bodies. | |
| typedef R3Bool(*) | R3IkJointCanMove(void *, struct R3RigidBodyHandle) |
| Optional per-link filter, called synchronously. | |
| typedef struct R3JointImpulses | R3JointImpulses |
| Impulses applied by an impulse joint during the last step, along the axes of its joint frame. | |
Functions | |
| struct R3JointDesc | r3DefaultJointDesc (void) |
| Return native default joint desc. | |
| struct R3JointDesc | r3FixedJointDesc (void) |
| Return a fixed joint description with native defaults; no allocation. | |
| struct R3JointDesc | r3RevoluteJointDesc (struct R3Vector axis_vector) |
| Returns a joint description. | |
| struct R3JointDesc | r3PrismaticJointDesc (struct R3Vector axis_vector) |
| Returns a joint description. | |
| struct R3JointDesc | r3RopeJointDesc (R3Real length) |
| Return a rope joint description with native defaults; no allocation. | |
| struct R3JointDesc | r3SpringJointDesc (R3Real length, R3Real stiffness, R3Real damping) |
| Return a spring joint description with native defaults; no allocation. | |
| struct R3JointDesc | r3SphericalJointDesc (void) |
| Return a spherical joint description with native defaults; no allocation. | |
| struct R3ImpulseJointHandle | r3InsertImpulseJoint (struct R3RigidBodyHandle body1, struct R3RigidBodyHandle body2, const struct R3JointDesc *joint) |
| Create an impulse joint connecting two bodies in the same world. | |
| struct R3MultibodyJointHandle | r3InsertMultibodyJoint (struct R3RigidBodyHandle body1, struct R3RigidBodyHandle body2, const struct R3JointDesc *joint) |
| Create an articulation joint between bodies in the same world. | |
| R3Status | r3RemoveImpulseJoint (struct R3ImpulseJointHandle handle, R3Bool wake_up) |
| Remove an impulse joint. | |
| size_t | r3ImpulseJointHandles (const struct R3World *world, struct R3ImpulseJointHandle *buffer, size_t capacity) |
| Copy entity handles. | |
| R3Status | r3RemoveMultibodyJoint (struct R3MultibodyJointHandle handle, R3Bool wake_up) |
| Remove an articulation joint. | |
| size_t | r3MultibodyJointHandles (const struct R3World *world, struct R3MultibodyJointHandle *buffer, size_t capacity) |
| Copy entity handles. | |
| struct R3JointBodies | r3ImpulseJoint_Bodies (struct R3ImpulseJointHandle handle) |
| Return the two bodies connected by an impulse joint. | |
| struct R3InverseKinematicsOptions | r3DefaultInverseKinematicsOptions (void) |
| Return native default inverse kinematics options. | |
| size_t | r3MultibodyJoint_Ndofs (struct R3MultibodyJointHandle handle) |
| Return the degrees of freedom of the whole multibody containing the joint (not of the joint alone), including the free root of a dynamic multibody. | |
| R3Status | r3MultibodyJoint_InverseKinematics (struct R3MultibodyJointHandle handle, const struct R3InverseKinematicsOptions *options, struct R3Pose target, R3IkJointCanMove can_move, void *user_data, R3Real *displacements, size_t count) |
| Read/write displacement buffer must contain exactly ndofs entries; zero it for a fresh solve. | |
| R3Status | r3MultibodyJoint_ApplyDisplacements (struct R3MultibodyJointHandle handle, const R3Real *displacements, size_t count) |
| Apply generalized articulation displacements in native degree-of-freedom order. | |
| size_t | r3MultibodyJoint_GeneralizedVelocity (struct R3MultibodyJointHandle handle, R3Real *buffer, size_t capacity) |
| Copy the articulation generalized velocities in native degree-of-freedom order. | |
| R3Status | r3MultibodyJoint_SetGeneralizedVelocity (struct R3MultibodyJointHandle handle, const R3Real *values, size_t count) |
| Replace articulation generalized velocities; the array length must match its degrees of freedom. | |
| struct R3JointDesc | r3ImpulseJoint_Desc (struct R3ImpulseJointHandle handle) |
| Copies joint configuration without returning a borrowed joint pointer. | |
| R3Status | r3ImpulseJoint_SetDesc (struct R3ImpulseJointHandle handle, const struct R3JointDesc *desc, R3Bool wake_up) |
| Replaces configuration after validation, resetting cached limit/motor impulses. | |
| R3Status | r3JointDesc_SetLocalFrame1 (struct R3JointDesc *desc, struct R3Pose value) |
| Set the joint desc joint frame relative to body 1. | |
| R3Status | r3ImpulseJoint_SetLocalFrame1 (struct R3ImpulseJointHandle handle, struct R3Pose value, R3Bool wake_up) |
| Set the impulse joint joint frame relative to body 1. | |
| R3Status | r3JointDesc_SetLocalFrame2 (struct R3JointDesc *desc, struct R3Pose value) |
| Set the joint desc joint frame relative to body 2. | |
| R3Status | r3ImpulseJoint_SetLocalFrame2 (struct R3ImpulseJointHandle handle, struct R3Pose value, R3Bool wake_up) |
| Set the impulse joint joint frame relative to body 2. | |
| R3Status | r3JointDesc_SetLocalAnchor1 (struct R3JointDesc *desc, struct R3Vector value) |
| Set the joint desc joint anchor relative to body 1. | |
| R3Status | r3ImpulseJoint_SetLocalAnchor1 (struct R3ImpulseJointHandle handle, struct R3Vector value, R3Bool wake_up) |
| Set the impulse joint joint anchor relative to body 1. | |
| R3Status | r3JointDesc_SetLocalAnchor2 (struct R3JointDesc *desc, struct R3Vector value) |
| Set the joint desc joint anchor relative to body 2. | |
| R3Status | r3ImpulseJoint_SetLocalAnchor2 (struct R3ImpulseJointHandle handle, struct R3Vector value, R3Bool wake_up) |
| Set the impulse joint joint anchor relative to body 2. | |
| R3Status | r3JointDesc_SetContactsEnabled (struct R3JointDesc *desc, R3Bool value) |
| Enable or disable allowing contacts between connected bodies for the joint desc. | |
| R3Status | r3ImpulseJoint_SetContactsEnabled (struct R3ImpulseJointHandle handle, R3Bool value, R3Bool wake_up) |
| Enable or disable allowing contacts between connected bodies for the impulse joint. | |
| R3Status | r3JointDesc_SetEnabled (struct R3JointDesc *desc, R3Bool value) |
| Enable or disable the joint desc. | |
| R3Status | r3ImpulseJoint_SetEnabled (struct R3ImpulseJointHandle handle, R3Bool value, R3Bool wake_up) |
| Enable or disable the impulse joint. | |
| R3Status | r3JointDesc_SetSoftness (struct R3JointDesc *desc, struct R3SpringCoefficients value) |
| Set the joint desc joint spring coefficients. | |
| R3Status | r3ImpulseJoint_SetSoftness (struct R3ImpulseJointHandle handle, struct R3SpringCoefficients value, R3Bool wake_up) |
| Set the impulse joint joint spring coefficients. | |
| R3Status | r3JointDesc_SetLockedAxes (struct R3JointDesc *desc, uint8_t value) |
| Set the joint desc translation/rotation lock bitmask. | |
| R3Status | r3ImpulseJoint_SetLockedAxes (struct R3ImpulseJointHandle handle, uint8_t value, R3Bool wake_up) |
| Set the impulse joint translation/rotation lock bitmask. | |
| R3Status | r3JointDesc_SetLimitAxes (struct R3JointDesc *desc, uint8_t value) |
| Set the joint desc joint axis mask with limits enabled. | |
| R3Status | r3ImpulseJoint_SetLimitAxes (struct R3ImpulseJointHandle handle, uint8_t value, R3Bool wake_up) |
| Set the impulse joint joint axis mask with limits enabled. | |
| R3Status | r3JointDesc_SetMotorAxes (struct R3JointDesc *desc, uint8_t value) |
| Set the joint desc joint axis mask with motors enabled. | |
| R3Status | r3ImpulseJoint_SetMotorAxes (struct R3ImpulseJointHandle handle, uint8_t value, R3Bool wake_up) |
| Set the impulse joint joint axis mask with motors enabled. | |
| R3Status | r3JointDesc_SetCoupledAxes (struct R3JointDesc *desc, uint8_t value) |
| Set the joint desc coupled joint axis mask. | |
| R3Status | r3ImpulseJoint_SetCoupledAxes (struct R3ImpulseJointHandle handle, uint8_t value, R3Bool wake_up) |
| Set the impulse joint coupled joint axis mask. | |
| R3Status | r3JointDesc_SetLocalAxis1 (struct R3JointDesc *desc, struct R3Vector value) |
| Set the joint desc joint principal axis in body 1 local coordinates. | |
| R3Status | r3ImpulseJoint_SetLocalAxis1 (struct R3ImpulseJointHandle handle, struct R3Vector value, R3Bool wake_up) |
| Set the impulse joint joint principal axis in body 1 local coordinates. | |
| R3Status | r3JointDesc_SetLocalAxis2 (struct R3JointDesc *desc, struct R3Vector value) |
| Set the joint desc joint principal axis in body 2 local coordinates. | |
| R3Status | r3ImpulseJoint_SetLocalAxis2 (struct R3ImpulseJointHandle handle, struct R3Vector value, R3Bool wake_up) |
| Set the impulse joint joint principal axis in body 2 local coordinates. | |
| R3Status | r3JointDesc_SetLimits (struct R3JointDesc *desc, uint32_t joint_axis, R3Real min, R3Real max) |
| Set the joint desc minimum and maximum limits on an axis (linear distance or angular radians). | |
| R3Status | r3ImpulseJoint_SetLimits (struct R3ImpulseJointHandle handle, uint32_t joint_axis, R3Real min, R3Real max, R3Bool wake_up) |
| Set the impulse joint minimum and maximum limits on an axis (linear distance or angular radians). | |
| R3Status | r3JointDesc_SetMotor (struct R3JointDesc *desc, uint32_t joint_axis, R3Real target_position, R3Real target_velocity, R3Real stiffness, R3Real damping) |
| Set the joint desc motor position/velocity targets and spring coefficients on an axis. | |
| R3Status | r3ImpulseJoint_SetMotor (struct R3ImpulseJointHandle handle, uint32_t joint_axis, R3Real target_position, R3Real target_velocity, R3Real stiffness, R3Real damping, R3Bool wake_up) |
| Set the impulse joint motor position/velocity targets and spring coefficients on an axis. | |
| R3Status | r3JointDesc_SetMotorMaxForce (struct R3JointDesc *desc, uint32_t joint_axis, R3Real max_force) |
| Set the joint desc maximum motor force or torque on an axis. | |
| R3Status | r3ImpulseJoint_SetMotorMaxForce (struct R3ImpulseJointHandle handle, uint32_t joint_axis, R3Real max_force, R3Bool wake_up) |
| Set the impulse joint maximum motor force or torque on an axis. | |
| R3Status | r3JointDesc_SetMotorModel (struct R3JointDesc *desc, uint32_t joint_axis, uint32_t model) |
| Set the joint desc motor model on an axis (0 = acceleration-based, 1 = force-based). | |
| R3Status | r3ImpulseJoint_SetMotorModel (struct R3ImpulseJointHandle handle, uint32_t joint_axis, uint32_t model, R3Bool wake_up) |
| Set the impulse joint motor model on an axis (0 = acceleration-based, 1 = force-based). | |
| R3Status | r3JointDesc_SetUserData (struct R3JointDesc *desc, struct R3UserData value) |
| Set the joint desc application-owned 128-bit user value. | |
| R3Status | r3ImpulseJoint_SetUserData (struct R3ImpulseJointHandle handle, struct R3UserData value, R3Bool wake_up) |
| Set the impulse joint application-owned 128-bit user value. | |
| R3Status | r3JointDesc_SetMotorPosition (struct R3JointDesc *desc, uint32_t joint_axis, R3Real target_position, R3Real stiffness, R3Real damping) |
| Set the joint desc motor position target and spring coefficients on an axis. | |
| R3Status | r3ImpulseJoint_SetMotorPosition (struct R3ImpulseJointHandle handle, uint32_t joint_axis, R3Real target_position, R3Real stiffness, R3Real damping, R3Bool wake_up) |
| Set the impulse joint motor position target and spring coefficients on an axis. | |
| R3Status | r3JointDesc_SetMotorVelocity (struct R3JointDesc *desc, uint32_t joint_axis, R3Real target_velocity, R3Real factor) |
| Set the joint desc motor velocity target and damping factor on an axis. | |
| R3Status | r3ImpulseJoint_SetMotorVelocity (struct R3ImpulseJointHandle handle, uint32_t joint_axis, R3Real target_velocity, R3Real factor, R3Bool wake_up) |
| Set the impulse joint motor velocity target and damping factor on an axis. | |
| struct R3JointImpulses | r3ImpulseJoint_Impulses (struct R3ImpulseJointHandle handle) |
| Return the impulses applied by the impulse joint during the last step. | |
| struct R3UserData | r3ImpulseJoint_UserData (struct R3ImpulseJointHandle handle) |
| Return the impulse joint application-owned 128-bit user value. | |
| size_t | r3ImpulseJointCount (const struct R3World *world) |
| Return the number of impulse joints in the world. | |
| size_t | r3MultibodyJointCount (const struct R3World *world) |
| Return the number of multibody joints in the world, which is the number of handles copied by r3MultibodyJointHandles. | |
| struct R3JointDesc | r3MultibodyJoint_Desc (struct R3MultibodyJointHandle handle) |
| Copies the multibody joint configuration without returning a borrowed joint pointer. | |
| R3Status | r3MultibodyJoint_SetDesc (struct R3MultibodyJointHandle handle, const struct R3JointDesc *desc, R3Bool wake_up) |
| Replaces the multibody joint configuration after validation. | |
| struct R3JointBodies | r3MultibodyJoint_Bodies (struct R3MultibodyJointHandle handle) |
| Return the two bodies connected by a multibody joint: its parent link, then its own link. | |
Impulse joints and reduced-coordinate articulations.
Axis indices are translation X/Y[/Z], then rotation Z in 2D or X/Y/Z in 3D. Masks use one bit per axis.
| #define R3_AXIS_ANG_X 3 |
Joint axis index for the first rotation: Z in 2D, local X in 3D.
| #define R3_AXIS_ANG_Y 4 |
Joint axis index for rotation around local Y.
| #define R3_AXIS_ANG_Z 5 |
Joint axis index for rotation around local Z.
| #define R3_AXIS_LIN_X 0 |
Joint axis index for translation along local X.
| #define R3_AXIS_LIN_Y 1 |
Joint axis index for translation along local Y.
| #define R3_AXIS_LIN_Z 2 |
Joint axis index for translation along local Z.
| #define R3_JOINT_DOF_COUNT 6 |
Number of translational and angular joint axes in this dimension.
| #define R3_JOINT_FIXED_AXES 63 |
Locked-axis mask for a fixed joint: all translations and rotations.
| #define R3_JOINT_PRISMATIC_AXES 62 |
Locked-axis mask for a prismatic joint: only translation along local X is free.
| #define R3_JOINT_REVOLUTE_AXES 55 |
Locked-axis mask for a revolute joint: only the first angular axis is free.
| #define R3_JOINT_SPHERICAL_AXES 7 |
Locked-axis mask for a spherical joint: translations locked, rotations free.
| #define R3_MOTOR_ACCELERATION_BASED 0 |
Motor stiffness and damping are acceleration-based, independent of mass.
| #define R3_MOTOR_FORCE_BASED 1 |
Motor stiffness and damping are force-based, so response depends on mass.
| #define R3_MULTIBODY_DISABLE_SELF_CONTACTS 2 |
Disable contacts between colliders of the inserted articulation.
| #define R3_MULTIBODY_JOINTS_ARE_KINEMATIC 1 |
Insert reduced-coordinate joints as kinematic articulations.
| #define R3_MULTIBODY_SKIP_JOINT_LIMITS 16 |
Do not import joint limits into the articulation.
MJCF only: URDF insertion rejects it.
| #define R3_MULTIBODY_SKIP_JOINT_MOTORS 8 |
Do not import joint motors into the articulation.
MJCF only: URDF insertion rejects it.
| #define R3_MULTIBODY_SKIP_JOINT_SPRINGS 32 |
Do not import joint springs into the articulation.
MJCF only: URDF insertion rejects it.
| #define R3_MULTIBODY_SKIP_LOOP_CLOSURES 4 |
Do not insert MJCF equality constraints (loop closures) as impulse joints.
MJCF only: URDF insertion rejects it.
| typedef R3Bool(*) R3IkJointCanMove(void *, struct R3RigidBodyHandle) |
Optional per-link filter, called synchronously.
Must not reenter or retain physics objects.
| typedef struct R3ImpulseJointHandle R3ImpulseJointHandle |
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 R3JointBodies R3JointBodies |
World-bound handles of the two connected bodies.
| typedef struct R3JointDesc R3JointDesc |
Copyable joint configuration.
Limits/motors take effect when their axis mask is enabled. Solver impulses are deliberately excluded. Applying data resets cached limit and motor impulses.
| typedef struct R3JointImpulses R3JointImpulses |
Impulses applied by an impulse joint during the last step, along the axes of its joint frame.
| typedef struct R3JointLimits R3JointLimits |
Lower and upper axis limits in length units or radians.
| typedef struct R3JointMotor R3JointMotor |
Position/velocity motor settings for one joint axis.
| typedef struct R3MultibodyJointHandle R3MultibodyJointHandle |
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.
| struct R3InverseKinematicsOptions r3DefaultInverseKinematicsOptions | ( | void | ) |
Return native default inverse kinematics options.
This POD value owns no resources.
| struct R3JointDesc r3DefaultJointDesc | ( | void | ) |
Return native default joint desc.
This POD value owns no resources.
| struct R3JointDesc r3FixedJointDesc | ( | void | ) |
Return a fixed joint description with native defaults; no allocation.
| struct R3JointBodies r3ImpulseJoint_Bodies | ( | struct R3ImpulseJointHandle | handle | ) |
Return the two bodies connected by an impulse joint.
| struct R3JointDesc r3ImpulseJoint_Desc | ( | struct R3ImpulseJointHandle | handle | ) |
Copies joint configuration without returning a borrowed joint pointer.
| struct R3JointImpulses r3ImpulseJoint_Impulses | ( | struct R3ImpulseJointHandle | handle | ) |
Return the impulses applied by the impulse joint during the last step.
They are zero before its first step, and their components are expressed along the axes of the joint frame.
| R3Status r3ImpulseJoint_SetContactsEnabled | ( | struct R3ImpulseJointHandle | handle, |
| R3Bool | value, | ||
| R3Bool | wake_up ) |
Enable or disable allowing contacts between connected bodies for the impulse joint.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetCoupledAxes | ( | struct R3ImpulseJointHandle | handle, |
| uint8_t | value, | ||
| R3Bool | wake_up ) |
Set the impulse joint coupled joint axis mask.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetDesc | ( | struct R3ImpulseJointHandle | handle, |
| const struct R3JointDesc * | desc, | ||
| R3Bool | wake_up ) |
Replaces configuration after validation, resetting cached limit/motor impulses.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetEnabled | ( | struct R3ImpulseJointHandle | handle, |
| R3Bool | value, | ||
| R3Bool | wake_up ) |
Enable or disable the impulse joint.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetLimitAxes | ( | struct R3ImpulseJointHandle | handle, |
| uint8_t | value, | ||
| R3Bool | wake_up ) |
Set the impulse joint joint axis mask with limits enabled.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetLimits | ( | struct R3ImpulseJointHandle | handle, |
| uint32_t | joint_axis, | ||
| R3Real | min, | ||
| R3Real | max, | ||
| R3Bool | wake_up ) |
Set the impulse joint minimum and maximum limits on an axis (linear distance or angular radians).
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetLocalAnchor1 | ( | struct R3ImpulseJointHandle | handle, |
| struct R3Vector | value, | ||
| R3Bool | wake_up ) |
Set the impulse joint joint anchor relative to body 1.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetLocalAnchor2 | ( | struct R3ImpulseJointHandle | handle, |
| struct R3Vector | value, | ||
| R3Bool | wake_up ) |
Set the impulse joint joint anchor relative to body 2.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetLocalAxis1 | ( | struct R3ImpulseJointHandle | handle, |
| struct R3Vector | value, | ||
| R3Bool | wake_up ) |
Set the impulse joint joint principal axis in body 1 local coordinates.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetLocalAxis2 | ( | struct R3ImpulseJointHandle | handle, |
| struct R3Vector | value, | ||
| R3Bool | wake_up ) |
Set the impulse joint joint principal axis in body 2 local coordinates.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetLocalFrame1 | ( | struct R3ImpulseJointHandle | handle, |
| struct R3Pose | value, | ||
| R3Bool | wake_up ) |
Set the impulse joint joint frame relative to body 1.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetLocalFrame2 | ( | struct R3ImpulseJointHandle | handle, |
| struct R3Pose | value, | ||
| R3Bool | wake_up ) |
Set the impulse joint joint frame relative to body 2.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetLockedAxes | ( | struct R3ImpulseJointHandle | handle, |
| uint8_t | value, | ||
| R3Bool | wake_up ) |
Set the impulse joint translation/rotation lock bitmask.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetMotor | ( | struct R3ImpulseJointHandle | handle, |
| uint32_t | joint_axis, | ||
| R3Real | target_position, | ||
| R3Real | target_velocity, | ||
| R3Real | stiffness, | ||
| R3Real | damping, | ||
| R3Bool | wake_up ) |
Set the impulse joint motor position/velocity targets and spring coefficients on an axis.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetMotorAxes | ( | struct R3ImpulseJointHandle | handle, |
| uint8_t | value, | ||
| R3Bool | wake_up ) |
Set the impulse joint joint axis mask with motors enabled.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetMotorMaxForce | ( | struct R3ImpulseJointHandle | handle, |
| uint32_t | joint_axis, | ||
| R3Real | max_force, | ||
| R3Bool | wake_up ) |
Set the impulse joint maximum motor force or torque on an axis.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetMotorModel | ( | struct R3ImpulseJointHandle | handle, |
| uint32_t | joint_axis, | ||
| uint32_t | model, | ||
| R3Bool | wake_up ) |
Set the impulse joint motor model on an axis (0 = acceleration-based, 1 = force-based).
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetMotorPosition | ( | struct R3ImpulseJointHandle | handle, |
| uint32_t | joint_axis, | ||
| R3Real | target_position, | ||
| R3Real | stiffness, | ||
| R3Real | damping, | ||
| R3Bool | wake_up ) |
Set the impulse joint motor position target and spring coefficients on an axis.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetMotorVelocity | ( | struct R3ImpulseJointHandle | handle, |
| uint32_t | joint_axis, | ||
| R3Real | target_velocity, | ||
| R3Real | factor, | ||
| R3Bool | wake_up ) |
Set the impulse joint motor velocity target and damping factor on an axis.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetSoftness | ( | struct R3ImpulseJointHandle | handle, |
| struct R3SpringCoefficients | value, | ||
| R3Bool | wake_up ) |
Set the impulse joint joint spring coefficients.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3ImpulseJoint_SetUserData | ( | struct R3ImpulseJointHandle | handle, |
| struct R3UserData | value, | ||
| R3Bool | wake_up ) |
Set the impulse joint application-owned 128-bit user value.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| struct R3UserData r3ImpulseJoint_UserData | ( | struct R3ImpulseJointHandle | handle | ) |
Return the impulse joint application-owned 128-bit user value.
| size_t r3ImpulseJointCount | ( | const struct R3World * | world | ) |
Return the number of impulse joints in the world.
| size_t r3ImpulseJointHandles | ( | const struct R3World * | world, |
| struct R3ImpulseJointHandle * | buffer, | ||
| size_t | capacity ) |
Copy entity handles.
| struct R3ImpulseJointHandle r3InsertImpulseJoint | ( | struct R3RigidBodyHandle | body1, |
| struct R3RigidBodyHandle | body2, | ||
| const struct R3JointDesc * | joint ) |
Create an impulse joint connecting two bodies in the same world.
The world owns the joint; wake_up wakes the connected bodies.
| struct R3MultibodyJointHandle r3InsertMultibodyJoint | ( | struct R3RigidBodyHandle | body1, |
| struct R3RigidBodyHandle | body2, | ||
| const struct R3JointDesc * | joint ) |
Create an articulation joint between bodies in the same world.
Returns an invalid handle on failure; check r3LastStatus.
| R3Status r3JointDesc_SetContactsEnabled | ( | struct R3JointDesc * | desc, |
| R3Bool | value ) |
Enable or disable allowing contacts between connected bodies for the joint desc.
| R3Status r3JointDesc_SetCoupledAxes | ( | struct R3JointDesc * | desc, |
| uint8_t | value ) |
Set the joint desc coupled joint axis mask.
| R3Status r3JointDesc_SetEnabled | ( | struct R3JointDesc * | desc, |
| R3Bool | value ) |
Enable or disable the joint desc.
| R3Status r3JointDesc_SetLimitAxes | ( | struct R3JointDesc * | desc, |
| uint8_t | value ) |
Set the joint desc joint axis mask with limits enabled.
| R3Status r3JointDesc_SetLimits | ( | struct R3JointDesc * | desc, |
| uint32_t | joint_axis, | ||
| R3Real | min, | ||
| R3Real | max ) |
Set the joint desc minimum and maximum limits on an axis (linear distance or angular radians).
| R3Status r3JointDesc_SetLocalAnchor1 | ( | struct R3JointDesc * | desc, |
| struct R3Vector | value ) |
Set the joint desc joint anchor relative to body 1.
| R3Status r3JointDesc_SetLocalAnchor2 | ( | struct R3JointDesc * | desc, |
| struct R3Vector | value ) |
Set the joint desc joint anchor relative to body 2.
| R3Status r3JointDesc_SetLocalAxis1 | ( | struct R3JointDesc * | desc, |
| struct R3Vector | value ) |
Set the joint desc joint principal axis in body 1 local coordinates.
| R3Status r3JointDesc_SetLocalAxis2 | ( | struct R3JointDesc * | desc, |
| struct R3Vector | value ) |
Set the joint desc joint principal axis in body 2 local coordinates.
| R3Status r3JointDesc_SetLocalFrame1 | ( | struct R3JointDesc * | desc, |
| struct R3Pose | value ) |
Set the joint desc joint frame relative to body 1.
| R3Status r3JointDesc_SetLocalFrame2 | ( | struct R3JointDesc * | desc, |
| struct R3Pose | value ) |
Set the joint desc joint frame relative to body 2.
| R3Status r3JointDesc_SetLockedAxes | ( | struct R3JointDesc * | desc, |
| uint8_t | value ) |
Set the joint desc translation/rotation lock bitmask.
| R3Status r3JointDesc_SetMotor | ( | struct R3JointDesc * | desc, |
| uint32_t | joint_axis, | ||
| R3Real | target_position, | ||
| R3Real | target_velocity, | ||
| R3Real | stiffness, | ||
| R3Real | damping ) |
Set the joint desc motor position/velocity targets and spring coefficients on an axis.
| R3Status r3JointDesc_SetMotorAxes | ( | struct R3JointDesc * | desc, |
| uint8_t | value ) |
Set the joint desc joint axis mask with motors enabled.
| R3Status r3JointDesc_SetMotorMaxForce | ( | struct R3JointDesc * | desc, |
| uint32_t | joint_axis, | ||
| R3Real | max_force ) |
Set the joint desc maximum motor force or torque on an axis.
| R3Status r3JointDesc_SetMotorModel | ( | struct R3JointDesc * | desc, |
| uint32_t | joint_axis, | ||
| uint32_t | model ) |
Set the joint desc motor model on an axis (0 = acceleration-based, 1 = force-based).
| R3Status r3JointDesc_SetMotorPosition | ( | struct R3JointDesc * | desc, |
| uint32_t | joint_axis, | ||
| R3Real | target_position, | ||
| R3Real | stiffness, | ||
| R3Real | damping ) |
Set the joint desc motor position target and spring coefficients on an axis.
| R3Status r3JointDesc_SetMotorVelocity | ( | struct R3JointDesc * | desc, |
| uint32_t | joint_axis, | ||
| R3Real | target_velocity, | ||
| R3Real | factor ) |
Set the joint desc motor velocity target and damping factor on an axis.
| R3Status r3JointDesc_SetSoftness | ( | struct R3JointDesc * | desc, |
| struct R3SpringCoefficients | value ) |
Set the joint desc joint spring coefficients.
| R3Status r3JointDesc_SetUserData | ( | struct R3JointDesc * | desc, |
| struct R3UserData | value ) |
Set the joint desc application-owned 128-bit user value.
| R3Status r3MultibodyJoint_ApplyDisplacements | ( | struct R3MultibodyJointHandle | handle, |
| const R3Real * | displacements, | ||
| size_t | count ) |
Apply generalized articulation displacements in native degree-of-freedom order.
| struct R3JointBodies r3MultibodyJoint_Bodies | ( | struct R3MultibodyJointHandle | handle | ) |
Return the two bodies connected by a multibody joint: its parent link, then its own link.
| struct R3JointDesc r3MultibodyJoint_Desc | ( | struct R3MultibodyJointHandle | handle | ) |
Copies the multibody joint configuration without returning a borrowed joint pointer.
| size_t r3MultibodyJoint_GeneralizedVelocity | ( | struct R3MultibodyJointHandle | handle, |
| R3Real * | buffer, | ||
| size_t | capacity ) |
Copy the articulation generalized velocities in native degree-of-freedom order.
| R3Status r3MultibodyJoint_InverseKinematics | ( | struct R3MultibodyJointHandle | handle, |
| const struct R3InverseKinematicsOptions * | options, | ||
| struct R3Pose | target, | ||
| R3IkJointCanMove | can_move, | ||
| void * | user_data, | ||
| R3Real * | displacements, | ||
| size_t | count ) |
Read/write displacement buffer must contain exactly ndofs entries; zero it for a fresh solve.
| size_t r3MultibodyJoint_Ndofs | ( | struct R3MultibodyJointHandle | handle | ) |
Return the degrees of freedom of the whole multibody containing the joint (not of the joint alone), including the free root of a dynamic multibody.
After inserting a joint, the root's contribution is only updated by the next step.
| R3Status r3MultibodyJoint_SetDesc | ( | struct R3MultibodyJointHandle | handle, |
| const struct R3JointDesc * | desc, | ||
| R3Bool | wake_up ) |
Replaces the multibody joint configuration after validation.
lockedAxes defines the degrees of freedom of the multibody and cannot change: a different value reports INVALID_ARGUMENT. wake_up = 1 wakes the two connected bodies; 0 preserves their sleep state.
| R3Status r3MultibodyJoint_SetGeneralizedVelocity | ( | struct R3MultibodyJointHandle | handle, |
| const R3Real * | values, | ||
| size_t | count ) |
Replace articulation generalized velocities; the array length must match its degrees of freedom.
| size_t r3MultibodyJointCount | ( | const struct R3World * | world | ) |
Return the number of multibody joints in the world, which is the number of handles copied by r3MultibodyJointHandles.
| size_t r3MultibodyJointHandles | ( | const struct R3World * | world, |
| struct R3MultibodyJointHandle * | buffer, | ||
| size_t | capacity ) |
Copy entity handles.
| struct R3JointDesc r3PrismaticJointDesc | ( | struct R3Vector | axis_vector | ) |
Returns a joint description.
Invalid axes produce nonfinite frames, rejected on insertion.
| R3Status r3RemoveImpulseJoint | ( | struct R3ImpulseJointHandle | handle, |
| R3Bool | wake_up ) |
Remove an impulse joint.
wake_up wakes its connected bodies.
| R3Status r3RemoveMultibodyJoint | ( | struct R3MultibodyJointHandle | handle, |
| R3Bool | wake_up ) |
Remove an articulation joint.
wake_up wakes affected bodies.
| struct R3JointDesc r3RevoluteJointDesc | ( | struct R3Vector | axis_vector | ) |
Returns a joint description.
Invalid axes produce nonfinite frames, rejected on insertion.
| struct R3JointDesc r3RopeJointDesc | ( | R3Real | length | ) |
Return a rope joint description with native defaults; no allocation.
| struct R3JointDesc r3SphericalJointDesc | ( | void | ) |
Return a spherical joint description with native defaults; no allocation.
| struct R3JointDesc r3SpringJointDesc | ( | R3Real | length, |
| R3Real | stiffness, | ||
| R3Real | damping ) |
Return a spring joint description with native defaults; no allocation.