Rapier C — 3D / f64 0.36.0+c.0
Loading...
Searching...
No Matches
rapier.h File Reference

Rapier C ABI. More...

Go to the source code of this file.

Data Structures

struct  R3SpringCoefficients
 Spring softness expressed as natural frequency and damping ratio. More...
struct  R3OptionalReal
 Optional scalar override; enabled = 0 selects no override. More...
struct  R3OptionalU32
 Optional unsigned integer override; enabled = 0 selects no override. More...
struct  R3SoftBodyMaterial
 Plain configuration data; initialize defaults, edit, then apply. More...
struct  R3SoftRecoverySettings
 Plain configuration data; initialize defaults, edit, then apply. More...
struct  R3SoftFemParameters
 Plain configuration data; initialize defaults, edit, then apply. More...
struct  R3SoftBodiesSettings
 Plain configuration data; initialize defaults, edit, then apply. More...
struct  R3IntegrationParameters
 Plain configuration data; initialize defaults, edit, then apply. More...
struct  R3Vector
 Cartesian vector with two or three components. More...
struct  R3Rotation
 2D: angle in radians. More...
struct  R3Pose
 Rigid transform combining translation and rotation. More...
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  R3UserData
 Application-defined 128-bit value. More...
struct  R3JointDesc
 Copyable joint configuration. More...
struct  R3ImpulseJointHandle
 Copyable non-owning handle: world pointer plus entity index and generation. More...
struct  R3RigidBodyHandle
 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  R3VolumeMeshParameters
 Parameters for the native volumetric mesher. More...
struct  R3VectorView
 Borrowed array of vector elements. More...
struct  R3RealView
 Borrowed array of real elements. More...
struct  R3IndexView
 Borrowed array of index elements. More...
struct  R3Edge
 Vertex indices for one edge; contiguous u32 fields with no padding. More...
struct  R3EdgeView
 Borrowed array of edge elements. More...
struct  R3SoftEdgeSoftness
 Spring-coefficient override for one soft-body edge. More...
struct  R3SoftEdgeSoftnessView
 Borrowed elements; count counts elements. More...
struct  R3SoftEdgeTear
 Tear-resistance override for one soft-body edge. More...
struct  R3SoftEdgeTearView
 Borrowed elements; count counts elements. More...
struct  R3Triangle
 Vertex indices for one triangle; contiguous u32 fields with no padding. More...
struct  R3TriangleView
 Borrowed array of triangle elements. More...
struct  R3Tetrahedron
 Vertex indices for one tetrahedron; contiguous u32 fields with no padding. More...
struct  R3TetrahedronView
 Borrowed array of tetrahedron elements. More...
struct  R3Dihedral
 Vertex indices for one dihedral; contiguous u32 fields with no padding. More...
struct  R3DihedralView
 Borrowed array of dihedral elements. More...
struct  R3SoftBodyDescView
 Borrowed array of soft-body descriptions. More...
struct  R3OptionalBool
 Optional boolean override. More...
struct  R3CompoundShapeView
 Borrowed elements; count counts elements. More...
struct  R3ShapeDesc
 Non-owning shape description. More...
struct  R3CompoundShapeDesc
 One compound child with a local pose and borrowed geometry description. More...
struct  R3MassProperties
 Explicit mass and principal inertia, matching MassProperties constructors. More...
struct  R3InteractionGroups
 Collision membership/filter masks and their pairwise combination rule. More...
struct  R3ColliderDesc
 Copyable collider construction data. More...
struct  R3SoftBodyDesc
 Copyable recipe, not an owned procedural builder. More...
struct  R3SoftBodyHandle
 Copyable non-owning handle: world pointer plus entity index and generation. More...
struct  R3SoftMeshBindingDesc
 Non-owning deformable binding description. More...
struct  R3ColliderHandle
 Copyable non-owning handle: world pointer plus entity index and generation. More...
struct  R3QueryFilter
 Scene-query flags, groups, and excluded handles. More...
struct  R3QueryOptions
 Copyable query settings. More...
struct  R3RayHit
 Closest ray intersection, with a world-space normal. More...
struct  R3PointProjection
 Closest projected world-space point and its collider. More...
struct  R3ShapeCastHit
 Shape-cast impact geometry; collider-side data is world-space, moving-shape data is local. More...
struct  R3ShapeCastOptions
 Sweep termination settings. More...
struct  R3Aabb
 Axis-aligned bounding box. More...
struct  R3RayToi
 Optional ray collider/time result. More...
struct  R3OptionalRayHit
 Optional full ray result. More...
struct  R3RigidBodyDesc
 Stack-allocated rigid-body construction data. More...
struct  R3PodLayout
 Sizes of the POD types in this library build, for foreign-language layout checks. More...
struct  R3CharacterLength
 CharacterLength counterpart: relative=1 scales with character height, relative=0 uses world units. More...
struct  R3CharacterAutostep
 Copy of the automatic stepping settings. More...
struct  R3CharacterMovement
 Allowed character motion and ground-contact state. More...
struct  R3CharacterCollision
 Collision recorded during character movement. More...
struct  R3PidGains
 Per-axis proportional, integral, and derivative controller gains. More...
struct  R3PdController
 Stateless proportional-derivative controller: a PID controller without integral term, stored as a plain value. More...
struct  R3VelocityCorrection
 Linear and angular velocity correction computed by a controller. More...
struct  R3CharacterControllerSettings
 Copy of character sliding, slope, and snapping settings. More...
struct  R3WheelTuning
 Wheel suspension/friction parameters. More...
struct  R3WheelState
 Copy of the current wheel pose, suspension, and contact state. More...
struct  R3ErrorHandler
 An optional thread-local error handler. More...
struct  R3JointBodies
 World-bound handles of the two connected bodies. More...
struct  R3InverseKinematicsOptions
 Damped least-squares inverse-kinematics parameters. More...
struct  R3CollisionEvent
 Collision start/stop flags match Rapier CollisionEventFlags. More...
struct  R3ContactForceEvent
 Contact-force event, enabled by flags and the collider force threshold. More...
struct  R3ContactModification
 Mutable per-manifold properties. More...
struct  R3PhysicsHooks
 Callbacks must not unwind or retain arguments. More...
struct  R3ByteView
 Borrowed bytes. More...
struct  R3DebugLine
 World-space line segment produced by physics debug rendering. More...
struct  R3ParticleDestination
 Particle remapping after tearing. More...
struct  R3SoftClusterSplit
 Cluster and proxy remapping after a soft-body split. More...
struct  R3SoftJointMove
 Impulse-joint movement between rigid proxies after tearing. More...
struct  R3OptionalParticleDestination
 Optional particle remapping; check found before reading the destination. More...
struct  R3BuildInfo
 Runtime ABI identity and fundamental type sizes. More...
struct  R3BuildFeatures
 Features available through the loaded C library, independent of consumer defines. More...
struct  R3ContactPair
 Current narrow-phase pair and accumulated solver impulse summary. More...
struct  R3IntersectionPair
 Sensor intersection state for a collider pair. More...
struct  R3ContactPoint
 One manifold contact and its normal solver impulse. More...
struct  R3RigidBodyState
 A copied state snapshot, with no pointers or ownership obligations. More...
struct  R3SoftMeshId
 Stable identity of a live mesh within one soft body; matches Rapier's SoftMeshId. More...
struct  R3SoftMeshInfo
 Mesh identity and rendering metadata. More...
struct  R3VoxelKey
 Integer coordinates of a voxel cell. More...
struct  R3VoxelQuery
 Optional voxel lookup result; check found before reading voxel data. More...
struct  R3JointImpulses
 Impulses applied by an impulse joint during the last step, along the axes of its joint frame. More...
struct  R3OptionalShapeCastHit
 Optional shape-cast result. More...
struct  R3OptionalPointProjection
 Optional point projection. More...
struct  R3NonlinearRigidMotion
 Rigid motion with constant linear and angular velocities. More...
struct  R3OptionalContactPair
 Optional contact pair; check found before reading the pair. More...
struct  R3OptionalIntersectionPair
 Optional intersection pair; check found before reading the pair. More...
struct  R3ContactManifold
 Geometric contact manifold of a contact pair: contacts sharing one normal. More...
struct  R3SolverContact
 Contact seen by the constraint solver. More...
struct  R3EventCallbacks
 Callbacks invoked while stepping, in addition to collecting the events. More...
struct  R3DebugRenderStyle
 Debug-render colors and sizes. More...

Macros

#define R3_DIMENSION   3
 Spatial dimension selected by this header.
#define RAPIER_TYPE(name)
 Select an R2/R3 public type name.
#define RAPIER_CONST(name)
 Select an R2/R3 public constant name.
#define RAPIER_FN(name)
 Select an r2/r3 public function name.
#define RAPIER_CALL
 C ABI calling convention.
#define R3_FRICTION_MODEL_SIMPLIFIED   0
 Friction model solving one Coulomb friction constraint per group of up to 4 contacts plus a twist constraint; faster but less accurate (default).
#define R3_FRICTION_MODEL_COULOMB   1
 Friction model solving one Coulomb friction constraint per contact point.
#define R3_JOINT_DOF_COUNT   6
 Number of translational and angular joint axes in this dimension.
#define R3_SOFT_DESC_PARTICLES   0
 Soft-body selector: desc particles.
#define R3_SOFT_DESC_ROPE   1
 Soft-body selector: desc rope.
#define R3_SOFT_DESC_GRID   2
 Soft-body selector: desc grid.
#define R3_SOFT_DESC_CLOTH   3
 Soft-body selector: desc cloth.
#define R3_SOFT_DESC_CUBOID   4
 Soft-body selector: desc cuboid.
#define R3_SOFT_DESC_SURFACE   5
 Soft-body selector: desc surface.
#define R3_SOFT_DESC_DISK   6
 Soft-body selector: desc disk.
#define R3_SOFT_DESC_SPHERE   7
 Soft-body selector: desc sphere.
#define R3_SOFT_DESC_CLOTH_TUBE   8
 Soft-body selector: desc cloth tube.
#define R3_SOFT_DESC_VOLUMETRIC   9
 Soft-body selector: desc volumetric.
#define R3_SOFT_DESC_CLOTH_ANISOTROPIC   12
 Soft-body selector: cloth with separate warp, weft and shear softness (3D).
#define R3_SOFT_BINDING_SKINNED   0
 Soft-body selector: binding skinned.
#define R3_SOFT_BINDING_DIRECT   1
 Soft-body selector: binding direct.
#define R3_SOFT_BINDING_DIRECT_BY_POSITION   2
 Soft-body selector: binding direct by position.
#define R3_POLYLINE_DEFORMABLE   2
 Prepare polyline acceleration data for deformation.
#define R3_SHAPE_DESC_BALL   0
 ShapeDesc kind selecting a ball.
#define R3_SHAPE_DESC_CUBOID   1
 ShapeDesc kind selecting a cuboid.
#define R3_SHAPE_DESC_ROUND_CUBOID   2
 ShapeDesc kind selecting a round cuboid.
#define R3_SHAPE_DESC_CAPSULE   3
 ShapeDesc kind selecting a capsule.
#define R3_SHAPE_DESC_SEGMENT   4
 ShapeDesc kind selecting a segment.
#define R3_SHAPE_DESC_TRIANGLE   5
 ShapeDesc kind selecting a triangle.
#define R3_SHAPE_DESC_HALFSPACE   6
 ShapeDesc kind selecting a half-space.
#define R3_SHAPE_DESC_CONVEX_HULL   7
 ShapeDesc kind selecting a convex hull.
#define R3_SHAPE_DESC_TRIMESH   8
 ShapeDesc kind selecting a triangle mesh.
#define R3_SHAPE_DESC_POLYLINE   9
 ShapeDesc kind selecting a polyline.
#define R3_SHAPE_DESC_SHARED   10
 ShapeDesc kind selecting borrowed shared geometry.
#define R3_SHAPE_DESC_HEIGHTFIELD   11
 ShapeDesc kind selecting a heightfield.
#define R3_SHAPE_DESC_CYLINDER   12
 ShapeDesc kind selecting a cylinder.
#define R3_SHAPE_DESC_CONE   13
 ShapeDesc kind selecting a cone.
#define R3_SHAPE_DESC_COMPOUND   14
 ShapeDesc kind selecting compound child shapes.
#define R3_SHAPE_DESC_ROUND_CYLINDER   15
 ShapeDesc kind selecting a round cylinder.
#define R3_SHAPE_DESC_ROUND_CONE   16
 ShapeDesc kind selecting a round cone.
#define R3_MASS_DENSITY   0
 Mass density.
#define R3_MASS_TOTAL   1
 Mass total.
#define R3_MASS_PROPERTIES   2
 Mass properties.
#define R3_ABI_VERSION   1
 C binary ABI revision expected by this header.
#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_COLLISION_EVENTS   1
 Enable collision-start and collision-stop events for this collider.
#define R3_CONTACT_FORCE_EVENTS   2
 Enable contact-force events for this collider, subject to its force threshold.
#define R3_COMBINE_AVERAGE   0
 Combine the two material coefficients by their arithmetic mean.
#define R3_COMBINE_MIN   1
 Use the smaller of the two material coefficients.
#define R3_COMBINE_MULTIPLY   2
 Multiply the two material coefficients.
#define R3_COMBINE_MAX   3
 Use the larger of the two material coefficients.
#define R3_COMBINE_CLAMPED_SUM   4
 Use the sum of the two material coefficients, clamped to [0, 1].
#define R3_COMBINE_GEOMETRIC_MEAN   5
 Use the geometric mean (square root of the product) of the two material coefficients.
#define R3_COLLISION_TYPES_DYNAMIC_DYNAMIC   1
 Active collision type bit: contacts between two dynamic bodies.
#define R3_COLLISION_TYPES_DYNAMIC_KINEMATIC   12
 Active collision type bit: contacts between a dynamic and a kinematic body.
#define R3_COLLISION_TYPES_DYNAMIC_FIXED   2
 Active collision type bit: contacts between a dynamic and a fixed body (or a collider without parent).
#define R3_COLLISION_TYPES_KINEMATIC_KINEMATIC   52224
 Active collision type bit: contacts between two kinematic bodies.
#define R3_COLLISION_TYPES_KINEMATIC_FIXED   8704
 Active collision type bit: contacts between a kinematic and a fixed body (or a collider without parent).
#define R3_COLLISION_TYPES_FIXED_FIXED   32
 Active collision type bit: contacts between two fixed bodies (or colliders without parent).
#define R3_COLLISION_TYPES_DEFAULT   15
 Default active collision types: dynamic-dynamic, dynamic-kinematic, and dynamic-fixed.
#define R3_FILTER_CONTACT_PAIRS   1
 Invoke the contact-pair filtering hook for this collider.
#define R3_FILTER_INTERSECTION_PAIR   2
 Invoke the sensor-intersection filtering hook for this collider.
#define R3_MODIFY_SOLVER_CONTACTS   4
 Invoke the solver-contact modification hook for this collider.
#define R3_QUERY_EXCLUDE_FIXED   1
 Query filter: exclude fixed.
#define R3_QUERY_EXCLUDE_KINEMATIC   2
 Query filter: exclude kinematic.
#define R3_QUERY_EXCLUDE_DYNAMIC   4
 Query filter: exclude dynamic.
#define R3_QUERY_EXCLUDE_SENSORS   8
 Query filter: exclude sensors.
#define R3_QUERY_EXCLUDE_SOLIDS   16
 Query filter: exclude solids.
#define R3_QUERY_ONLY_DYNAMIC   3
 Query filter: only dynamic.
#define R3_QUERY_ONLY_KINEMATIC   5
 Query filter: only kinematic.
#define R3_QUERY_ONLY_FIXED   6
 Query filter: only fixed.
#define R3_DEBUG_COLLIDER_SHAPES   1
 Debug-render flag: collider shapes.
#define R3_DEBUG_RIGID_BODY_AXES   2
 Debug-render flag: rigid body axes.
#define R3_DEBUG_MULTIBODY_JOINTS   4
 Debug-render flag: multibody joints.
#define R3_DEBUG_IMPULSE_JOINTS   8
 Debug-render flag: impulse joints.
#define R3_DEBUG_SOLVER_CONTACTS   16
 Debug-render flag: solver contacts.
#define R3_DEBUG_CONTACTS   32
 Debug-render flag: contacts.
#define R3_DEBUG_COLLIDER_AABBS   64
 Debug-render flag: collider aabbs.
#define R3_DEBUG_SOFT_BODIES   128
 Debug-render flag: soft bodies.
#define R3_DEBUG_PSEUDO_NORMALS   256
 Debug-render flag: pseudo normals.
#define R3_DEBUG_SOFT_VOLUME_CONTACTS   512
 Debug-render flag: soft volume contacts.
#define R3_DEBUG_SOFT_BODY_STRESS   1024
 Debug-render flag: soft body stress.
#define R3_GROUPS_AND   0
 Require both membership/filter intersections to be nonempty.
#define R3_GROUPS_OR   1
 Accept either membership/filter intersection if both participants select OR; otherwise use AND.
#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_SOFT_CELL_VOLUME   0
 Cell model that constrains volume without elastic shear response.
#define R3_SOFT_CELL_COROTATIONAL   1
 Corotational elastic cell model.
#define R3_SOFT_CELL_NEO_HOOKEAN   2
 Neo-Hookean elastic cell model.
#define R3_SOFT_SOLVER_CONSTRAINTS   0
 Use the constraint-based soft-body solver.
#define R3_SOFT_SOLVER_FEM   1
 Use the finite-element solver; requires RAPIER_FEM.
#define R3_SOFT_EDGE_PLASTIC_FLOW_BOTH   0
 Edge plastic flow (R3SoftBodyMaterial::edgePlasticFlow): both a squeeze and a stretch set.
#define R3_SOFT_EDGE_PLASTIC_FLOW_COMPRESSION   1
 Edge plastic flow: only a squeeze sets; a stretched edge springs back.
#define R3_SOFT_EDGE_PLASTIC_FLOW_TENSION   2
 Edge plastic flow: only a stretch sets; a squeezed edge springs back.
#define R3_SOFT_PATCH_CONSTRAINTS_KEEP   0
 Overlap patch constraints (R3SoftRecoverySettings::overlapPatchConstraints): keep them.
#define R3_SOFT_PATCH_CONSTRAINTS_STAND_DOWN   1
 Overlap patch constraints: stand them down inside the patch.
#define R3_SOFT_PATCH_CONSTRAINTS_ALONG_NORMAL   2
 Overlap patch constraints: align them with the overlap normal.
#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_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.
#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_SOFT_FRAME   4
 Read-only body type of soft-body cluster proxies; cannot be used to construct a rigid body.
#define R3_SHAPE_CAST_OUT_OF_ITERATIONS   0
 Shape-cast iteration limit reached before convergence.
#define R3_SHAPE_CAST_CONVERGED   1
 Shape cast converged to the reported impact.
#define R3_SHAPE_CAST_FAILED   2
 Shape-cast numerical solver failed to converge.
#define R3_SHAPE_CAST_PENETRATING   3
 Shapes overlap or are within the target distance at the start of the cast.
#define R3_FEATURE_UNKNOWN   0
 The hit feature is unspecified.
#define R3_FEATURE_VERTEX   1
 The feature ID denotes a vertex.
#define R3_FEATURE_EDGE   2
 The feature ID denotes an edge.
#define R3_FEATURE_FACE   3
 The feature ID denotes a face.
#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.
#define R3_TRIMESH_HALF_EDGE_TOPOLOGY   1
 Compute the half-edge topology of the triangle mesh.
#define R3_TRIMESH_CONNECTED_COMPONENTS   2
 Compute the connected components of the triangle mesh.
#define R3_TRIMESH_DELETE_BAD_TOPOLOGY_TRIANGLES   4
 Delete the triangles breaking the half-edge topology.
#define R3_TRIMESH_ORIENTED   8
 Treat the triangle mesh as oriented (outward normals) and compute its pseudo-normals.
#define R3_TRIMESH_MERGE_DUPLICATE_VERTICES   16
 Merge triangle-mesh vertices with identical positions.
#define R3_TRIMESH_DELETE_DEGENERATE_TRIANGLES   32
 Delete the triangles with a zero area.
#define R3_TRIMESH_DELETE_DUPLICATE_TRIANGLES   64
 Delete the triangles sharing their three vertices with another triangle.
#define R3_TRIMESH_FIX_INTERNAL_EDGES   144
 Correct contact normals at internal mesh edges; includes duplicate-vertex merging.
#define R3_TRIMESH_DEFORMABLE   256
 Prepare triangle-mesh acceleration data for deformation.
#define R3_TRIMESH_FIX_INTERNAL_EDGES_TWO_SIDED   656
 Correct internal-edge contacts on both sides of the triangle mesh.
#define R3_HEIGHTFIELD_FIX_INTERNAL_EDGES   1
 Correct contact normals at internal heightfield edges.
#define R3_AXES_MASK_LIN_X   1
 Controller axis bit: translation along X.
#define R3_AXES_MASK_LIN_Y   2
 Controller axis bit: translation along Y.
#define R3_AXES_MASK_LIN_Z   4
 Controller axis bit: translation along Z.
#define R3_AXES_MASK_ANG_X   8
 Controller axis bit: rotation about X.
#define R3_AXES_MASK_ANG_Y   16
 Controller axis bit: rotation about Y.
#define R3_AXES_MASK_ANG_Z   32
 Controller axis bit: rotation about Z (the only rotation axis in 2D).
#define R3_ABI_FEATURE_FEM   1
 ABI feature bit: RAPIER_FEM, which changes the layout of R3IntegrationParameters.
#define R3_ABI_FEATURE_ROBOTICS   2
 ABI feature bit: RAPIER_ROBOTICS (3D, f32 only), which declares the URDF/MJCF API.
#define R3_ABI_FEATURES   1
 R3_ABI_FEATURE_* bits selected by the defines of this header; pass it to CheckAbi.
#define R3_COLLISION_EVENT_SENSOR   1
 Collision event flag: at least one of the colliders was a sensor when the event fired.
#define R3_COLLISION_EVENT_REMOVED   2
 Collision event flag: the collision stopped because at least one collider was removed.
#define R3_OK   0
 Operation succeeded.
#define R3_NULL_POINTER   1
 A required pointer was NULL.
#define R3_INVALID_ARGUMENT   2
 An argument failed validation.
#define R3_INVALID_HANDLE   3
 The entity handle is stale, invalid, or belongs to another world.
#define R3_BUFFER_TOO_SMALL   4
 Output capacity is insufficient; the returned count is the required capacity.
#define R3_UNSUPPORTED   5
 This build or object does not support the operation.
#define R3_PANIC   6
 Rust panicked; discard objects mutated by the call.
#define R3_NOT_FOUND   7
 No matching query result or object was found.
#define R3_WORLD_BUSY   8
 Conflicting or reentrant access to simulation state.

Typedefs

typedef struct R3Bytes R3Bytes
 Immutable owned byte buffer.
typedef struct R3ContactModificationContext R3ContactModificationContext
 Borrowed native contact context.
typedef struct R3DynamicRayCastVehicleController R3DynamicRayCastVehicleController
 Vehicle controller borrowing its chassis world.
typedef struct R3EventCollector R3EventCollector
 Events accumulate across steps until r3EventCollector_Clear: reading them never drains the collector, allowing two-call buffer sizing.
typedef struct R3KinematicCharacterController R3KinematicCharacterController
 Controller plus reusable collision output from the last move_shape call.
typedef struct R3PidController R3PidController
 PID controller with persistent integral state.
typedef struct R3ReadContext R3ReadContext
 Callback-scoped read access to bodies and colliders.
typedef struct R3ShapeMesh R3ShapeMesh
 Owned tessellated shape: flat triangle vertices and independent line segments, in local space.
typedef struct R3SoftBodyTearEvent R3SoftBodyTearEvent
 Owned copy of a tear event.
typedef struct R3TriMeshData R3TriMeshData
 Owned indexed geometry from Parry's shape tessellation, preserving its vertex order.
typedef struct R3World R3World
 Sole owner of simulation state.
typedef double R3Real
 Floating-point scalar: float for f32, double for f64.
typedef struct R3SpringCoefficients R3SpringCoefficients
 Spring softness expressed as natural frequency and damping ratio.
typedef uint32_t R3Bool
 ABI booleans are uint32_t: zero is false, one is true.
typedef struct R3OptionalReal R3OptionalReal
 Optional scalar override; enabled = 0 selects no override.
typedef struct R3OptionalU32 R3OptionalU32
 Optional unsigned integer override; enabled = 0 selects no override.
typedef struct R3SoftBodyMaterial R3SoftBodyMaterial
 Plain configuration data; initialize defaults, edit, then apply.
typedef struct R3SoftRecoverySettings R3SoftRecoverySettings
 Plain configuration data; initialize defaults, edit, then apply.
typedef struct R3SoftFemParameters R3SoftFemParameters
 Plain configuration data; initialize defaults, edit, then apply.
typedef struct R3SoftBodiesSettings R3SoftBodiesSettings
 Plain configuration data; initialize defaults, edit, then apply.
typedef struct R3IntegrationParameters R3IntegrationParameters
 Plain configuration data; initialize defaults, edit, then apply.
typedef uint32_t R3Status
 Status-returning operations use these integer codes.
typedef struct R3Vector R3Vector
 Cartesian vector with two or three components.
typedef struct R3Rotation R3Rotation
 2D: angle in radians.
typedef struct R3Pose R3Pose
 Rigid transform combining translation and rotation.
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 R3UserData R3UserData
 Application-defined 128-bit value.
typedef struct R3JointDesc R3JointDesc
 Copyable joint configuration.
typedef struct R3ImpulseJointHandle R3ImpulseJointHandle
 Copyable non-owning handle: world pointer plus entity index and generation.
typedef struct R3RigidBodyHandle R3RigidBodyHandle
 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 R3VolumeMeshParameters R3VolumeMeshParameters
 Parameters for the native volumetric mesher.
typedef struct R3VectorView R3VectorView
 Borrowed array of vector elements.
typedef struct R3RealView R3RealView
 Borrowed array of real elements.
typedef struct R3IndexView R3IndexView
 Borrowed array of index elements.
typedef struct R3Edge R3Edge
 Vertex indices for one edge; contiguous u32 fields with no padding.
typedef struct R3EdgeView R3EdgeView
 Borrowed array of edge elements.
typedef struct R3SoftEdgeSoftness R3SoftEdgeSoftness
 Spring-coefficient override for one soft-body edge.
typedef struct R3SoftEdgeSoftnessView R3SoftEdgeSoftnessView
 Borrowed elements; count counts elements.
typedef struct R3SoftEdgeTear R3SoftEdgeTear
 Tear-resistance override for one soft-body edge.
typedef struct R3SoftEdgeTearView R3SoftEdgeTearView
 Borrowed elements; count counts elements.
typedef struct R3Triangle R3Triangle
 Vertex indices for one triangle; contiguous u32 fields with no padding.
typedef struct R3TriangleView R3TriangleView
 Borrowed array of triangle elements.
typedef struct R3Tetrahedron R3Tetrahedron
 Vertex indices for one tetrahedron; contiguous u32 fields with no padding.
typedef struct R3TetrahedronView R3TetrahedronView
 Borrowed array of tetrahedron elements.
typedef struct R3TetrahedronView R3CellView
 Borrowed cell array: triangles in 2D, tetrahedra in 3D.
typedef struct R3TriangleView R3SurfaceElementView
 Borrowed surface array: edges in 2D, triangles in 3D.
typedef struct R3Dihedral R3Dihedral
 Vertex indices for one dihedral; contiguous u32 fields with no padding.
typedef struct R3DihedralView R3DihedralView
 Borrowed array of dihedral elements.
typedef struct R3SoftBodyDescView R3SoftBodyDescView
 Borrowed array of soft-body descriptions.
typedef struct R3OptionalBool R3OptionalBool
 Optional boolean override.
typedef struct R3SharedShape R3SharedShape
 Opaque SharedShape.
typedef struct R3CompoundShapeView R3CompoundShapeView
 Borrowed elements; count counts elements.
typedef struct R3ShapeDesc R3ShapeDesc
 Non-owning shape description.
typedef struct R3CompoundShapeDesc R3CompoundShapeDesc
 One compound child with a local pose and borrowed geometry description.
typedef struct R3Vector R3AngVector
 Angular scalar in 2D or vector in 3D, in radians for angular displacement.
typedef struct R3MassProperties R3MassProperties
 Explicit mass and principal inertia, matching MassProperties constructors.
typedef struct R3InteractionGroups R3InteractionGroups
 Collision membership/filter masks and their pairwise combination rule.
typedef struct R3ColliderDesc R3ColliderDesc
 Copyable collider construction data.
typedef struct R3SoftBodyDesc R3SoftBodyDesc
 Copyable recipe, not an owned procedural builder.
typedef struct R3SoftBodyHandle R3SoftBodyHandle
 Copyable non-owning handle: world pointer plus entity index and generation.
typedef struct R3SoftMeshBindingDesc R3SoftMeshBindingDesc
 Non-owning deformable binding description.
typedef struct R3ColliderHandle R3ColliderHandle
 Copyable non-owning handle: world pointer plus entity index and generation.
typedef struct R3QueryFilter R3QueryFilter
 Scene-query flags, groups, and excluded handles.
typedef R3Bool(*) R3QueryPredicate(void *user_data, const struct R3ReadContext *read, struct R3ColliderHandle handle)
 Called with scoped read access and a collider handle.
typedef struct R3QueryOptions R3QueryOptions
 Copyable query settings.
typedef struct R3RayHit R3RayHit
 Closest ray intersection, with a world-space normal.
typedef struct R3PointProjection R3PointProjection
 Closest projected world-space point and its collider.
typedef struct R3ShapeCastHit R3ShapeCastHit
 Shape-cast impact geometry; collider-side data is world-space, moving-shape data is local.
typedef struct R3ShapeCastOptions R3ShapeCastOptions
 Sweep termination settings.
typedef struct R3Aabb R3Aabb
 Axis-aligned bounding box.
typedef struct R3RayToi R3RayToi
 Optional ray collider/time result.
typedef struct R3OptionalRayHit R3OptionalRayHit
 Optional full ray result.
typedef struct R3RigidBodyDesc R3RigidBodyDesc
 Stack-allocated rigid-body construction data.
typedef struct R3PodLayout R3PodLayout
 Sizes of the POD types in this library build, for foreign-language layout checks.
typedef struct R3CharacterLength R3CharacterLength
 CharacterLength counterpart: relative=1 scales with character height, relative=0 uses world units.
typedef struct R3CharacterAutostep R3CharacterAutostep
 Copy of the automatic stepping settings.
typedef struct R3CharacterMovement R3CharacterMovement
 Allowed character motion and ground-contact state.
typedef struct R3CharacterCollision R3CharacterCollision
 Collision recorded during character movement.
typedef struct R3PidGains R3PidGains
 Per-axis proportional, integral, and derivative controller gains.
typedef struct R3PdController R3PdController
 Stateless proportional-derivative controller: a PID controller without integral term, stored as a plain value.
typedef struct R3VelocityCorrection R3VelocityCorrection
 Linear and angular velocity correction computed by a controller.
typedef struct R3CharacterControllerSettings R3CharacterControllerSettings
 Copy of character sliding, slope, and snapping settings.
typedef struct R3WheelTuning R3WheelTuning
 Wheel suspension/friction parameters.
typedef struct R3WheelState R3WheelState
 Copy of the current wheel pose, suspension, and contact state.
typedef void(*) R3ErrorCallback(R3Status, const char *, void *)
 Called synchronously on the calling thread when an operation reports an error.
typedef struct R3ErrorHandler R3ErrorHandler
 An optional thread-local error handler.
typedef struct R3JointBodies R3JointBodies
 World-bound handles of the two connected bodies.
typedef struct R3InverseKinematicsOptions R3InverseKinematicsOptions
 Damped least-squares inverse-kinematics parameters.
typedef R3Bool(*) R3IkJointCanMove(void *, struct R3RigidBodyHandle)
 Optional per-link filter, called synchronously.
typedef struct R3CollisionEvent R3CollisionEvent
 Collision start/stop flags match Rapier CollisionEventFlags.
typedef struct R3ContactForceEvent R3ContactForceEvent
 Contact-force event, enabled by flags and the collider force threshold.
typedef int32_t(*) R3PairFilter(void *user_data, const struct R3ReadContext *read, struct R3ColliderHandle collider1, struct R3ColliderHandle collider2, struct R3RigidBodyHandle body1, struct R3RigidBodyHandle body2)
 Pair callback: -1 rejects a contact pair; 0 detects contacts without impulses; 1 computes impulses.
typedef struct R3ContactModification R3ContactModification
 Mutable per-manifold properties.
typedef void(*) R3ModifyContacts(void *user_data, const struct R3ReadContext *read, struct R3ColliderHandle collider1, struct R3ColliderHandle collider2, struct R3ContactModification *contact)
 Modify aggregate contact properties for one pair; contact is mutable only during this callback.
typedef void(*) R3ModifyContactContext(void *user_data, const struct R3ReadContext *read, struct R3ColliderHandle collider1, struct R3ColliderHandle collider2, struct R3ContactModificationContext *context)
 Modify individual solver contacts through a borrowed context, valid only during the callback.
typedef struct R3PhysicsHooks R3PhysicsHooks
 Callbacks must not unwind or retain arguments.
typedef struct R3ByteView R3ByteView
 Borrowed bytes.
typedef struct R3DebugLine R3DebugLine
 World-space line segment produced by physics debug rendering.
typedef struct R3ParticleDestination R3ParticleDestination
 Particle remapping after tearing.
typedef struct R3SoftClusterSplit R3SoftClusterSplit
 Cluster and proxy remapping after a soft-body split.
typedef struct R3SoftJointMove R3SoftJointMove
 Impulse-joint movement between rigid proxies after tearing.
typedef struct R3OptionalParticleDestination R3OptionalParticleDestination
 Optional particle remapping; check found before reading the destination.
typedef struct R3BuildInfo R3BuildInfo
 Runtime ABI identity and fundamental type sizes.
typedef struct R3BuildFeatures R3BuildFeatures
 Features available through the loaded C library, independent of consumer defines.
typedef struct R3ContactPair R3ContactPair
 Current narrow-phase pair and accumulated solver impulse summary.
typedef struct R3IntersectionPair R3IntersectionPair
 Sensor intersection state for a collider pair.
typedef struct R3ContactPoint R3ContactPoint
 One manifold contact and its normal solver impulse.
typedef struct R3RigidBodyState R3RigidBodyState
 A copied state snapshot, with no pointers or ownership obligations.
typedef struct R3SoftMeshId R3SoftMeshId
 Stable identity of a live mesh within one soft body; matches Rapier's SoftMeshId.
typedef struct R3SoftMeshInfo R3SoftMeshInfo
 Mesh identity and rendering metadata.
typedef int64_t R3VoxelCoord
 Signed voxel coordinate integer.
typedef struct R3VoxelKey R3VoxelKey
 Integer coordinates of a voxel cell.
typedef struct R3VoxelQuery R3VoxelQuery
 Optional voxel lookup result; check found before reading voxel data.
typedef struct R3JointImpulses R3JointImpulses
 Impulses applied by an impulse joint during the last step, along the axes of its joint frame.
typedef struct R3OptionalShapeCastHit R3OptionalShapeCastHit
 Optional shape-cast result.
typedef struct R3OptionalPointProjection R3OptionalPointProjection
 Optional point projection.
typedef struct R3NonlinearRigidMotion R3NonlinearRigidMotion
 Rigid motion with constant linear and angular velocities.
typedef struct R3OptionalContactPair R3OptionalContactPair
 Optional contact pair; check found before reading the pair.
typedef struct R3OptionalIntersectionPair R3OptionalIntersectionPair
 Optional intersection pair; check found before reading the pair.
typedef struct R3ContactManifold R3ContactManifold
 Geometric contact manifold of a contact pair: contacts sharing one normal.
typedef struct R3SolverContact R3SolverContact
 Contact seen by the constraint solver.
typedef void(*) R3CollisionEventCallback(void *user_data, const struct R3ReadContext *read, const struct R3CollisionEvent *event, const struct R3ContactPoint *contacts, size_t contact_count)
 Called during the step for each collision event, after it was added to the collector.
typedef void(*) R3ContactForceEventCallback(void *user_data, const struct R3ReadContext *read, const struct R3ContactForceEvent *event)
 Called during the step for each contact-force event, after it was added to the collector.
typedef struct R3EventCallbacks R3EventCallbacks
 Callbacks invoked while stepping, in addition to collecting the events.
typedef struct R3DebugRenderStyle R3DebugRenderStyle
 Debug-render colors and sizes.

Functions

struct R3SoftBodyMaterial r3DefaultSoftBodyMaterial (void)
 Return native default soft body material.
struct R3SoftRecoverySettings r3DefaultSoftRecoverySettings (void)
 Return native default soft recovery settings.
struct R3SoftFemParameters r3DefaultSoftFemParameters (void)
 Return native default soft fem parameters.
struct R3SoftBodiesSettings r3DefaultSoftBodiesSettings (void)
 Return native default soft bodies settings.
struct R3IntegrationParameters r3DefaultIntegrationParameters (void)
 Return native default integration parameters.
struct R3IntegrationParameters r3IntegrationParameters (const struct R3World *world)
 Return a copy of all world integration settings.
R3Status r3SetIntegrationParameters (struct R3World *world, const struct R3IntegrationParameters *data)
 Copies validated values; does not expose a writable alias to Rust memory.
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.
struct R3SoftBodyDesc r3DefaultSoftBodyDesc (void)
 Return native default soft body desc.
struct R3SoftBodyHandle r3InsertSoftBody (struct R3World *world, const struct R3SoftBodyDesc *desc)
 Consumes no caller-owned resources.
struct R3SoftMeshBindingDesc r3DefaultSoftMeshBindingDesc (void)
 Return native default soft mesh binding desc.
struct R3ColliderHandle r3InsertDeformableCollider (const struct R3ColliderDesc *collider, const struct R3SoftMeshBindingDesc *binding, struct R3RigidBodyHandle parent)
 Create a deformable collider bound to a soft-body cluster.
struct R3QueryOptions r3DefaultQueryOptions (void)
 Return native default query options.
struct R3RayHit r3CastRay (const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Vector origin, struct R3Vector direction, R3Real max_toi, R3Bool solid)
 Return the closest ray hit, or report R3_NOT_FOUND on a miss.
struct R3PointProjection r3ProjectPoint (const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Vector point, R3Real max_distance, R3Bool solid)
 Return the closest surface projection within max_distance, or report R3_NOT_FOUND.
struct R3ShapeCastHit r3CastShape (const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Pose pose, struct R3Vector velocity, const R3SharedShape *shape, struct R3ShapeCastOptions options)
 Sweep shape from pose along velocity and return the first hit; report R3_NOT_FOUND on a miss.
size_t r3IntersectPoint (const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Vector point, struct R3ColliderHandle *buffer, size_t capacity)
 Copy handles of colliders containing the world-space point.
size_t r3IntersectShape (const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Pose pose, const R3SharedShape *shape, struct R3ColliderHandle *buffer, size_t capacity)
 Copy handles of colliders intersecting the shape at its world-space pose.
size_t r3IntersectAabbConservative (const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Aabb aabb, struct R3ColliderHandle *buffer, size_t capacity)
 Copy broad-phase candidates whose bounding boxes overlap the world-space AABB.
struct R3RayToi r3CastRayToi (const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Vector origin, struct R3Vector direction, R3Real max_toi, R3Bool solid)
 Return the closest ray collider and time, with found = 0 on a miss (R3_OK).
struct R3OptionalRayHit r3TryCastRay (const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Vector origin, struct R3Vector direction, R3Real max_toi, R3Bool solid)
 Return the closest ray hit with found = 0 on a miss (R3_OK).
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 R3ShapeDesc r3DefaultShapeDesc (void)
 Return native default shape desc.
R3SharedShape * r3ShapeDesc_Build (const struct R3ShapeDesc *desc)
 Build an owned shared shape from a description; release it with r3FreeSharedShape.
struct R3ColliderDesc r3DefaultColliderDesc (void)
 Return native default collider desc.
struct R3ColliderDesc r3BallColliderDesc (R3Real radius)
 Return a ball description with the supplied radius.
struct R3ColliderDesc r3CuboidColliderDesc (struct R3Vector half_extents)
 Return an axis-aligned box description with the supplied half-extents.
struct R3RigidBodyHandle r3InsertRigidBody (struct R3World *world, const struct R3RigidBodyDesc *desc)
 Create a body from the description and return its world-bound handle.
struct R3ColliderHandle r3InsertCollider (struct R3RigidBodyHandle parent, const struct R3ColliderDesc *desc)
 Insert a collider attached to a rigid body, using the world stored in its handle.
struct R3ColliderHandle r3InsertColliderWithoutParent (struct R3World *world, const struct R3ColliderDesc *desc)
 Insert a collider without a rigid-body parent.
struct R3PodLayout r3PodLayout (void)
 Return POD structure sizes for checking foreign-language layouts against this library.
struct R3KinematicCharacterController * r3NewKinematicCharacterController (void)
 Allocate a character controller with native defaults; release it with r3FreeKinematicCharacterController.
R3Status r3FreeKinematicCharacterController (struct R3KinematicCharacterController *controller)
 Release an owned kinematic character controller.
R3Status r3KinematicCharacterController_SetUp (struct R3KinematicCharacterController *controller, struct R3Vector up)
 Set the up direction; it must be finite and nonzero and is normalized on input.
R3Status r3KinematicCharacterController_SetOffset (struct R3KinematicCharacterController *controller, struct R3CharacterLength offset)
 Set the collision separation margin; use a positive absolute or relative character length.
R3Status r3KinematicCharacterController_SetSlide (struct R3KinematicCharacterController *controller, R3Bool enabled)
 Enable or disable sliding along obstacles.
R3Status r3KinematicCharacterController_SetSlopes (struct R3KinematicCharacterController *controller, R3Real max_climb_angle, R3Real min_slide_angle)
 Set the maximum climb angle and minimum slide angle, in radians.
R3Status r3KinematicCharacterController_SetAutostep (struct R3KinematicCharacterController *controller, R3Bool enabled, struct R3CharacterLength max_height, struct R3CharacterLength min_width, R3Bool include_dynamic_bodies)
 Configure automatic stepping over obstacles.
R3Status r3KinematicCharacterController_SetSnapToGround (struct R3KinematicCharacterController *controller, R3Bool enabled, struct R3CharacterLength distance)
 Configure downward ground snapping.
struct R3Vector r3KinematicCharacterController_Up (const struct R3KinematicCharacterController *controller)
 Return the normalized up direction.
struct R3CharacterLength r3KinematicCharacterController_Offset (const struct R3KinematicCharacterController *controller)
 Return the collision separation margin.
struct R3CharacterAutostep r3KinematicCharacterController_Autostep (const struct R3KinematicCharacterController *controller)
 Return the automatic stepping settings.
R3Status r3KinematicCharacterController_SetNormalNudgeFactor (struct R3KinematicCharacterController *controller, R3Real value)
 Set the small distance by which sliding motion is pushed along hit normals to avoid getting stuck; it must be finite and nonnegative.
R3Real r3KinematicCharacterController_NormalNudgeFactor (const struct R3KinematicCharacterController *controller)
 Return the normal nudge factor set by SetNormalNudgeFactor.
struct R3CharacterMovement r3KinematicCharacterController_MoveShape (const struct R3World *world, const struct R3QueryOptions *options, struct R3KinematicCharacterController *controller, R3Real dt, const R3SharedShape *shape, struct R3Pose pose, struct R3Vector desired_translation)
 Computes movement without moving any collider.
size_t r3KinematicCharacterController_Collisions (const struct R3KinematicCharacterController *controller, struct R3CharacterCollision *buffer, size_t capacity)
 Copy collisions recorded by the most recent MoveShape call.
R3Status r3KinematicCharacterController_SolveCharacterCollisionImpulses (const struct R3KinematicCharacterController *controller, const R3SharedShape *shape, R3Real dt, R3Real mass, const struct R3QueryOptions *options)
 Applies impulses to the dynamic bodies hit by the most recent MoveShape call.
struct R3PidController * r3NewPidController (void)
 Allocate a PID controller with Rapier's defaults: kp = 60, ki = 1 and kd = 0.8 on every axis, all axes controlled, and zero integrals.
R3Status r3FreePidController (struct R3PidController *controller)
 Release an owned pid controller.
struct R3PidGains r3PidController_Gains (const struct R3PidController *controller)
 Return a copy of the proportional, integral, and derivative gains.
R3Status r3PidController_SetGains (struct R3PidController *controller, struct R3PidGains gains)
 Replace the proportional, integral, and derivative gains.
R3Status r3PidController_SetAxes (struct R3PidController *controller, uint32_t axes)
 Set the controlled axes, a combination of R3_AXES_MASK_* bits.
uint32_t r3PidController_Axes (const struct R3PidController *controller)
 Return the controlled axes as R3_AXES_MASK_* bits.
R3Status r3PidController_ResetIntegrals (struct R3PidController *controller)
 Reset to zero the linear and angular errors accumulated by the integral term.
struct R3PdController r3DefaultPdController (void)
 Return Rapier's default PD controller: kp = 60 and kd = 0.8 on every axis, all axes controlled.
struct R3VelocityCorrection r3PdController_RigidBodyCorrection (const struct R3PdController *controller, struct R3RigidBodyHandle body, struct R3Pose target_pose, struct R3Vector target_linvel, R3AngVector target_angvel)
 Compute the velocity change bringing the body toward the target pose and velocities.
struct R3VelocityCorrection r3PidController_RigidBodyCorrection (struct R3PidController *controller, R3Real dt, struct R3RigidBodyHandle body, struct R3Pose target_pose, struct R3Vector target_linvel, R3AngVector target_angvel)
 Compute a velocity correction, preserving the body's state and updating PID integrals.
struct R3CharacterControllerSettings r3KinematicCharacterController_Settings (const struct R3KinematicCharacterController *controller)
 Return a copy of slide, slope, and ground-snap settings.
struct R3WheelTuning r3DefaultWheelTuning (void)
 Return native default wheel tuning.
struct R3DynamicRayCastVehicleController * r3NewDynamicRayCastVehicleController (struct R3RigidBodyHandle chassis)
 Allocate a vehicle controller bound to its chassis body.
R3Status r3FreeDynamicRayCastVehicleController (struct R3DynamicRayCastVehicleController *controller)
 Release an owned dynamic ray cast vehicle controller.
size_t r3DynamicRayCastVehicleController_AddWheel (struct R3DynamicRayCastVehicleController *controller, struct R3Vector connection, struct R3Vector direction, struct R3Vector axle, R3Real rest_length, R3Real radius, const struct R3WheelTuning *tuning)
 Append a wheel and return its zero-based index.
R3Status r3DynamicRayCastVehicleController_SetAxes (struct R3DynamicRayCastVehicleController *controller, size_t up, size_t forward)
 Set the chassis up/forward axis indices (0 = X, 1 = Y, 2 = Z).
R3Status r3DynamicRayCastVehicleController_SetWheelControls (struct R3DynamicRayCastVehicleController *controller, size_t index, R3Real steering, R3Real engine_force, R3Real brake)
 Set a wheel engine force, brake force, and steering angle in radians.
R3Status r3DynamicRayCastVehicleController_UpdateVehicle (struct R3DynamicRayCastVehicleController *controller, R3Real dt, const struct R3QueryOptions *options)
 Ray-cast wheel contacts and apply vehicle forces for dt seconds.
R3Real r3DynamicRayCastVehicleController_CurrentVehicleSpeed (const struct R3DynamicRayCastVehicleController *controller)
 Return signed chassis speed along its forward direction.
size_t r3DynamicRayCastVehicleController_Wheels (const struct R3DynamicRayCastVehicleController *controller, struct R3WheelState *buffer, size_t capacity)
 Copy current wheel state in wheel insertion order.
R3Status r3RigidBodyPropagateModifiedBodyPositionsToColliders (struct R3World *world)
 Propagate all modified body poses to attached colliders.
size_t r3ActiveRigidBodies (const struct R3World *world, struct R3RigidBodyHandle *buffer, size_t capacity)
 Copies the island manager's active body handles.
R3Status r3RigidBody_WakeUp (struct R3RigidBodyHandle handle, R3Bool strong)
 Wake a body by handle, including a soft-body cluster proxy.
struct R3ErrorHandler r3SetErrorHandler (struct R3ErrorHandler handler)
 Replace this thread's error handler and return the previous handler so it can be restored at the end of a scope.
R3Status r3LastStatus (void)
 Status of the most recent fallible operation on this thread.
const char * r3LastError (void)
 Thread-local UTF-8 diagnostic, valid until the next fallible call on this thread.
R3SharedShape * r3BallSharedShape (R3Real radius)
 Create an owned ball shape.
R3SharedShape * r3CuboidSharedShape (struct R3Vector half_extents)
 Create an owned cuboid shape.
R3SharedShape * r3RoundCuboidSharedShape (struct R3Vector half_extents, R3Real border_radius)
 Create an owned round cuboid shape.
R3SharedShape * r3CapsuleSharedShape (struct R3Vector a, struct R3Vector b, R3Real radius)
 Create an owned capsule shape.
R3SharedShape * r3SegmentSharedShape (struct R3Vector a, struct R3Vector b)
 Create an owned segment shape.
R3SharedShape * r3TriangleSharedShape (struct R3Vector a, struct R3Vector b, struct R3Vector c)
 Create an owned triangle shape.
R3SharedShape * r3HalfspaceSharedShape (struct R3Vector normal)
 Create an owned halfspace shape.
R3SharedShape * r3CylinderSharedShape (R3Real half_height, R3Real radius)
 Create an owned cylinder shape.
R3SharedShape * r3ConeSharedShape (R3Real half_height, R3Real radius)
 Create an owned cone shape.
R3SharedShape * r3CompoundSharedShape (struct R3CompoundShapeView children)
 Create an owned compound shape; each child pose is relative to the compound.
R3Status r3RemoveCollider (struct R3ColliderHandle handle, R3Bool wake_up)
 Remove the collider and update its parent body mass properties.
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.
R3Status r3FreeSharedShape (R3SharedShape *object)
 Frees an owned object; NULL is allowed.
R3SharedShape * r3SharedShape_Clone (const R3SharedShape *object)
 Create an owned wrapper sharing the same immutable geometry.
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.
size_t r3ColliderCount (const struct R3World *world)
 Return the number of collider objects in the world.
size_t r3ColliderHandles (const struct R3World *world, struct R3ColliderHandle *buffer, size_t capacity)
 Copy entity handles.
R3Bool r3Collider_Contains (struct R3ColliderHandle handle)
 Test whether the live world contains this collider handle.
size_t r3SoftBodyCount (const struct R3World *world)
 Return the number of soft body objects in the world.
size_t r3SoftBodyHandles (const struct R3World *world, struct R3SoftBodyHandle *buffer, size_t capacity)
 Copy entity handles.
R3Bool r3SoftBody_Contains (struct R3SoftBodyHandle handle)
 Test whether the live world contains this soft body handle.
R3Status r3RemoveRigidBody (struct R3RigidBodyHandle handle, R3Bool remove_attached_colliders)
 Remove a body and its joints, optionally keeping colliders as standalone objects.
R3Real r3TimeStep (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::dt.
R3Status r3SetTimeStep (struct R3World *world, R3Real value)
 Set the world setting documented by R3IntegrationParameters::dt.
R3Real r3MinCcdDt (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::minCcdDt.
R3Status r3SetMinCcdDt (struct R3World *world, R3Real value)
 Set the world setting documented by R3IntegrationParameters::minCcdDt.
R3Real r3LengthUnit (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::lengthUnit.
R3Status r3SetLengthUnit (struct R3World *world, R3Real value)
 Set the world setting documented by R3IntegrationParameters::lengthUnit.
R3Real r3WarmstartCoefficient (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::warmstartCoefficient.
R3Status r3SetWarmstartCoefficient (struct R3World *world, R3Real value)
 Set the world setting documented by R3IntegrationParameters::warmstartCoefficient.
R3Real r3NormalizedAllowedLinearError (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::normalizedAllowedLinearError.
R3Status r3SetNormalizedAllowedLinearError (struct R3World *world, R3Real value)
 Set the world setting documented by R3IntegrationParameters::normalizedAllowedLinearError.
R3Real r3NormalizedMaxCorrectiveVelocity (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::normalizedMaxCorrectiveVelocity.
R3Status r3SetNormalizedMaxCorrectiveVelocity (struct R3World *world, R3Real value)
 Set the world setting documented by R3IntegrationParameters::normalizedMaxCorrectiveVelocity.
R3Real r3NormalizedPredictionDistance (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::normalizedPredictionDistance.
R3Status r3SetNormalizedPredictionDistance (struct R3World *world, R3Real value)
 Set the world setting documented by R3IntegrationParameters::normalizedPredictionDistance.
R3Real r3NormalizedMaxLinearVelocity (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::normalizedMaxLinearVelocity.
R3Status r3SetNormalizedMaxLinearVelocity (struct R3World *world, R3Real value)
 Set the world setting documented by R3IntegrationParameters::normalizedMaxLinearVelocity.
R3Real r3NormalizedContactRecycleDistance (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::normalizedContactRecycleDistance.
R3Status r3SetNormalizedContactRecycleDistance (struct R3World *world, R3Real value)
 Set the world setting documented by R3IntegrationParameters::normalizedContactRecycleDistance.
size_t r3NumSolverIterations (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::numSolverIterations.
R3Status r3SetNumSolverIterations (struct R3World *world, size_t value)
 Set the world setting documented by R3IntegrationParameters::numSolverIterations.
size_t r3NumInternalPgsIterations (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::numInternalPgsIterations.
R3Status r3SetNumInternalPgsIterations (struct R3World *world, size_t value)
 Set the world setting documented by R3IntegrationParameters::numInternalPgsIterations.
size_t r3NumInternalStabilizationIterations (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::numInternalStabilizationIterations.
R3Status r3SetNumInternalStabilizationIterations (struct R3World *world, size_t value)
 Set the world setting documented by R3IntegrationParameters::numInternalStabilizationIterations.
size_t r3MaxCcdSubsteps (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::maxCcdSubsteps.
R3Status r3SetMaxCcdSubsteps (struct R3World *world, size_t value)
 Set the world setting documented by R3IntegrationParameters::maxCcdSubsteps.
R3Bool r3ContactClustering (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::contactClustering.
R3Status r3SetContactClustering (struct R3World *world, R3Bool value)
 Set the world setting documented by R3IntegrationParameters::contactClustering.
R3Bool r3ContactRecycling (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::contactRecycling.
R3Status r3SetContactRecycling (struct R3World *world, R3Bool value)
 Set the world setting documented by R3IntegrationParameters::contactRecycling.
R3Bool r3FrictionInBiasPass (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::frictionInBiasPass.
R3Status r3SetFrictionInBiasPass (struct R3World *world, R3Bool value)
 Set the world setting documented by R3IntegrationParameters::frictionInBiasPass.
R3Bool r3WarmstartJoints (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::warmstartJoints.
R3Status r3SetWarmstartJoints (struct R3World *world, R3Bool value)
 Set the world setting documented by R3IntegrationParameters::warmstartJoints.
struct R3SpringCoefficients r3ContactSoftness (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::contactSoftness.
R3Status r3SetContactSoftness (struct R3World *world, struct R3SpringCoefficients value)
 Set the world setting documented by R3IntegrationParameters::contactSoftness.
struct R3SpringCoefficients r3StaticContactSoftness (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::staticContactSoftness.
R3Status r3SetStaticContactSoftness (struct R3World *world, struct R3SpringCoefficients value)
 Set the world setting documented by R3IntegrationParameters::staticContactSoftness.
R3Status r3ContactModificationContext_UpdateAsOnewayPlatform (struct R3ContactModificationContext *context, struct R3Vector allowed_local_n1, R3Real allowed_angle)
 Applies Rapier's persistent one-way platform logic to the borrowed manifold.
R3Status r3ContactModificationContext_SetTangentVelocity (struct R3ContactModificationContext *context, struct R3Vector velocity)
 Sets the tangent velocity of every rigid solver contact in this manifold.
struct R3EventCollector * r3NewEventCollector (void)
 Allocate an empty event collector; release it with r3FreeEventCollector.
R3Status r3FreeEventCollector (struct R3EventCollector *events)
 Release an owned event collector.
R3Status r3EventCollector_Clear (struct R3EventCollector *events)
 Discard all collected events.
size_t r3EventCollector_CollisionEvents (const struct R3EventCollector *events, struct R3CollisionEvent *buffer, size_t capacity)
 Copy the collision start/stop events collected since the last clear, without removing them.
size_t r3EventCollector_ContactForceEvents (const struct R3EventCollector *events, struct R3ContactForceEvent *buffer, size_t capacity)
 Copy the contact-force events collected since the last clear, without removing them.
size_t r3EventCollector_TearEventCount (const struct R3EventCollector *events)
 Return the number of soft-body tear events collected since the last clear.
struct R3SoftBodyTearEvent * r3EventCollector_TearEvent (const struct R3EventCollector *events, size_t index)
 Return an owned copy of a queued tear event; release with r3FreeSoftBodyTearEvent.
struct R3Vector r3Gravity (const struct R3World *world)
 Return the world-space gravitational acceleration.
R3Status r3SetGravity (struct R3World *world, struct R3Vector value)
 Set the world-space gravitational acceleration.
R3Status r3Step (struct R3World *world, const struct R3PhysicsHooks *hooks, const struct R3EventCollector *events)
 Advance simulation by one timestep.
R3Status r3DetectCollisions (struct R3World *world, const struct R3PhysicsHooks *hooks, const struct R3EventCollector *events)
 Refresh collision detection without advancing simulation.
struct R3ByteView r3Bytes_Data (const struct R3Bytes *bytes)
 Borrow snapshot bytes without copying; valid until r3FreeBytes.
R3Status r3FreeBytes (struct R3Bytes *bytes)
 Release an owned snapshot byte buffer.
struct R3Bytes * r3SerializeWorld (const struct R3World *world)
 Return owned snapshot bytes; release them with r3FreeBytes.
struct R3World * r3DeserializeWorld (const uint8_t *data, size_t count)
 Restore ONLY trusted snapshots produced by the identical Rapier build.
size_t r3DebugRender (const struct R3World *world, uint32_t mode, struct R3DebugLine *buffer, size_t capacity)
 Copy the debug-render lines of the world with the default style.
R3Status r3SoftBodiesSetResweepStrain (struct R3World *world, R3Real value)
 Set the world setting documented by R3SoftBodiesSettings::resweepStrain.
R3Real r3SoftBodiesResweepStrain (const struct R3World *world)
 Return the world setting documented by R3SoftBodiesSettings::resweepStrain.
R3Status r3SoftBodiesSetContactStiffening (struct R3World *world, R3Real value)
 Set the world setting documented by R3SoftBodiesSettings::contactStiffening.
R3Real r3SoftBodiesContactStiffening (const struct R3World *world)
 Return the world setting documented by R3SoftBodiesSettings::contactStiffening.
R3Status r3SoftBodiesSetMaxExtraSubsteps (struct R3World *world, size_t value)
 Set the world setting documented by R3SoftBodiesSettings::maxExtraSubsteps.
size_t r3SoftBodiesMaxExtraSubsteps (const struct R3World *world)
 Return the world setting documented by R3SoftBodiesSettings::maxExtraSubsteps.
R3Status r3RecoverySetAuthoredVelocityMargin (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::authoredVelocityMargin.
R3Status r3RecoverySetEdgeSpeculation (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::edgeSpeculation.
R3Status r3RecoverySetInvertedCellDetection (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::invertedCellDetection.
R3Status r3RecoverySetSelfCrossingDetection (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::selfCrossingDetection.
R3Status r3RecoverySetDetectionMotionGating (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::detectionMotionGating.
R3Status r3RecoverySetCrossBodyDetection (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::crossBodyDetection.
R3Status r3RecoverySetSelfStandDown (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::selfStandDown.
R3Status r3RecoverySetCrossBodyExpelGate (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::crossBodyExpelGate.
R3Status r3RecoverySetEdgeStandDown (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::edgeStandDown.
R3Status r3RecoverySetCrossingRepulsion (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::crossingRepulsion.
R3Status r3RecoverySetCrossingRepulsionGuide (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::crossingRepulsionGuide.
R3Status r3RecoverySetCrossingRepulsionSelfGuide (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::crossingRepulsionSelfGuide.
R3Status r3RecoverySetRecoveryPace (struct R3World *world, R3Real value)
 Set the world setting documented by R3SoftRecoverySettings::recoveryPace.
R3Status r3RecoverySetOverlapConstraints (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::overlapConstraints.
R3Status r3RecoverySetOverlapRigid (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::overlapRigid.
R3Status r3RecoverySetOverlapSkipSelfTangled (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::overlapSkipSelfTangled.
R3Status r3RecoverySetOverlapEdgeStandDown (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::overlapEdgeStandDown.
R3Status r3RecoverySetOverlapConstraintPace (struct R3World *world, R3Real value)
 Set the world setting documented by R3SoftRecoverySettings::overlapConstraintPace.
R3Status r3RecoverySetOverlapSkinVolume (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::overlapSkinVolume.
R3Status r3RecoverySetOverlapKeptDepth (struct R3World *world, R3Real value)
 Set the world setting documented by R3SoftRecoverySettings::overlapKeptDepth.
R3Status r3RecoverySetOverlapSelfRegions (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::overlapSelfRegions.
R3Status r3RecoverySetOverlapNormalPush (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::overlapNormalPush.
R3Status r3RecoverySetOverlapMultiVolume (struct R3World *world, R3Bool value)
 Set the world setting documented by R3SoftRecoverySettings::overlapMultiVolume.
R3Status r3RecoverySetOverlapProgressMargin (struct R3World *world, R3Real value)
 Set the world setting documented by R3SoftRecoverySettings::overlapProgressMargin.
R3Status r3FemSetLinearTolerance (struct R3World *world, R3Real value)
 Set the world setting documented by R3SoftFemParameters::linearTolerance.
R3Status r3FemSetMaxLinearIterations (struct R3World *world, size_t value)
 Set the world setting documented by R3SoftFemParameters::maxLinearIterations.
R3Status r3FemSetMaxDenseDofs (struct R3World *world, size_t value)
 Set the world setting documented by R3SoftFemParameters::maxDenseDofs.
R3Status r3SetNumThreads (struct R3World *world, size_t num_threads)
 Configures a dedicated pool for this world's parallel work.
R3Status r3ClearThreadPool (struct R3World *world)
 Removes the world's dedicated pool.
size_t r3NumThreads (const struct R3World *world)
 Size of the world's dedicated pool, or zero if a parallel build has no dedicated pool configured.
R3Status r3SetCountersEnabled (struct R3World *world, R3Bool enabled)
 Enable or disable the native pipeline profiling counters.
double r3StepTimeMs (const struct R3World *world)
 Native engine time of the most recent step, in milliseconds, as in the Rust testbed.
struct R3World * r3DeserializeRigidState (const uint8_t *data, size_t count)
 Read ONLY trusted legacy rigid-world snapshots from debug_deserialize3.rs, produced by the identical Rapier build.
struct R3QueryFilter r3DefaultQueryFilter (void)
 Return native default query filter.
struct R3ShapeCastOptions r3DefaultShapeCastOptions (void)
 Return native default shape cast options.
R3Status r3RemoveSoftBody (struct R3SoftBodyHandle handle)
 Remove a soft body and its associated simulation objects.
R3Status r3SoftBody_WakeUp (struct R3SoftBodyHandle handle)
 Wake the soft body and its rigid proxies.
R3Status r3FreeSoftBodyTearEvent (struct R3SoftBodyTearEvent *event)
 Release an owned soft body tear event.
struct R3SoftBodyHandle r3SoftBodyTearEvent_SoftBody (const struct R3SoftBodyTearEvent *event)
 Return the source soft-body handle for this tear event.
size_t r3SoftBodyTearEvent_Bodies (const struct R3SoftBodyTearEvent *event, struct R3SoftBodyHandle *buffer, size_t capacity)
 Copy the soft bodies the torn body is in after the tear, the one keeping the handle first: the torn body alone when nothing was split off.
struct R3ParticleDestination r3SoftBodyTearEvent_ParticleDestination (const struct R3SoftBodyTearEvent *event, uint32_t particle)
 Return the destination body and particle index for an original particle.
size_t r3SoftBodyTearEvent_TornEdges (const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity)
 Flat indices; element arity follows the corresponding Rust event field.
size_t r3SoftBodyTearEvent_TornCells (const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity)
 Flat indices; element arity follows the corresponding Rust event field.
size_t r3SoftBodyTearEvent_RemovedEdges (const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity)
 Flat indices; element arity follows the corresponding Rust event field.
size_t r3SoftBodyTearEvent_SplitParticles (const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity)
 Flat indices; element arity follows the corresponding Rust event field.
size_t r3SoftBodyTearEvent_InsertedParticles (const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity)
 Flat indices; element arity follows the corresponding Rust event field.
size_t r3SoftBodyTearEvent_PieceParticles (const struct R3SoftBodyTearEvent *event, size_t piece_index, uint32_t *buffer, size_t capacity)
 Copy the particles of the piece_index-th body of r3SoftBodyTearEvent_Bodies, as indices in the torn body after the tear (the indices the other event fields use); entry i is the piece's particle i.
size_t r3SoftBodyTearEvent_Clusters (const struct R3SoftBodyTearEvent *event, struct R3SoftClusterSplit *buffer, size_t capacity)
 Copy cluster-to-piece and rigid-proxy remapping records.
size_t r3SoftBodyTearEvent_MovedJoints (const struct R3SoftBodyTearEvent *event, struct R3SoftJointMove *buffer, size_t capacity)
 Copy impulse-joint remapping records produced by the tear.
struct R3SoftBodyTearEvent * r3SoftBody_Tear (struct R3SoftBodyHandle handle, const uint32_t *edges, size_t edge_count, const uint32_t *cells, size_t cell_count)
 Tear the selected edges and return an owned remapping event.
uint32_t r3SoftBody_AddCluster (struct R3SoftBodyHandle handle, const uint32_t *particles, size_t count)
 Create a rigid proxy cluster from the supplied particle indices and return its cluster index.
R3Status r3SoftBody_RemoveCluster (struct R3SoftBodyHandle handle, uint32_t cluster)
 Remove the selected cluster and its rigid proxy.
struct R3OptionalParticleDestination r3SoftBodyTearEvent_TryParticleDestination (const struct R3SoftBodyTearEvent *event, uint32_t particle)
 Optional particle destination after a tear.
struct R3SoftBodyTearEvent * r3CutSoftBody (struct R3SoftBodyHandle handle, const struct R3Vector *blade)
 Cut using DIM points (a segment in 2D, triangle in 3D).
struct R3VolumeMeshParameters r3NewVolumeMeshParameters (R3Real cell_size)
 Return volume-meshing settings for the supplied cell size; this POD value requires no destructor.
struct R3BuildInfo r3BuildInfo (void)
 Return ABI version, dimension, scalar size, and pointer size of the linked library.
const char * r3Version (void)
 Release version of the loaded C bindings, e.g.
const char * r3BuildProfile (void)
 Cargo profile of the loaded physics library: "debug" or "release".
struct R3BuildFeatures r3BuildFeatures (void)
 Return profiling, SIMD width, parallelism, and determinism of the linked library.
R3SharedShape * r3HeightfieldSharedShape (struct R3RealView heights, size_t rows, size_t columns, struct R3Vector scale)
 Create an owned heightfield shape from copied samples.
struct R3Aabb r3SharedShape_ComputeAabb (const R3SharedShape *shape, struct R3Pose pose)
 Compute the shape axis-aligned bounds at the supplied world-space pose.
struct R3MassProperties r3SharedShape_MassProperties (const R3SharedShape *shape, R3Real density)
 Compute local mass properties for the supplied nonnegative density.
R3Bool r3SharedShape_ContainsPoint (const R3SharedShape *shape, struct R3Pose pose, struct R3Vector point)
 Test whether the world-space point lies inside the shape at pose.
size_t r3ContactPairs (const struct R3World *world, struct R3ContactPair *buffer, size_t capacity)
 Copy current narrow-phase contact pairs, including pairs without active solver contacts.
struct R3ContactPair r3ContactPair (struct R3ColliderHandle collider1, struct R3ColliderHandle collider2)
 Return the narrow-phase contact pair for two colliders, or report R3_NOT_FOUND.
size_t r3IntersectionPairs (const struct R3World *world, struct R3IntersectionPair *buffer, size_t capacity)
 Copy current sensor intersection pairs from the narrow phase.
size_t r3ContactPoints (struct R3ColliderHandle collider1, struct R3ColliderHandle collider2, struct R3ContactPoint *buffer, size_t capacity)
 Contact points in collider-local space; normal in world space.
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.
R3Status r3CheckAbi (uint32_t version, uint32_t dimension, size_t real_size, size_t vector_size, size_t pose_size, uint32_t features)
 Check that the header matches the linked library before passing any structure across the ABI.
size_t r3QuarantinedRigidBodies (const struct R3World *world, struct R3RigidBodyHandle *buffer, size_t capacity)
 Copy the rigid bodies quarantined by the most recent Step because their pose or velocity became non-finite (NaN or infinite).
size_t r3QuarantinedColliders (const struct R3World *world, struct R3ColliderHandle *buffer, size_t capacity)
 Copy the colliders quarantined by the most recent Step because their own pose or shape became non-finite, independently of their parent.
size_t r3QuarantinedSoftBodies (const struct R3World *world, struct R3SoftBodyHandle *buffer, size_t capacity)
 Copy the soft bodies quarantined by the most recent Step because a particle position or velocity became non-finite.
uint32_t r3FrictionModel (const struct R3World *world)
 Return the world setting documented by R3IntegrationParameters::frictionModel.
R3Status r3SetFrictionModel (struct R3World *world, uint32_t value)
 Set the world setting documented by R3IntegrationParameters::frictionModel.
R3Real r3Sin (R3Real x)
 Sine of an angle in radians, computed by Rapier's math backend.
R3Real r3Cos (R3Real x)
 Cosine of an angle in radians, computed by Rapier's math backend.
R3Real r3Tan (R3Real x)
 Tangent of an angle in radians, computed by Rapier's math backend.
R3Real r3Asin (R3Real x)
 Arcsine in radians, computed by Rapier's math backend.
R3Real r3Acos (R3Real x)
 Arccosine in radians, computed by Rapier's math backend.
R3Real r3Atan2 (R3Real y, R3Real x)
 Angle in radians of the point (x, y), in [-pi, pi], computed by Rapier's math backend.
R3Real r3Exp (R3Real x)
 Exponential e^x, computed by Rapier's math backend.
R3Real r3Ln (R3Real x)
 Natural logarithm, computed by Rapier's math backend.
R3Real r3Powf (R3Real base, R3Real exponent)
 base raised to the power exponent, computed by Rapier's math backend.
struct R3ShapeMesh * r3SharedShape_Tessellate (const R3SharedShape *shape, uint32_t subdivisions)
 Return owned local-space rendering geometry; release it with r3FreeShapeMesh.
size_t r3ShapeMesh_Triangles (const struct R3ShapeMesh *mesh, struct R3Vector *buffer, size_t capacity)
 Flat groups of three vertices.
size_t r3ShapeMesh_Lines (const struct R3ShapeMesh *mesh, struct R3Vector *buffer, size_t capacity)
 Flat groups of two vertices.
R3Status r3FreeShapeMesh (struct R3ShapeMesh *mesh)
 Release an owned shape mesh.
R3SharedShape * r3RoundCylinderSharedShape (R3Real half_height, R3Real radius, R3Real border_radius)
 Create an owned round cylinder shape.
R3SharedShape * r3RoundConeSharedShape (R3Real half_height, R3Real radius, R3Real border_radius)
 Create an owned round cone shape.
struct R3TriMeshData * r3SharedShape_ToTrimesh (const R3SharedShape *shape, uint32_t ntheta, uint32_t nphi)
 Tessellate a ball or capsule with independent longitude/latitude subdivision counts.
size_t r3TriMeshData_Vertices (const struct R3TriMeshData *mesh, struct R3Vector *buffer, size_t capacity)
 Copy vertices.
size_t r3TriMeshData_Indices (const struct R3TriMeshData *mesh, uint32_t *buffer, size_t capacity)
 Flat triangle indices; count and capacity are numbers of u32 entries.
R3Status r3FreeTriMeshData (struct R3TriMeshData *mesh)
 Release an owned tri mesh data.
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.
struct R3Pose r3Collider_Position (struct R3ColliderHandle handle)
 Return the collider world-space pose.
struct R3Vector r3Collider_Translation (struct R3ColliderHandle handle)
 Return the collider world-space translation.
R3Real r3Collider_Friction (struct R3ColliderHandle handle)
 Return the collider friction coefficient.
R3Real r3Collider_Restitution (struct R3ColliderHandle handle)
 Return the collider restitution coefficient.
R3Bool r3Collider_IsSensor (struct R3ColliderHandle handle)
 Return whether the collider is a sensor (detects overlaps without contact forces).
struct R3RigidBodyHandle r3Collider_Parent (struct R3ColliderHandle handle)
 Return the parent body handle, or an invalid handle with OK status for a standalone collider.
R3Status r3Collider_SetPosition (struct R3ColliderHandle handle, struct R3Pose value)
 Set the collider world-space pose.
R3Status r3Collider_SetTranslation (struct R3ColliderHandle handle, struct R3Vector value)
 Set the collider world-space translation.
R3Status r3Collider_SetFriction (struct R3ColliderHandle handle, R3Real value)
 Set the collider friction coefficient.
R3Status r3Collider_SetRestitution (struct R3ColliderHandle handle, R3Real value)
 Set the collider restitution coefficient.
R3Status r3Collider_SetSensor (struct R3ColliderHandle handle, R3Bool value)
 Enable or disable a sensor (detects overlaps without contact forces) for the collider.
R3Status r3Collider_SetCollisionGroups (struct R3ColliderHandle handle, struct R3InteractionGroups value)
 Set the collider collision filtering groups.
R3Status r3Collider_SetUserData (struct R3ColliderHandle handle, struct R3UserData value)
 Set the collider application-owned 128-bit user value.
struct R3Vector r3SoftBody_ParticlePosition (struct R3SoftBodyHandle handle, size_t index)
 Return the world-space position of the indexed particle.
size_t r3SoftBody_ParticlePositions (struct R3SoftBodyHandle handle, struct R3Vector *buffer, size_t capacity)
 Copy world-space particle positions.
struct R3SoftBodyMaterial r3SoftBody_Material (struct R3SoftBodyHandle handle)
 Return a copy of the soft body material parameters.
R3Status r3SoftBody_SetParticlePosition (struct R3SoftBodyHandle handle, size_t index, struct R3Vector value)
 Set the world-space position of the indexed particle.
R3Status r3SoftBody_SetMaterial (struct R3SoftBodyHandle handle, const struct R3SoftBodyMaterial *data)
 Copy material parameters into the soft body.
R3Status r3SoftBody_AddParticleForce (struct R3SoftBodyHandle handle, size_t index, struct R3Vector value, R3Bool wake_up)
 Add a world-space force to the indexed particle.
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.
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.
uint16_t r3Collider_ActiveCollisionTypes (struct R3ColliderHandle handle)
 Return the collider body-type collision activation bitmask (R3_COLLISION_TYPES_* bits).
uint32_t r3Collider_ActiveHooks (struct R3ColliderHandle handle)
 Return the collider physics-hook activation bitmask.
uint32_t r3Collider_FrictionCombineRule (struct R3ColliderHandle handle)
 Return the collider friction combination rule (R3_COMBINE_*).
uint32_t r3Collider_RestitutionCombineRule (struct R3ColliderHandle handle)
 Return the collider restitution combination rule (R3_COMBINE_*).
struct R3Pose r3Collider_PositionWrtParent (struct R3ColliderHandle handle)
 Return the collider pose relative to its parent rigid body, or its world-space pose if it has no parent.
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 r3Collider_SetRotation (struct R3ColliderHandle handle, struct R3Rotation value)
 Set the collider world-space rotation.
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 r3ShapeDesc_SetTrimesh (struct R3ShapeDesc *desc, struct R3VectorView vertices, struct R3TriangleView indices, uint32_t flags)
 Replace the shape geometry with a borrowed tri mesh.
R3Status r3ShapeDesc_SetPolyline (struct R3ShapeDesc *desc, struct R3VectorView vertices, struct R3EdgeView indices, uint32_t flags)
 Replace the shape geometry with a borrowed polyline.
R3Status r3ShapeDesc_SetConvexHull (struct R3ShapeDesc *desc, struct R3VectorView vertices)
 Replace the shape geometry with a borrowed convex hull point cloud.
R3Status r3SoftBodyDesc_SetParticles (struct R3SoftBodyDesc *desc, struct R3VectorView positions)
 Select an explicit particle recipe and borrow its positions.
R3Status r3SoftBodyDesc_SetSurfaceMesh (struct R3SoftBodyDesc *desc, struct R3VectorView vertices, R3SurfaceElementView elements)
 Select a surface recipe and borrow its vertices and elements.
R3Status r3SoftBodyDesc_SetAppended (struct R3SoftBodyDesc *desc, struct R3SoftBodyDescView view)
 Borrow descriptions to merge into this body (see R3SoftBodyDesc::appended); preserve all other fields.
R3Status r3SoftBodyDesc_SetAddedEdges (struct R3SoftBodyDesc *desc, struct R3EdgeView view)
 Borrow structural edges added after appending (see R3SoftBodyDesc::addedEdges); preserve all other fields.
R3Status r3SoftBodyDesc_SetSkin (struct R3SoftBodyDesc *desc, struct R3VectorView vertices, R3SurfaceElementView elements)
 Borrow skin geometry.
R3Status r3SoftBodyDesc_SetMasses (struct R3SoftBodyDesc *desc, struct R3RealView view)
 Borrow masses; preserve all other fields.
R3Status r3SoftBodyDesc_SetPinnedParticles (struct R3SoftBodyDesc *desc, struct R3IndexView view)
 Borrow pinned particles; preserve all other fields.
R3Status r3SoftBodyDesc_SetEdges (struct R3SoftBodyDesc *desc, struct R3EdgeView view)
 Borrow edges; preserve all other fields.
R3Status r3SoftBodyDesc_SetBendEdges (struct R3SoftBodyDesc *desc, struct R3EdgeView view)
 Borrow bend edges; preserve all other fields.
R3Status r3SoftBodyDesc_SetCells (struct R3SoftBodyDesc *desc, R3CellView view)
 Borrow cells; preserve all other fields.
R3Status r3SoftBodyDesc_SetSurface (struct R3SoftBodyDesc *desc, R3SurfaceElementView view)
 Borrow surface; preserve all other fields.
R3Status r3SoftBodyDesc_SetTensionOnlyEdges (struct R3SoftBodyDesc *desc, struct R3IndexView view)
 Borrow tension only edges; preserve all other fields.
R3Status r3SoftBodyDesc_SetDihedrals (struct R3SoftBodyDesc *desc, struct R3DihedralView view)
 Borrow dihedrals; preserve all other fields.
R3Status r3SoftBodyDesc_SetWire (struct R3SoftBodyDesc *desc, struct R3EdgeView view)
 Borrow wire; preserve all other fields.
struct R3ColliderDesc r3RoundCuboidColliderDesc (struct R3Vector half_extents, R3Real border_radius)
 Return a rounded box description; half_extents exclude the added border_radius.
struct R3ColliderDesc r3CapsuleColliderDesc (struct R3Vector a, struct R3Vector b, R3Real radius)
 Return a capsule description with segment endpoints a/b and the supplied radius.
struct R3ColliderDesc r3SegmentColliderDesc (struct R3Vector a, struct R3Vector b)
 Return a segment description with endpoints a and b.
struct R3ColliderDesc r3TriangleColliderDesc (struct R3Vector a, struct R3Vector b, struct R3Vector c)
 Return a triangle description with vertices a, b, and c.
struct R3ColliderDesc r3HalfspaceColliderDesc (struct R3Vector normal)
 Return a half-space description bounded by a plane through the origin; normal points outward.
struct R3ColliderDesc r3CylinderColliderDesc (R3Real half_height, R3Real radius)
 Return a Y-aligned cylinder description with the supplied half-height and radius.
struct R3ColliderDesc r3ConeColliderDesc (R3Real half_height, R3Real radius)
 Return a Y-aligned cone description with the supplied half-height and base radius.
struct R3ColliderDesc r3RoundCylinderColliderDesc (R3Real half_height, R3Real radius, R3Real border_radius)
 Return a rounded Y-aligned cylinder description; dimensions exclude border_radius.
struct R3ColliderDesc r3RoundConeColliderDesc (R3Real half_height, R3Real radius, R3Real border_radius)
 Return a rounded Y-aligned cone description; dimensions exclude border_radius.
struct R3ColliderDesc r3CapsuleXColliderDesc (R3Real half_height, R3Real radius)
 Return a X-aligned capsule description; half_height is half the segment length, excluding caps.
struct R3ColliderDesc r3CapsuleYColliderDesc (R3Real half_height, R3Real radius)
 Return a Y-aligned capsule description; half_height is half the segment length, excluding caps.
struct R3ColliderDesc r3CapsuleZColliderDesc (R3Real half_height, R3Real radius)
 Return a Z-aligned capsule description; half_height is half the segment length, excluding caps.
struct R3SoftBodyDesc r3RopeSoftBodyDesc (struct R3Vector a, struct R3Vector b, size_t particles)
 Return a rope recipe with particles evenly spaced from a to b, including both endpoints.
struct R3SoftBodyDesc r3CuboidSoftBodyDesc (struct R3Vector center, struct R3Vector half_extents, size_t nx, size_t ny, size_t nz)
 Return a solid box recipe on an nx by ny by nz particle grid, subdivided into tetrahedra.
struct R3SoftBodyDesc r3ClothSoftBodyDesc (struct R3Vector origin, struct R3Vector du, struct R3Vector dv, size_t nu, size_t nv)
 Return a cloth recipe with nu by nv particles at origin + i * du + j * dv.
struct R3SoftBodyDesc r3ClothAnisotropicSoftBodyDesc (struct R3Vector origin, struct R3Vector du, struct R3Vector dv, size_t nu, size_t nv, struct R3SpringCoefficients warp, struct R3SpringCoefficients weft, struct R3SpringCoefficients shear)
 Return a cloth recipe like r3ClothSoftBodyDesc whose edges along du (warp), along dv (weft) and diagonal (shear) get their own softness; the material's bendSoftness still applies to the bending edges.
struct R3SoftBodyDesc r3SphereSoftBodyDesc (struct R3Vector center, R3Real radius, uint32_t subdivisions)
 Return a hollow icosphere recipe with the specified refinement levels and volume preservation.
struct R3SoftBodyDesc r3ClothTubeSoftBodyDesc (struct R3Vector origin, struct R3Vector axis, R3Real radius_start, R3Real radius_end, size_t num_around, size_t num_along)
 Return a cloth tube recipe from origin to origin + axis with num_along rings of num_around particles; radius varies linearly between the ends.
struct R3SoftBodyDesc r3VolumetricSoftBodyDesc (struct R3VectorView vertices, R3SurfaceElementView surface, struct R3VolumeMeshParameters parameters)
 Initializes a borrowed meshing recipe.
struct R3SoftBodyMaterial r3UniformSoftBodyMaterial (struct R3SpringCoefficients value)
 Returns a material with the same softness for each constraint family.
size_t r3SoftBodyDesc_ParticlePositions (const struct R3SoftBodyDesc *desc, struct R3Vector *buffer, size_t capacity)
 Copies generated particle positions into caller-owned storage; no persistent builder.
size_t r3SoftBodyDesc_CellIndices (const struct R3SoftBodyDesc *desc, uint32_t *buffer, size_t capacity)
 Copies generated cell indices into caller-owned storage.
struct R3Vector r3SoftBody_ParticleVelocity (struct R3SoftBodyHandle handle, size_t index)
 Return the world-space velocity of the indexed particle.
uint32_t r3SoftBody_Solver (struct R3SoftBodyHandle handle)
 Return the solver simulating the soft body's elasticity (R3_SOFT_SOLVER_*).
R3Status r3SoftBody_SetClusterEdgeSoftness (struct R3SoftBodyHandle handle, uint32_t cluster, const struct R3SpringCoefficients *softness)
 Override the softness of every structural or bending edge fully contained in a live cluster: regional stiffness for cloth and ropes.
R3Status r3SoftBody_ApplyImpulseAtPoint (struct R3SoftBodyHandle handle, struct R3Vector impulse, struct R3Vector point, R3Real falloff_radius, R3Bool wake_up)
 Apply a world-space impulse to every free particle within falloff_radius of the world-space point, scaled linearly from 1 at the point to 0 at that radius and divided by the particle's mass.
R3Status r3SoftBody_ApplyRadialImpulse (struct R3SoftBodyHandle handle, struct R3Vector center, R3Real magnitude, R3Real falloff_radius, R3Bool wake_up)
 Apply an impulse of the given magnitude pointing away from the world-space center to every free particle within falloff_radius, scaled linearly from 1 at the center to 0 at that radius and divided by the particle's mass.
R3Status r3SoftBody_ResetPlasticity (struct R3SoftBodyHandle handle)
 Undo every permanent (plastic) deformation: edge rest lengths, dihedral rest angles, cell rest shapes and particle rest positions return to their creation state.
R3Status r3SoftBody_TearEdge (struct R3SoftBodyHandle handle, size_t index)
 Mark the indexed edge as torn.
R3Status r3SoftBody_TearCell (struct R3SoftBodyHandle handle, size_t index)
 Mark the indexed cell as torn.
struct R3SoftBodyHandle r3Collider_SoftBody (struct R3ColliderHandle handle)
 Return the soft body owning this deformable collider (a soft-body collision mesh), or an invalid handle for any other collider.
struct R3SoftBodyHandle r3ReadCollider_SoftBody (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the soft body owning this deformable collider, or an invalid handle for any other collider.
size_t r3SoftBodyTearEvent_PieceCount (const struct R3SoftBodyTearEvent *event)
 Return the number of soft bodies the torn body is in after the tear: the length of r3SoftBodyTearEvent_Bodies, and the exclusive bound of the piece_index of r3SoftBodyTearEvent_PieceParticles.
R3Bool r3RecoveryAuthoredVelocityMargin (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::authoredVelocityMargin.
R3Bool r3RecoveryEdgeSpeculation (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::edgeSpeculation.
R3Bool r3RecoveryInvertedCellDetection (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::invertedCellDetection.
R3Bool r3RecoverySelfCrossingDetection (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::selfCrossingDetection.
R3Bool r3RecoveryDetectionMotionGating (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::detectionMotionGating.
R3Bool r3RecoveryCrossBodyDetection (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::crossBodyDetection.
R3Bool r3RecoverySelfStandDown (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::selfStandDown.
R3Bool r3RecoveryCrossBodyExpelGate (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::crossBodyExpelGate.
R3Bool r3RecoveryEdgeStandDown (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::edgeStandDown.
R3Bool r3RecoveryCrossingRepulsion (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::crossingRepulsion.
R3Bool r3RecoveryCrossingRepulsionGuide (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::crossingRepulsionGuide.
R3Bool r3RecoveryCrossingRepulsionSelfGuide (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::crossingRepulsionSelfGuide.
R3Real r3RecoveryRecoveryPace (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::recoveryPace.
R3Bool r3RecoveryOverlapConstraints (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::overlapConstraints.
R3Bool r3RecoveryOverlapRigid (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::overlapRigid.
R3Bool r3RecoveryOverlapSkipSelfTangled (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::overlapSkipSelfTangled.
R3Bool r3RecoveryOverlapEdgeStandDown (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::overlapEdgeStandDown.
R3Real r3RecoveryOverlapConstraintPace (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::overlapConstraintPace.
uint32_t r3RecoveryOverlapPatchConstraints (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::overlapPatchConstraints.
R3Status r3RecoverySetOverlapPatchConstraints (struct R3World *world, uint32_t value)
 Set the world setting documented by R3SoftRecoverySettings::overlapPatchConstraints.
R3Bool r3RecoveryOverlapSkinVolume (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::overlapSkinVolume.
R3Real r3RecoveryOverlapKeptDepth (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::overlapKeptDepth.
R3Bool r3RecoveryOverlapSelfRegions (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::overlapSelfRegions.
R3Bool r3RecoveryOverlapNormalPush (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::overlapNormalPush.
R3Bool r3RecoveryOverlapMultiVolume (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::overlapMultiVolume.
uint32_t r3RecoveryOverlapSplit (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::overlapSplit.
R3Status r3RecoverySetOverlapSplit (struct R3World *world, uint32_t value)
 Set the world setting documented by R3SoftRecoverySettings::overlapSplit.
uint32_t r3RecoveryOverlapPatience (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::overlapPatience.
R3Status r3RecoverySetOverlapPatience (struct R3World *world, uint32_t value)
 Set the world setting documented by R3SoftRecoverySettings::overlapPatience.
R3Real r3RecoveryOverlapProgressMargin (const struct R3World *world)
 Return the world setting documented by R3SoftRecoverySettings::overlapProgressMargin.
R3Real r3FemLinearTolerance (const struct R3World *world)
 Return the world setting documented by R3SoftFemParameters::linearTolerance.
size_t r3FemMaxLinearIterations (const struct R3World *world)
 Return the world setting documented by R3SoftFemParameters::maxLinearIterations.
size_t r3FemMaxDenseDofs (const struct R3World *world)
 Return the world setting documented by R3SoftFemParameters::maxDenseDofs.
size_t r3Collider_ShapeIdentity (struct R3ColliderHandle handle)
 Return a process-local geometry identity for caching, not a serializable ID.
size_t r3SoftBody_NumParticles (struct R3SoftBodyHandle handle)
 Return the soft body particle count.
uint32_t r3SoftBody_TopologyVersion (struct R3SoftBodyHandle handle)
 Return a counter that changes when particle connectivity changes; use it to invalidate mesh caches.
R3Real r3SoftBody_Mass (struct R3SoftBodyHandle handle)
 Return the soft body mass.
R3Real r3SoftBody_Volume (struct R3SoftBodyHandle handle)
 Return the soft body current volume.
R3Real r3SoftBody_RestVolume (struct R3SoftBodyHandle handle)
 Return the soft body undeformed volume.
R3Real r3SoftBody_VolumeFactor (struct R3SoftBodyHandle handle)
 Return the soft body target volume multiplier.
struct R3Vector r3SoftBody_CenterOfMass (struct R3SoftBodyHandle handle)
 Return the soft body world-space center of mass.
struct R3RigidBodyHandle r3SoftBody_RootBody (struct R3SoftBodyHandle handle)
 Return the soft body root rigid-proxy handle.
R3Bool r3SoftBody_IsEnabled (struct R3SoftBodyHandle handle)
 Return whether the soft body is enabled.
R3Bool r3SoftBody_IsSleeping (struct R3SoftBodyHandle handle)
 Return whether the soft body is sleeping.
size_t r3SoftBody_ParticleVelocities (struct R3SoftBodyHandle handle, struct R3Vector *buffer, size_t capacity)
 Copy world-space particle velocities.
size_t r3SoftBody_Edges (struct R3SoftBodyHandle handle, uint32_t *buffer, size_t capacity)
 Copy flattened edge vertex indices.
size_t r3SoftBody_Cells (struct R3SoftBodyHandle handle, uint32_t *buffer, size_t capacity)
 Copy flattened cell vertex indices.
size_t r3SoftBody_Boundary (struct R3SoftBodyHandle handle, uint32_t *buffer, size_t capacity)
 Copy flattened boundary element indices.
size_t r3SoftBody_Pieces (struct R3SoftBodyHandle handle, struct R3SoftBodyHandle *buffer, size_t capacity)
 Copy piece identifiers.
R3Status r3SoftBody_SetParticleVelocity (struct R3SoftBodyHandle handle, size_t index, struct R3Vector value)
 Set the soft body particle world-space velocity.
R3Status r3SoftBody_SetParticleKinematicTarget (struct R3SoftBodyHandle handle, size_t index, struct R3Vector value)
 Set the next world-space target position of a pinned particle.
R3Status r3SoftBody_SetParticlePinned (struct R3SoftBodyHandle handle, size_t index, R3Bool value)
 Enable or disable pinning the particle for the soft body.
R3Status r3SoftBody_ApplyParticleImpulse (struct R3SoftBodyHandle handle, size_t index, struct R3Vector value, R3Bool wake_up)
 Apply a world-space impulse to one particle.
R3Status r3SoftBody_AddForce (struct R3SoftBodyHandle handle, struct R3Vector value, R3Bool wake_up)
 Accumulate a world-space force; it persists until reset.
R3Status r3SoftBody_ApplyImpulse (struct R3SoftBodyHandle handle, struct R3Vector value, R3Bool wake_up)
 Add the same world-space velocity change to every free particle: the whole body is kicked at the same velocity, whatever the particle masses (the value is not divided by the mass).
R3Status r3SoftBody_ResetForces (struct R3SoftBodyHandle handle, R3Bool wake_up)
 Clear accumulated user forces.
R3Status r3SoftBody_SetEnabled (struct R3SoftBodyHandle handle, R3Bool value)
 Enable or disable the soft body.
R3Status r3SoftBody_SetVolumeFactor (struct R3SoftBodyHandle handle, R3Real value)
 Set the soft body target volume multiplier.
R3Status r3SoftBody_AttachParticle (struct R3SoftBodyHandle handle, size_t index, struct R3RigidBodyHandle rigid_body)
 Attach a particle to a rigid body by a two-way point-to-point constraint (unlike pinning).
R3Bool r3SoftBody_DetachParticle (struct R3SoftBodyHandle handle, size_t index)
 Detach a particle from every rigid body it was attached to with r3SoftBody_AttachParticle.
size_t r3SoftBody_Clusters (struct R3SoftBodyHandle handle, uint32_t *buffer, size_t capacity)
 Copy cluster indices.
struct R3RigidBodyHandle r3SoftBody_ClusterProxy (struct R3SoftBodyHandle handle, uint32_t cluster)
 Return the rigid proxy for the selected cluster.
size_t r3SoftBody_ClusterParticles (struct R3SoftBodyHandle handle, uint32_t cluster, uint32_t *buffer, size_t capacity)
 Copy particle indices for a cluster.
R3Status r3SoftBody_SetClusterPinned (struct R3SoftBodyHandle handle, uint32_t cluster, R3Bool value)
 Enable or disable pinning the cluster for the soft body.
R3Status r3SoftBody_SetClusterKinematicTarget (struct R3SoftBodyHandle handle, uint32_t cluster, struct R3Pose value)
 Set the next world-space target pose of a pinned cluster.
R3Status r3SoftBody_SetClusterShapeMatchingEnabled (struct R3SoftBodyHandle handle, uint32_t cluster, R3Bool value)
 Enable or disable using cluster shape matching for the soft body.
R3Status r3SoftBody_SetClusterStiffnessScale (struct R3SoftBodyHandle handle, uint32_t cluster, R3Real value)
 Scale the material stiffness (Young modulus) of every cell fully contained in a live cluster: regional materials without a separate body.
R3Status r3SoftBody_SetClusterTearResistance (struct R3SoftBodyHandle handle, uint32_t cluster, R3Real value)
 Set the soft body cluster tear-resistance multiplier.
size_t r3SoftBody_Meshes (struct R3SoftBodyHandle handle, struct R3SoftMeshInfo *buffer, size_t capacity)
 Copy collision mesh metadata.
size_t r3SoftBody_MeshVerticesById (struct R3SoftBodyHandle handle, struct R3SoftMeshId id, struct R3Vector *buffer, size_t capacity)
 Copy world-space vertices for a mesh ID.
size_t r3SoftBody_MeshIndicesById (struct R3SoftBodyHandle handle, struct R3SoftMeshId id, uint32_t *buffer, size_t capacity)
 Copy flattened indices for a mesh ID.
size_t r3SoftBody_MeshColliders (struct R3SoftBodyHandle handle, struct R3ColliderHandle *buffer, size_t capacity)
 Copy collision mesh collider handles.
size_t r3SoftBody_MeshVertices (struct R3SoftBodyHandle handle, struct R3ColliderHandle collider, struct R3Vector *buffer, size_t capacity)
 Copy world-space collision mesh vertices.
size_t r3SoftBody_MeshIndices (struct R3SoftBodyHandle handle, struct R3ColliderHandle collider, uint32_t *buffer, size_t capacity)
 Copy flattened collision mesh indices.
size_t r3SoftBody_MeshArity (struct R3SoftBodyHandle handle, struct R3ColliderHandle collider)
 Return indices per collision-mesh element (2 for segments, 3 for triangles).
uint32_t r3SoftBody_MeshTopologyVersion (struct R3SoftBodyHandle handle, struct R3ColliderHandle collider)
 Return the selected collision mesh topology revision for cache invalidation.
R3Status r3SoftBody_SetSolver (struct R3SoftBodyHandle handle, uint32_t solver)
 Set the soft body soft solver kind (R3_SOFT_SOLVER_*).
R3Status r3SoftBody_SetClusterShapeMatchingTarget (struct R3SoftBodyHandle handle, uint32_t cluster, const struct R3Pose *target)
 Set the soft body cluster shape-matching target pose.
R3Status r3SoftBody_SetEdgeTearResistance (struct R3SoftBodyHandle handle, size_t index, R3Real resistance)
 Set the soft body edge tear-resistance multiplier.
R3Bool r3SoftBody_MeshIsClosed (struct R3SoftBodyHandle handle, struct R3ColliderHandle collider)
 Return whether the selected collision mesh is closed.
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 r3Collider_SetMassProperties (struct R3ColliderHandle handle, struct R3MassProperties properties)
 Set the collider local mass properties.
struct R3MassProperties r3Collider_MassProperties (struct R3ColliderHandle handle)
 Return the collider local 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.
R3Bool r3Collider_IsVoxels (struct R3ColliderHandle handle)
 Return whether the collider is a voxel shape.
struct R3VoxelQuery r3Collider_VoxelAtFlatId (struct R3ColliderHandle handle, uint32_t id)
 Return voxel information at a flat index; found = 0 if absent.
R3Status r3Collider_SetVoxel (struct R3ColliderHandle handle, struct R3VoxelKey key, R3Bool filled)
 Fill or clear the voxel at key; the collider must have a voxel shape.
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.
struct R3SoftBodyHandle r3RigidBody_SoftBody (struct R3RigidBodyHandle handle)
 Return the associated soft-body handle, or an invalid handle if this is not a soft proxy.
R3Bool r3RigidBody_IsSoftFrame (struct R3RigidBodyHandle handle)
 Return whether the rigid body is a soft-body proxy.
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 r3Collider_SetDensity (struct R3ColliderHandle handle, R3Real value)
 Set the collider mass per unit volume.
R3Status r3Collider_SetMass (struct R3ColliderHandle handle, R3Real value)
 Set the collider mass.
R3Status r3Collider_SetEnabled (struct R3ColliderHandle handle, R3Bool value)
 Enable or disable the collider.
R3Status r3Collider_SetSolverGroups (struct R3ColliderHandle handle, struct R3InteractionGroups value)
 Set the collider contact-force filtering groups.
R3Status r3Collider_SetFrictionCombineRule (struct R3ColliderHandle handle, uint32_t value)
 Set the collider friction combination rule (R3_COMBINE_*).
R3Status r3Collider_SetRestitutionCombineRule (struct R3ColliderHandle handle, uint32_t value)
 Set the collider restitution combination rule (R3_COMBINE_*).
R3Status r3Collider_SetContactSkin (struct R3ColliderHandle handle, R3Real value)
 Set the collider extra separation skin around the shape.
R3Status r3Collider_SetContactForceEventThreshold (struct R3ColliderHandle handle, R3Real value)
 Set the collider force threshold for contact-force events.
R3Status r3Collider_SetActiveEvents (struct R3ColliderHandle handle, uint32_t value)
 Set the collider event-generation bitmask (R3_COLLISION_EVENTS and R3_CONTACT_FORCE_EVENTS).
R3Status r3Collider_SetActiveHooks (struct R3ColliderHandle handle, uint32_t value)
 Set the collider physics-hook activation bitmask.
R3Status r3Collider_SetActiveCollisionTypes (struct R3ColliderHandle handle, uint16_t value)
 Set the collider body-type collision activation bitmask.
struct R3Rotation r3Collider_Rotation (struct R3ColliderHandle handle)
 Return the collider world-space rotation.
struct R3InteractionGroups r3Collider_CollisionGroups (struct R3ColliderHandle handle)
 Return the collider collision filtering groups.
struct R3InteractionGroups r3Collider_SolverGroups (struct R3ColliderHandle handle)
 Return the collider contact-force filtering groups.
struct R3UserData r3Collider_UserData (struct R3ColliderHandle handle)
 Return the collider application-owned 128-bit user value.
uint32_t r3Collider_ActiveEvents (struct R3ColliderHandle handle)
 Return the collider event-generation bitmask (R3_COLLISION_EVENTS and R3_CONTACT_FORCE_EVENTS).
R3Real r3Collider_Mass (struct R3ColliderHandle handle)
 Return the collider mass.
R3Real r3Collider_Density (struct R3ColliderHandle handle)
 Return the collider mass per unit volume.
R3Real r3Collider_Volume (struct R3ColliderHandle handle)
 Return the collider current volume.
R3Real r3Collider_ContactSkin (struct R3ColliderHandle handle)
 Return the collider extra separation skin around the shape.
R3Real r3Collider_ContactForceEventThreshold (struct R3ColliderHandle handle)
 Return the collider force threshold for contact-force events.
R3Bool r3Collider_IsEnabled (struct R3ColliderHandle handle)
 Return whether the collider is enabled.
struct R3Aabb r3Collider_ComputeAabb (struct R3ColliderHandle handle)
 Return the current world-space axis-aligned bounds.
R3SharedShape * r3Collider_CloneShape (struct R3ColliderHandle handle)
 Return an owned wrapper sharing the collider geometry.
R3Status r3Collider_SetShape (struct R3ColliderHandle handle, const R3SharedShape *shape)
 Replace collider geometry by sharing shape; the supplied wrapper is not consumed.
R3Status r3Collider_SetPositionWrtParent (struct R3ColliderHandle handle, struct R3Pose value)
 Set the collider pose relative to the parent rigid body.
R3Status r3RigidBody_ValidateHandle (struct R3RigidBodyHandle handle)
 Validate the index and generation in the live owning world.
R3Status r3Collider_ValidateHandle (struct R3ColliderHandle handle)
 Validate the index and generation in the live owning world.
R3Status r3SoftBody_ValidateHandle (struct R3SoftBodyHandle handle)
 Validate the index and generation in the live owning world.
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.
R3SharedShape * r3ConvexDecompositionSharedShape (struct R3VectorView vertices, R3SurfaceElementView indices)
 Create an owned compound shape by convex decomposition of the input surface.
R3SharedShape * r3VoxelsSharedShapeFromPoints (struct R3Vector voxel_size, struct R3VectorView points)
 Create an owned voxel shape by quantizing points with the supplied per-axis voxel size.
R3SharedShape * r3VoxelizedMeshSharedShape (struct R3VectorView vertices, R3SurfaceElementView indices, R3Real voxel_size)
 Create an owned voxel shape from a surface mesh with the supplied uniform voxel size.
R3SharedShape * r3ConvexHullSharedShape (struct R3VectorView vertices)
 Create an owned convex hull of the supplied vertices.
R3SharedShape * r3ConvexMeshSharedShape (struct R3VectorView vertices, struct R3TriangleView indices)
 Create an owned convex polyhedron from vertices and triangle indices assumed to form a convex mesh (no convex hull is computed); fails on degenerate input.
R3SharedShape * r3TrimeshSharedShape (struct R3VectorView vertices, struct R3TriangleView indices)
 Create an owned triangle mesh from vertices and triangle indices.
R3SharedShape * r3PolylineSharedShape (struct R3VectorView vertices, struct R3EdgeView indices)
 Create an owned polyline from vertices and edge indices.
R3SharedShape * r3RoundConvexHullSharedShape (struct R3VectorView vertices, R3Real border_radius)
 Create an owned round convex hull shape.
R3SharedShape * r3TrimeshSharedShapeWithFlags (struct R3VectorView vertices, struct R3TriangleView indices, uint32_t flags)
 Create an owned triangle mesh with the supplied TRIMESH_* processing flags.
struct R3World * r3NewWorld (void)
 Create an owned world.
R3Status r3FreeWorld (struct R3World *world)
 Free a world.
struct R3VelocityCorrection r3ReadPidController_RigidBodyCorrection (const struct R3ReadContext *context, struct R3PidController *controller, R3Real dt, struct R3RigidBodyHandle body, struct R3Pose target_pose, struct R3Vector target_linvel, R3AngVector target_angvel)
 Compute a velocity correction from callback-visible body state, updating the PID controller history.
struct R3VelocityCorrection r3ReadPdController_RigidBodyCorrection (const struct R3ReadContext *context, const struct R3PdController *controller, struct R3RigidBodyHandle body, struct R3Pose target_pose, struct R3Vector target_linvel, R3AngVector target_angvel)
 Compute a PD velocity correction from callback-visible body state.
size_t r3ReadRigidBodyCount (const struct R3ReadContext *context)
 Return the number of rigid body objects in the world.
size_t r3ReadRigidBodyHandles (const struct R3ReadContext *context, struct R3RigidBodyHandle *buffer, size_t capacity)
 Copy entity handles.
R3Bool r3ReadRigidBody_Contains (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Test whether the live world contains this rigid body handle.
size_t r3ReadColliderCount (const struct R3ReadContext *context)
 Return the number of collider objects in the world.
size_t r3ReadColliderHandles (const struct R3ReadContext *context, struct R3ColliderHandle *buffer, size_t capacity)
 Copy entity handles.
R3Bool r3ReadCollider_Contains (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Test whether the live world contains this collider handle.
size_t r3ReadCollider_ShapeIdentity (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return a process-local geometry identity for caching, not a serializable ID.
struct R3MassProperties r3ReadCollider_MassProperties (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider local mass properties.
uint8_t r3ReadRigidBody_LockedAxes (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body translation/rotation lock bitmask.
R3Bool r3ReadCollider_IsVoxels (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return whether the collider is a voxel shape.
struct R3VoxelQuery r3ReadCollider_VoxelAtFlatId (const struct R3ReadContext *context, struct R3ColliderHandle handle, uint32_t id)
 Return voxel information at a flat index; found = 0 if absent.
struct R3Pose r3ReadRigidBody_NextPosition (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body next kinematic world-space pose.
struct R3Rotation r3ReadRigidBody_Rotation (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body world-space rotation.
struct R3Vector r3ReadRigidBody_CenterOfMass (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body world-space center of mass.
struct R3Vector r3ReadRigidBody_LocalCenterOfMass (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body body-local center of mass.
struct R3Vector r3ReadRigidBody_UserForce (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body accumulated user-applied world-space force.
R3AngVector r3ReadRigidBody_UserTorque (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body accumulated user-applied world-space torque.
uint32_t r3ReadRigidBody_BodyType (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body body type (R3_DYNAMIC, R3_FIXED, or a kinematic kind).
R3Real r3ReadRigidBody_Mass (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body mass.
R3Real r3ReadRigidBody_GravityScale (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body gravity multiplier.
R3Real r3ReadRigidBody_LinearDamping (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body linear damping coefficient.
R3Real r3ReadRigidBody_AngularDamping (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body angular damping coefficient.
R3Real r3ReadRigidBody_KineticEnergy (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body kinetic energy.
R3Real r3ReadRigidBody_SoftCcdPrediction (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body soft-CCD prediction distance.
R3Bool r3ReadRigidBody_IsCcdEnabled (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return whether the rigid body is using continuous collision detection.
R3Bool r3ReadRigidBody_IsDynamic (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return whether the rigid body is dynamic.
struct R3SoftBodyHandle r3ReadRigidBody_SoftBody (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the associated soft-body handle, or an invalid handle if this is not a soft proxy.
R3Bool r3ReadRigidBody_IsSoftFrame (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return whether the rigid body is a soft-body proxy.
R3Bool r3ReadRigidBody_IsFixed (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return whether the rigid body is fixed.
R3Bool r3ReadRigidBody_IsKinematic (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return whether the rigid body is kinematic.
R3Bool r3ReadRigidBody_IsMoving (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return whether the rigid body is moving.
R3Bool r3ReadRigidBody_IsCcdActive (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return whether the rigid body is currently using CCD for its motion.
struct R3Vector r3ReadRigidBody_VelocityAtPoint (const struct R3ReadContext *context, struct R3RigidBodyHandle handle, struct R3Vector point)
 Return world-space velocity at a world-space point, including angular motion.
size_t r3ReadRigidBody_Colliders (const struct R3ReadContext *context, struct R3RigidBodyHandle handle, struct R3ColliderHandle *buffer, size_t capacity)
 Copy attached collider handles.
R3Bool r3ReadRigidBody_GyroscopicForcesEnabled (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return whether the rigid body is using gyroscopic forces.
struct R3Rotation r3ReadCollider_Rotation (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider world-space rotation.
struct R3InteractionGroups r3ReadCollider_CollisionGroups (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider collision filtering groups.
struct R3InteractionGroups r3ReadCollider_SolverGroups (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider contact-force filtering groups.
struct R3UserData r3ReadCollider_UserData (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider application-owned 128-bit user value.
uint32_t r3ReadCollider_ActiveEvents (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider event-generation bitmask (R3_COLLISION_EVENTS and R3_CONTACT_FORCE_EVENTS).
R3Real r3ReadCollider_Mass (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider mass.
R3Real r3ReadCollider_Density (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider mass per unit volume.
R3Real r3ReadCollider_Volume (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider current volume.
R3Real r3ReadCollider_ContactSkin (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider extra separation skin around the shape.
R3Real r3ReadCollider_ContactForceEventThreshold (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider force threshold for contact-force events.
R3Bool r3ReadCollider_IsEnabled (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return whether the collider is enabled.
struct R3Aabb r3ReadCollider_ComputeAabb (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the current world-space axis-aligned bounds.
R3SharedShape * r3ReadCollider_CloneShape (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return an owned wrapper sharing the collider geometry.
R3Status r3ReadRigidBody_ValidateHandle (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Validate the index and generation in the live owning world.
R3Status r3ReadCollider_ValidateHandle (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Validate the index and generation in the live owning world.
struct R3Pose r3ReadRigidBody_Position (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body world-space pose.
struct R3Vector r3ReadRigidBody_Translation (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body world-space translation.
struct R3Vector r3ReadRigidBody_Linvel (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body world-space linear velocity.
R3AngVector r3ReadRigidBody_Angvel (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body world-space angular velocity (radians per second).
R3Bool r3ReadRigidBody_IsSleeping (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return whether the rigid body is sleeping.
R3Bool r3ReadRigidBody_IsEnabled (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return whether the rigid body is enabled.
struct R3UserData r3ReadRigidBody_UserData (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body application-owned 128-bit user value.
struct R3Pose r3ReadCollider_Position (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider world-space pose.
struct R3Vector r3ReadCollider_Translation (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider world-space translation.
R3Real r3ReadCollider_Friction (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider friction coefficient.
R3Real r3ReadCollider_Restitution (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider restitution coefficient.
R3Bool r3ReadCollider_IsSensor (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return whether the collider is a sensor (detects overlaps without contact forces).
struct R3RigidBodyHandle r3ReadCollider_Parent (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Read the parent body handle during a callback; a standalone collider returns an invalid handle with OK status.
size_t r3ReadRigidBodyReadStates (const struct R3ReadContext *context, const struct R3RigidBodyHandle *handles, size_t handle_count, struct R3RigidBodyState *states, size_t capacity)
 Copy callback-visible body states in the supplied handle order.
uint16_t r3ReadCollider_ActiveCollisionTypes (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider body-type collision activation bitmask (R3_COLLISION_TYPES_* bits).
uint32_t r3ReadCollider_ActiveHooks (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider physics-hook activation bitmask.
uint32_t r3ReadCollider_FrictionCombineRule (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider friction combination rule (R3_COMBINE_*).
uint32_t r3ReadCollider_RestitutionCombineRule (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider restitution combination rule (R3_COMBINE_*).
struct R3Pose r3ReadCollider_PositionWrtParent (const struct R3ReadContext *context, struct R3ColliderHandle handle)
 Return the collider pose relative to its parent rigid body, or its world-space pose if it has no parent.
int8_t r3ReadRigidBody_DominanceGroup (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body signed dominance group.
size_t r3ReadRigidBody_AdditionalSolverIterations (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body additional solver iterations for connected bodies.
size_t r3ReadRigidBody_AdditionalPgsIterations (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return the rigid body additional PGS iterations for connected bodies.
R3Bool r3ReadRigidBody_IsFastRotationAllowed (const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
 Return whether the rigid body may exceed the angular-velocity limit of its CCD.
size_t r3IntersectRay (const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Vector origin, struct R3Vector direction, R3Real max_toi, R3Bool solid, struct R3RayHit *buffer, size_t capacity)
 Copy the hits of every collider intersected by the ray, in no particular order.
struct R3OptionalShapeCastHit r3TryCastShape (const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Pose pose, struct R3Vector velocity, const R3SharedShape *shape, struct R3ShapeCastOptions options)
 Sweep shape from pose along velocity and return the first hit, with found = 0 on a miss (R3_OK).
struct R3OptionalPointProjection r3TryProjectPoint (const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Vector point, R3Real max_distance, R3Bool solid)
 Return the closest surface projection within max_distance, with found = 0 if there is none (R3_OK).
struct R3Pose r3NonlinearRigidMotion_PositionAtTime (const struct R3NonlinearRigidMotion *motion, R3Real time)
 Return the world-space pose of the motion at the given time.
struct R3OptionalShapeCastHit r3TryCastShapeNonlinear (const struct R3World *world, const struct R3QueryOptions *query_options, const struct R3NonlinearRigidMotion *motion, const R3SharedShape *shape, R3Real start_time, R3Real end_time, R3Bool stop_at_penetration)
 Sweep shape along a rotating motion and return the first hit between start_time and end_time, with found = 0 on a miss (R3_OK).
struct R3OptionalContactPair r3TryContactPair (struct R3ColliderHandle collider1, struct R3ColliderHandle collider2)
 Return the narrow-phase contact pair for two colliders, with found = 0 if the broad phase found no potential contact between them (R3_OK).
struct R3IntersectionPair r3IntersectionPair (struct R3ColliderHandle collider1, struct R3ColliderHandle collider2)
 Return the intersection state of two colliders involving a sensor, or report R3_NOT_FOUND if the broad phase found no potential intersection.
struct R3OptionalIntersectionPair r3TryIntersectionPair (struct R3ColliderHandle collider1, struct R3ColliderHandle collider2)
 Return the intersection state of two colliders involving a sensor, with found = 0 if the broad phase found no potential intersection (R3_OK).
size_t r3Collider_ContactPairs (struct R3ColliderHandle handle, struct R3ContactPair *buffer, size_t capacity)
 Copy the narrow-phase contact pairs involving the collider, including pairs without active solver contacts.
size_t r3Collider_IntersectionPairs (struct R3ColliderHandle handle, struct R3IntersectionPair *buffer, size_t capacity)
 Copy the intersection pairs involving the collider, in the narrow-phase order.
size_t r3ContactManifolds (struct R3ColliderHandle collider1, struct R3ColliderHandle collider2, struct R3ContactManifold *buffer, size_t capacity)
 Copy the geometric contact manifolds of a contact pair, or report R3_NOT_FOUND without a pair.
size_t r3SolverContacts (struct R3ColliderHandle collider1, struct R3ColliderHandle collider2, size_t manifold_index, struct R3SolverContact *buffer, size_t capacity)
 Copy the solver contacts of one manifold of a contact pair, or report R3_NOT_FOUND without a pair.
R3Bool r3ContactModificationContext_IsSoft (const struct R3ContactModificationContext *context)
 Return whether the context holds the contact candidates of two soft surfaces rather than a manifold.
size_t r3ContactModificationContext_SolverContactCount (const struct R3ContactModificationContext *context)
 Return the number of solver contacts of the manifold; zero for a soft context.
struct R3SolverContact r3ContactModificationContext_SolverContact (const struct R3ContactModificationContext *context, size_t index)
 Return a solver contact of the manifold.
R3Status r3ContactModificationContext_SetSolverContact (struct R3ContactModificationContext *context, size_t index, const struct R3SolverContact *contact)
 Replace the points, distance and tangent velocity of a solver contact of the manifold.
R3Status r3ContactModificationContext_RemoveSolverContact (struct R3ContactModificationContext *context, size_t index)
 Remove a solver contact of the manifold.
R3Status r3EventCollector_SetCallbacks (struct R3EventCollector *events, const struct R3EventCallbacks *callbacks)
 Replace the callbacks invoked while stepping with this collector; NULL removes them.
struct R3DebugRenderStyle r3DefaultDebugRenderStyle (void)
 Return native default debug-render style.
size_t r3DebugRenderWithStyle (const struct R3World *world, uint32_t mode, const struct R3DebugRenderStyle *style, struct R3DebugLine *buffer, size_t capacity)
 Copy the debug-render lines of the world drawn with the given style.

Detailed Description

Rapier C ABI.

Select dimension and precision before including this file. Select one variant per translation unit; flags must match its linked library. Read README.md for ownership, pointer lifetime, callbacks and threading.

Macro Definition Documentation

◆ R3_DIMENSION

#define R3_DIMENSION   3

Spatial dimension selected by this header.

◆ RAPIER_CALL

#define RAPIER_CALL

C ABI calling convention.

◆ RAPIER_CONST

#define RAPIER_CONST ( name)
Value:
R3_##name

Select an R2/R3 public constant name.

Examples
falling_ball.c.

◆ RAPIER_FN

#define RAPIER_FN ( name)
Value:
r3##name

Select an r2/r3 public function name.

Examples
falling_ball.c.

◆ RAPIER_TYPE

#define RAPIER_TYPE ( name)
Value:
R3##name

Select an R2/R3 public type name.

Examples
falling_ball.c.