|
| struct R2SoftBodyMaterial | r2DefaultSoftBodyMaterial (void) |
| | Return native default soft body material.
|
| struct R2SoftRecoverySettings | r2DefaultSoftRecoverySettings (void) |
| | Return native default soft recovery settings.
|
| struct R2SoftFemParameters | r2DefaultSoftFemParameters (void) |
| | Return native default soft fem parameters.
|
| struct R2SoftBodiesSettings | r2DefaultSoftBodiesSettings (void) |
| | Return native default soft bodies settings.
|
| struct R2IntegrationParameters | r2DefaultIntegrationParameters (void) |
| | Return native default integration parameters.
|
| struct R2IntegrationParameters | r2IntegrationParameters (const struct R2World *world) |
| | Return a copy of all world integration settings.
|
| R2Status | r2SetIntegrationParameters (struct R2World *world, const struct R2IntegrationParameters *data) |
| | Copies validated values; does not expose a writable alias to Rust memory.
|
| struct R2JointDesc | r2DefaultJointDesc (void) |
| | Return native default joint desc.
|
| struct R2JointDesc | r2FixedJointDesc (void) |
| | Return a fixed joint description with native defaults; no allocation.
|
| struct R2JointDesc | r2RevoluteJointDesc (void) |
| | Return a revolute joint description with native defaults; no allocation.
|
| struct R2JointDesc | r2PrismaticJointDesc (struct R2Vector axis_vector) |
| | Returns a joint description.
|
| struct R2JointDesc | r2RopeJointDesc (R2Real length) |
| | Return a rope joint description with native defaults; no allocation.
|
| struct R2JointDesc | r2SpringJointDesc (R2Real length, R2Real stiffness, R2Real damping) |
| | Return a spring joint description with native defaults; no allocation.
|
| struct R2JointDesc | r2PinSlotJointDesc (struct R2Vector axis_vector) |
| | Returns a joint description.
|
| struct R2ImpulseJointHandle | r2InsertImpulseJoint (struct R2RigidBodyHandle body1, struct R2RigidBodyHandle body2, const struct R2JointDesc *joint) |
| | Create an impulse joint connecting two bodies in the same world.
|
| struct R2MultibodyJointHandle | r2InsertMultibodyJoint (struct R2RigidBodyHandle body1, struct R2RigidBodyHandle body2, const struct R2JointDesc *joint) |
| | Create an articulation joint between bodies in the same world.
|
| struct R2SoftBodyDesc | r2DefaultSoftBodyDesc (void) |
| | Return native default soft body desc.
|
| struct R2SoftBodyHandle | r2InsertSoftBody (struct R2World *world, const struct R2SoftBodyDesc *desc) |
| | Consumes no caller-owned resources.
|
| struct R2SoftMeshBindingDesc | r2DefaultSoftMeshBindingDesc (void) |
| | Return native default soft mesh binding desc.
|
| struct R2ColliderHandle | r2InsertDeformableCollider (const struct R2ColliderDesc *collider, const struct R2SoftMeshBindingDesc *binding, struct R2RigidBodyHandle parent) |
| | Create a deformable collider bound to a soft-body cluster.
|
| struct R2QueryOptions | r2DefaultQueryOptions (void) |
| | Return native default query options.
|
| struct R2RayHit | r2CastRay (const struct R2World *world, const struct R2QueryOptions *query_options, struct R2Vector origin, struct R2Vector direction, R2Real max_toi, R2Bool solid) |
| | Return the closest ray hit, or report R2_NOT_FOUND on a miss.
|
| struct R2PointProjection | r2ProjectPoint (const struct R2World *world, const struct R2QueryOptions *query_options, struct R2Vector point, R2Real max_distance, R2Bool solid) |
| | Return the closest surface projection within max_distance, or report R2_NOT_FOUND.
|
| struct R2ShapeCastHit | r2CastShape (const struct R2World *world, const struct R2QueryOptions *query_options, struct R2Pose pose, struct R2Vector velocity, const R2SharedShape *shape, struct R2ShapeCastOptions options) |
| | Sweep shape from pose along velocity and return the first hit; report R2_NOT_FOUND on a miss.
|
| size_t | r2IntersectPoint (const struct R2World *world, const struct R2QueryOptions *query_options, struct R2Vector point, struct R2ColliderHandle *buffer, size_t capacity) |
| | Copy handles of colliders containing the world-space point.
|
| size_t | r2IntersectShape (const struct R2World *world, const struct R2QueryOptions *query_options, struct R2Pose pose, const R2SharedShape *shape, struct R2ColliderHandle *buffer, size_t capacity) |
| | Copy handles of colliders intersecting the shape at its world-space pose.
|
| size_t | r2IntersectAabbConservative (const struct R2World *world, const struct R2QueryOptions *query_options, struct R2Aabb aabb, struct R2ColliderHandle *buffer, size_t capacity) |
| | Copy broad-phase candidates whose bounding boxes overlap the world-space AABB.
|
| struct R2RayToi | r2CastRayToi (const struct R2World *world, const struct R2QueryOptions *query_options, struct R2Vector origin, struct R2Vector direction, R2Real max_toi, R2Bool solid) |
| | Return the closest ray collider and time, with found = 0 on a miss (R2_OK).
|
| struct R2OptionalRayHit | r2TryCastRay (const struct R2World *world, const struct R2QueryOptions *query_options, struct R2Vector origin, struct R2Vector direction, R2Real max_toi, R2Bool solid) |
| | Return the closest ray hit with found = 0 on a miss (R2_OK).
|
| struct R2RigidBodyDesc | r2DynamicRigidBodyDesc (void) |
| | Return a dynamic rigid-body description with native defaults; no allocation.
|
| struct R2RigidBodyDesc | r2FixedRigidBodyDesc (void) |
| | Return a fixed rigid-body description with native defaults; no allocation.
|
| struct R2RigidBodyDesc | r2KinematicPositionBasedRigidBodyDesc (void) |
| | Return a kinematic position based rigid-body description with native defaults; no allocation.
|
| struct R2RigidBodyDesc | r2KinematicVelocityBasedRigidBodyDesc (void) |
| | Return a kinematic velocity based rigid-body description with native defaults; no allocation.
|
| struct R2ShapeDesc | r2DefaultShapeDesc (void) |
| | Return native default shape desc.
|
| R2SharedShape * | r2ShapeDesc_Build (const struct R2ShapeDesc *desc) |
| | Build an owned shared shape from a description; release it with r2FreeSharedShape.
|
| struct R2ColliderDesc | r2DefaultColliderDesc (void) |
| | Return native default collider desc.
|
| struct R2ColliderDesc | r2BallColliderDesc (R2Real radius) |
| | Return a ball description with the supplied radius.
|
| struct R2ColliderDesc | r2CuboidColliderDesc (struct R2Vector half_extents) |
| | Return an axis-aligned box description with the supplied half-extents.
|
| struct R2RigidBodyHandle | r2InsertRigidBody (struct R2World *world, const struct R2RigidBodyDesc *desc) |
| | Create a body from the description and return its world-bound handle.
|
| struct R2ColliderHandle | r2InsertCollider (struct R2RigidBodyHandle parent, const struct R2ColliderDesc *desc) |
| | Insert a collider attached to a rigid body, using the world stored in its handle.
|
| struct R2ColliderHandle | r2InsertColliderWithoutParent (struct R2World *world, const struct R2ColliderDesc *desc) |
| | Insert a collider without a rigid-body parent.
|
| struct R2PodLayout | r2PodLayout (void) |
| | Return POD structure sizes for checking foreign-language layouts against this library.
|
| struct R2KinematicCharacterController * | r2NewKinematicCharacterController (void) |
| | Allocate a character controller with native defaults; release it with r2FreeKinematicCharacterController.
|
| R2Status | r2FreeKinematicCharacterController (struct R2KinematicCharacterController *controller) |
| | Release an owned kinematic character controller.
|
| R2Status | r2KinematicCharacterController_SetUp (struct R2KinematicCharacterController *controller, struct R2Vector up) |
| | Set the up direction; it must be finite and nonzero and is normalized on input.
|
| R2Status | r2KinematicCharacterController_SetOffset (struct R2KinematicCharacterController *controller, struct R2CharacterLength offset) |
| | Set the collision separation margin; use a positive absolute or relative character length.
|
| R2Status | r2KinematicCharacterController_SetSlide (struct R2KinematicCharacterController *controller, R2Bool enabled) |
| | Enable or disable sliding along obstacles.
|
| R2Status | r2KinematicCharacterController_SetSlopes (struct R2KinematicCharacterController *controller, R2Real max_climb_angle, R2Real min_slide_angle) |
| | Set the maximum climb angle and minimum slide angle, in radians.
|
| R2Status | r2KinematicCharacterController_SetAutostep (struct R2KinematicCharacterController *controller, R2Bool enabled, struct R2CharacterLength max_height, struct R2CharacterLength min_width, R2Bool include_dynamic_bodies) |
| | Configure automatic stepping over obstacles.
|
| R2Status | r2KinematicCharacterController_SetSnapToGround (struct R2KinematicCharacterController *controller, R2Bool enabled, struct R2CharacterLength distance) |
| | Configure downward ground snapping.
|
| struct R2Vector | r2KinematicCharacterController_Up (const struct R2KinematicCharacterController *controller) |
| | Return the normalized up direction.
|
| struct R2CharacterLength | r2KinematicCharacterController_Offset (const struct R2KinematicCharacterController *controller) |
| | Return the collision separation margin.
|
| struct R2CharacterAutostep | r2KinematicCharacterController_Autostep (const struct R2KinematicCharacterController *controller) |
| | Return the automatic stepping settings.
|
| R2Status | r2KinematicCharacterController_SetNormalNudgeFactor (struct R2KinematicCharacterController *controller, R2Real value) |
| | Set the small distance by which sliding motion is pushed along hit normals to avoid getting stuck; it must be finite and nonnegative.
|
| R2Real | r2KinematicCharacterController_NormalNudgeFactor (const struct R2KinematicCharacterController *controller) |
| | Return the normal nudge factor set by SetNormalNudgeFactor.
|
| struct R2CharacterMovement | r2KinematicCharacterController_MoveShape (const struct R2World *world, const struct R2QueryOptions *options, struct R2KinematicCharacterController *controller, R2Real dt, const R2SharedShape *shape, struct R2Pose pose, struct R2Vector desired_translation) |
| | Computes movement without moving any collider.
|
| size_t | r2KinematicCharacterController_Collisions (const struct R2KinematicCharacterController *controller, struct R2CharacterCollision *buffer, size_t capacity) |
| | Copy collisions recorded by the most recent MoveShape call.
|
| R2Status | r2KinematicCharacterController_SolveCharacterCollisionImpulses (const struct R2KinematicCharacterController *controller, const R2SharedShape *shape, R2Real dt, R2Real mass, const struct R2QueryOptions *options) |
| | Applies impulses to the dynamic bodies hit by the most recent MoveShape call.
|
| struct R2PidController * | r2NewPidController (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.
|
| R2Status | r2FreePidController (struct R2PidController *controller) |
| | Release an owned pid controller.
|
| struct R2PidGains | r2PidController_Gains (const struct R2PidController *controller) |
| | Return a copy of the proportional, integral, and derivative gains.
|
| R2Status | r2PidController_SetGains (struct R2PidController *controller, struct R2PidGains gains) |
| | Replace the proportional, integral, and derivative gains.
|
| R2Status | r2PidController_SetAxes (struct R2PidController *controller, uint32_t axes) |
| | Set the controlled axes, a combination of R2_AXES_MASK_* bits.
|
| uint32_t | r2PidController_Axes (const struct R2PidController *controller) |
| | Return the controlled axes as R2_AXES_MASK_* bits.
|
| R2Status | r2PidController_ResetIntegrals (struct R2PidController *controller) |
| | Reset to zero the linear and angular errors accumulated by the integral term.
|
| struct R2PdController | r2DefaultPdController (void) |
| | Return Rapier's default PD controller: kp = 60 and kd = 0.8 on every axis, all axes controlled.
|
| struct R2VelocityCorrection | r2PdController_RigidBodyCorrection (const struct R2PdController *controller, struct R2RigidBodyHandle body, struct R2Pose target_pose, struct R2Vector target_linvel, R2AngVector target_angvel) |
| | Compute the velocity change bringing the body toward the target pose and velocities.
|
| struct R2VelocityCorrection | r2PidController_RigidBodyCorrection (struct R2PidController *controller, R2Real dt, struct R2RigidBodyHandle body, struct R2Pose target_pose, struct R2Vector target_linvel, R2AngVector target_angvel) |
| | Compute a velocity correction, preserving the body's state and updating PID integrals.
|
| struct R2CharacterControllerSettings | r2KinematicCharacterController_Settings (const struct R2KinematicCharacterController *controller) |
| | Return a copy of slide, slope, and ground-snap settings.
|
| R2Status | r2RigidBodyPropagateModifiedBodyPositionsToColliders (struct R2World *world) |
| | Propagate all modified body poses to attached colliders.
|
| size_t | r2ActiveRigidBodies (const struct R2World *world, struct R2RigidBodyHandle *buffer, size_t capacity) |
| | Copies the island manager's active body handles.
|
| R2Status | r2RigidBody_WakeUp (struct R2RigidBodyHandle handle, R2Bool strong) |
| | Wake a body by handle, including a soft-body cluster proxy.
|
| struct R2ErrorHandler | r2SetErrorHandler (struct R2ErrorHandler handler) |
| | Replace this thread's error handler and return the previous handler so it can be restored at the end of a scope.
|
| R2Status | r2LastStatus (void) |
| | Status of the most recent fallible operation on this thread.
|
| const char * | r2LastError (void) |
| | Thread-local UTF-8 diagnostic, valid until the next fallible call on this thread.
|
| R2SharedShape * | r2BallSharedShape (R2Real radius) |
| | Create an owned ball shape.
|
| R2SharedShape * | r2CuboidSharedShape (struct R2Vector half_extents) |
| | Create an owned cuboid shape.
|
| R2SharedShape * | r2RoundCuboidSharedShape (struct R2Vector half_extents, R2Real border_radius) |
| | Create an owned round cuboid shape.
|
| R2SharedShape * | r2CapsuleSharedShape (struct R2Vector a, struct R2Vector b, R2Real radius) |
| | Create an owned capsule shape.
|
| R2SharedShape * | r2SegmentSharedShape (struct R2Vector a, struct R2Vector b) |
| | Create an owned segment shape.
|
| R2SharedShape * | r2TriangleSharedShape (struct R2Vector a, struct R2Vector b, struct R2Vector c) |
| | Create an owned triangle shape.
|
| R2SharedShape * | r2HalfspaceSharedShape (struct R2Vector normal) |
| | Create an owned halfspace shape.
|
| R2SharedShape * | r2CompoundSharedShape (struct R2CompoundShapeView children) |
| | Create an owned compound shape; each child pose is relative to the compound.
|
| R2Status | r2RemoveCollider (struct R2ColliderHandle handle, R2Bool wake_up) |
| | Remove the collider and update its parent body mass properties.
|
| R2Status | r2RemoveImpulseJoint (struct R2ImpulseJointHandle handle, R2Bool wake_up) |
| | Remove an impulse joint.
|
| size_t | r2ImpulseJointHandles (const struct R2World *world, struct R2ImpulseJointHandle *buffer, size_t capacity) |
| | Copy entity handles.
|
| R2Status | r2RemoveMultibodyJoint (struct R2MultibodyJointHandle handle, R2Bool wake_up) |
| | Remove an articulation joint.
|
| size_t | r2MultibodyJointHandles (const struct R2World *world, struct R2MultibodyJointHandle *buffer, size_t capacity) |
| | Copy entity handles.
|
| struct R2JointBodies | r2ImpulseJoint_Bodies (struct R2ImpulseJointHandle handle) |
| | Return the two bodies connected by an impulse joint.
|
| struct R2InverseKinematicsOptions | r2DefaultInverseKinematicsOptions (void) |
| | Return native default inverse kinematics options.
|
| size_t | r2MultibodyJoint_Ndofs (struct R2MultibodyJointHandle 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.
|
| R2Status | r2MultibodyJoint_InverseKinematics (struct R2MultibodyJointHandle handle, const struct R2InverseKinematicsOptions *options, struct R2Pose target, R2IkJointCanMove can_move, void *user_data, R2Real *displacements, size_t count) |
| | Read/write displacement buffer must contain exactly ndofs entries; zero it for a fresh solve.
|
| R2Status | r2MultibodyJoint_ApplyDisplacements (struct R2MultibodyJointHandle handle, const R2Real *displacements, size_t count) |
| | Apply generalized articulation displacements in native degree-of-freedom order.
|
| R2Status | r2FreeSharedShape (R2SharedShape *object) |
| | Frees an owned object; NULL is allowed.
|
| R2SharedShape * | r2SharedShape_Clone (const R2SharedShape *object) |
| | Create an owned wrapper sharing the same immutable geometry.
|
| size_t | r2RigidBodyCount (const struct R2World *world) |
| | Return the number of rigid body objects in the world.
|
| size_t | r2RigidBodyHandles (const struct R2World *world, struct R2RigidBodyHandle *buffer, size_t capacity) |
| | Copy entity handles.
|
| R2Bool | r2RigidBody_Contains (struct R2RigidBodyHandle handle) |
| | Test whether the live world contains this rigid body handle.
|
| size_t | r2ColliderCount (const struct R2World *world) |
| | Return the number of collider objects in the world.
|
| size_t | r2ColliderHandles (const struct R2World *world, struct R2ColliderHandle *buffer, size_t capacity) |
| | Copy entity handles.
|
| R2Bool | r2Collider_Contains (struct R2ColliderHandle handle) |
| | Test whether the live world contains this collider handle.
|
| size_t | r2SoftBodyCount (const struct R2World *world) |
| | Return the number of soft body objects in the world.
|
| size_t | r2SoftBodyHandles (const struct R2World *world, struct R2SoftBodyHandle *buffer, size_t capacity) |
| | Copy entity handles.
|
| R2Bool | r2SoftBody_Contains (struct R2SoftBodyHandle handle) |
| | Test whether the live world contains this soft body handle.
|
| R2Status | r2RemoveRigidBody (struct R2RigidBodyHandle handle, R2Bool remove_attached_colliders) |
| | Remove a body and its joints, optionally keeping colliders as standalone objects.
|
| R2Real | r2TimeStep (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::dt.
|
| R2Status | r2SetTimeStep (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2IntegrationParameters::dt.
|
| R2Real | r2MinCcdDt (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::minCcdDt.
|
| R2Status | r2SetMinCcdDt (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2IntegrationParameters::minCcdDt.
|
| R2Real | r2LengthUnit (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::lengthUnit.
|
| R2Status | r2SetLengthUnit (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2IntegrationParameters::lengthUnit.
|
| R2Real | r2WarmstartCoefficient (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::warmstartCoefficient.
|
| R2Status | r2SetWarmstartCoefficient (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2IntegrationParameters::warmstartCoefficient.
|
| R2Real | r2NormalizedAllowedLinearError (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::normalizedAllowedLinearError.
|
| R2Status | r2SetNormalizedAllowedLinearError (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2IntegrationParameters::normalizedAllowedLinearError.
|
| R2Real | r2NormalizedMaxCorrectiveVelocity (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::normalizedMaxCorrectiveVelocity.
|
| R2Status | r2SetNormalizedMaxCorrectiveVelocity (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2IntegrationParameters::normalizedMaxCorrectiveVelocity.
|
| R2Real | r2NormalizedPredictionDistance (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::normalizedPredictionDistance.
|
| R2Status | r2SetNormalizedPredictionDistance (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2IntegrationParameters::normalizedPredictionDistance.
|
| R2Real | r2NormalizedMaxLinearVelocity (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::normalizedMaxLinearVelocity.
|
| R2Status | r2SetNormalizedMaxLinearVelocity (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2IntegrationParameters::normalizedMaxLinearVelocity.
|
| R2Real | r2NormalizedContactRecycleDistance (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::normalizedContactRecycleDistance.
|
| R2Status | r2SetNormalizedContactRecycleDistance (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2IntegrationParameters::normalizedContactRecycleDistance.
|
| size_t | r2NumSolverIterations (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::numSolverIterations.
|
| R2Status | r2SetNumSolverIterations (struct R2World *world, size_t value) |
| | Set the world setting documented by R2IntegrationParameters::numSolverIterations.
|
| size_t | r2NumInternalPgsIterations (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::numInternalPgsIterations.
|
| R2Status | r2SetNumInternalPgsIterations (struct R2World *world, size_t value) |
| | Set the world setting documented by R2IntegrationParameters::numInternalPgsIterations.
|
| size_t | r2NumInternalStabilizationIterations (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::numInternalStabilizationIterations.
|
| R2Status | r2SetNumInternalStabilizationIterations (struct R2World *world, size_t value) |
| | Set the world setting documented by R2IntegrationParameters::numInternalStabilizationIterations.
|
| size_t | r2MaxCcdSubsteps (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::maxCcdSubsteps.
|
| R2Status | r2SetMaxCcdSubsteps (struct R2World *world, size_t value) |
| | Set the world setting documented by R2IntegrationParameters::maxCcdSubsteps.
|
| R2Bool | r2ContactClustering (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::contactClustering.
|
| R2Status | r2SetContactClustering (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2IntegrationParameters::contactClustering.
|
| R2Bool | r2ContactRecycling (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::contactRecycling.
|
| R2Status | r2SetContactRecycling (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2IntegrationParameters::contactRecycling.
|
| R2Bool | r2FrictionInBiasPass (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::frictionInBiasPass.
|
| R2Status | r2SetFrictionInBiasPass (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2IntegrationParameters::frictionInBiasPass.
|
| R2Bool | r2WarmstartJoints (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::warmstartJoints.
|
| R2Status | r2SetWarmstartJoints (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2IntegrationParameters::warmstartJoints.
|
| struct R2SpringCoefficients | r2ContactSoftness (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::contactSoftness.
|
| R2Status | r2SetContactSoftness (struct R2World *world, struct R2SpringCoefficients value) |
| | Set the world setting documented by R2IntegrationParameters::contactSoftness.
|
| struct R2SpringCoefficients | r2StaticContactSoftness (const struct R2World *world) |
| | Return the world setting documented by R2IntegrationParameters::staticContactSoftness.
|
| R2Status | r2SetStaticContactSoftness (struct R2World *world, struct R2SpringCoefficients value) |
| | Set the world setting documented by R2IntegrationParameters::staticContactSoftness.
|
| R2Status | r2ContactModificationContext_UpdateAsOnewayPlatform (struct R2ContactModificationContext *context, struct R2Vector allowed_local_n1, R2Real allowed_angle) |
| | Applies Rapier's persistent one-way platform logic to the borrowed manifold.
|
| R2Status | r2ContactModificationContext_SetTangentVelocity (struct R2ContactModificationContext *context, struct R2Vector velocity) |
| | Sets the tangent velocity of every rigid solver contact in this manifold.
|
| struct R2EventCollector * | r2NewEventCollector (void) |
| | Allocate an empty event collector; release it with r2FreeEventCollector.
|
| R2Status | r2FreeEventCollector (struct R2EventCollector *events) |
| | Release an owned event collector.
|
| R2Status | r2EventCollector_Clear (struct R2EventCollector *events) |
| | Discard all collected events.
|
| size_t | r2EventCollector_CollisionEvents (const struct R2EventCollector *events, struct R2CollisionEvent *buffer, size_t capacity) |
| | Copy the collision start/stop events collected since the last clear, without removing them.
|
| size_t | r2EventCollector_ContactForceEvents (const struct R2EventCollector *events, struct R2ContactForceEvent *buffer, size_t capacity) |
| | Copy the contact-force events collected since the last clear, without removing them.
|
| size_t | r2EventCollector_TearEventCount (const struct R2EventCollector *events) |
| | Return the number of soft-body tear events collected since the last clear.
|
| struct R2SoftBodyTearEvent * | r2EventCollector_TearEvent (const struct R2EventCollector *events, size_t index) |
| | Return an owned copy of a queued tear event; release with r2FreeSoftBodyTearEvent.
|
| struct R2Vector | r2Gravity (const struct R2World *world) |
| | Return the world-space gravitational acceleration.
|
| R2Status | r2SetGravity (struct R2World *world, struct R2Vector value) |
| | Set the world-space gravitational acceleration.
|
| R2Status | r2Step (struct R2World *world, const struct R2PhysicsHooks *hooks, const struct R2EventCollector *events) |
| | Advance simulation by one timestep.
|
| R2Status | r2DetectCollisions (struct R2World *world, const struct R2PhysicsHooks *hooks, const struct R2EventCollector *events) |
| | Refresh collision detection without advancing simulation.
|
| struct R2ByteView | r2Bytes_Data (const struct R2Bytes *bytes) |
| | Borrow snapshot bytes without copying; valid until r2FreeBytes.
|
| R2Status | r2FreeBytes (struct R2Bytes *bytes) |
| | Release an owned snapshot byte buffer.
|
| struct R2Bytes * | r2SerializeWorld (const struct R2World *world) |
| | Return owned snapshot bytes; release them with r2FreeBytes.
|
| struct R2World * | r2DeserializeWorld (const uint8_t *data, size_t count) |
| | Restore ONLY trusted snapshots produced by the identical Rapier build.
|
| size_t | r2DebugRender (const struct R2World *world, uint32_t mode, struct R2DebugLine *buffer, size_t capacity) |
| | Copy the debug-render lines of the world with the default style.
|
| R2Status | r2SoftBodiesSetResweepStrain (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2SoftBodiesSettings::resweepStrain.
|
| R2Real | r2SoftBodiesResweepStrain (const struct R2World *world) |
| | Return the world setting documented by R2SoftBodiesSettings::resweepStrain.
|
| R2Status | r2SoftBodiesSetContactStiffening (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2SoftBodiesSettings::contactStiffening.
|
| R2Real | r2SoftBodiesContactStiffening (const struct R2World *world) |
| | Return the world setting documented by R2SoftBodiesSettings::contactStiffening.
|
| R2Status | r2SoftBodiesSetMaxExtraSubsteps (struct R2World *world, size_t value) |
| | Set the world setting documented by R2SoftBodiesSettings::maxExtraSubsteps.
|
| size_t | r2SoftBodiesMaxExtraSubsteps (const struct R2World *world) |
| | Return the world setting documented by R2SoftBodiesSettings::maxExtraSubsteps.
|
| R2Status | r2RecoverySetAuthoredVelocityMargin (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::authoredVelocityMargin.
|
| R2Status | r2RecoverySetEdgeSpeculation (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::edgeSpeculation.
|
| R2Status | r2RecoverySetInvertedCellDetection (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::invertedCellDetection.
|
| R2Status | r2RecoverySetSelfCrossingDetection (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::selfCrossingDetection.
|
| R2Status | r2RecoverySetDetectionMotionGating (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::detectionMotionGating.
|
| R2Status | r2RecoverySetCrossBodyDetection (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::crossBodyDetection.
|
| R2Status | r2RecoverySetSelfStandDown (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::selfStandDown.
|
| R2Status | r2RecoverySetCrossBodyExpelGate (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::crossBodyExpelGate.
|
| R2Status | r2RecoverySetEdgeStandDown (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::edgeStandDown.
|
| R2Status | r2RecoverySetCrossingRepulsion (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::crossingRepulsion.
|
| R2Status | r2RecoverySetCrossingRepulsionGuide (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::crossingRepulsionGuide.
|
| R2Status | r2RecoverySetCrossingRepulsionSelfGuide (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::crossingRepulsionSelfGuide.
|
| R2Status | r2RecoverySetRecoveryPace (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2SoftRecoverySettings::recoveryPace.
|
| R2Status | r2RecoverySetOverlapConstraints (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::overlapConstraints.
|
| R2Status | r2RecoverySetOverlapRigid (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::overlapRigid.
|
| R2Status | r2RecoverySetOverlapSkipSelfTangled (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::overlapSkipSelfTangled.
|
| R2Status | r2RecoverySetOverlapEdgeStandDown (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::overlapEdgeStandDown.
|
| R2Status | r2RecoverySetOverlapConstraintPace (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2SoftRecoverySettings::overlapConstraintPace.
|
| R2Status | r2RecoverySetOverlapSkinVolume (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::overlapSkinVolume.
|
| R2Status | r2RecoverySetOverlapKeptDepth (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2SoftRecoverySettings::overlapKeptDepth.
|
| R2Status | r2RecoverySetOverlapSelfRegions (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::overlapSelfRegions.
|
| R2Status | r2RecoverySetOverlapNormalPush (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::overlapNormalPush.
|
| R2Status | r2RecoverySetOverlapMultiVolume (struct R2World *world, R2Bool value) |
| | Set the world setting documented by R2SoftRecoverySettings::overlapMultiVolume.
|
| R2Status | r2RecoverySetOverlapProgressMargin (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2SoftRecoverySettings::overlapProgressMargin.
|
| R2Status | r2FemSetLinearTolerance (struct R2World *world, R2Real value) |
| | Set the world setting documented by R2SoftFemParameters::linearTolerance.
|
| R2Status | r2FemSetMaxLinearIterations (struct R2World *world, size_t value) |
| | Set the world setting documented by R2SoftFemParameters::maxLinearIterations.
|
| R2Status | r2FemSetMaxDenseDofs (struct R2World *world, size_t value) |
| | Set the world setting documented by R2SoftFemParameters::maxDenseDofs.
|
| R2Status | r2SetNumThreads (struct R2World *world, size_t num_threads) |
| | Configures a dedicated pool for this world's parallel work.
|
| R2Status | r2ClearThreadPool (struct R2World *world) |
| | Removes the world's dedicated pool.
|
| size_t | r2NumThreads (const struct R2World *world) |
| | Size of the world's dedicated pool, or zero if a parallel build has no dedicated pool configured.
|
| R2Status | r2SetCountersEnabled (struct R2World *world, R2Bool enabled) |
| | Enable or disable the native pipeline profiling counters.
|
| double | r2StepTimeMs (const struct R2World *world) |
| | Native engine time of the most recent step, in milliseconds, as in the Rust testbed.
|
| struct R2World * | r2DeserializeRigidState (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 R2QueryFilter | r2DefaultQueryFilter (void) |
| | Return native default query filter.
|
| struct R2ShapeCastOptions | r2DefaultShapeCastOptions (void) |
| | Return native default shape cast options.
|
| R2Status | r2RemoveSoftBody (struct R2SoftBodyHandle handle) |
| | Remove a soft body and its associated simulation objects.
|
| R2Status | r2SoftBody_WakeUp (struct R2SoftBodyHandle handle) |
| | Wake the soft body and its rigid proxies.
|
| R2Status | r2FreeSoftBodyTearEvent (struct R2SoftBodyTearEvent *event) |
| | Release an owned soft body tear event.
|
| struct R2SoftBodyHandle | r2SoftBodyTearEvent_SoftBody (const struct R2SoftBodyTearEvent *event) |
| | Return the source soft-body handle for this tear event.
|
| size_t | r2SoftBodyTearEvent_Bodies (const struct R2SoftBodyTearEvent *event, struct R2SoftBodyHandle *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 R2ParticleDestination | r2SoftBodyTearEvent_ParticleDestination (const struct R2SoftBodyTearEvent *event, uint32_t particle) |
| | Return the destination body and particle index for an original particle.
|
| size_t | r2SoftBodyTearEvent_TornEdges (const struct R2SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity) |
| | Flat indices; element arity follows the corresponding Rust event field.
|
| size_t | r2SoftBodyTearEvent_TornCells (const struct R2SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity) |
| | Flat indices; element arity follows the corresponding Rust event field.
|
| size_t | r2SoftBodyTearEvent_RemovedEdges (const struct R2SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity) |
| | Flat indices; element arity follows the corresponding Rust event field.
|
| size_t | r2SoftBodyTearEvent_SplitParticles (const struct R2SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity) |
| | Flat indices; element arity follows the corresponding Rust event field.
|
| size_t | r2SoftBodyTearEvent_InsertedParticles (const struct R2SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity) |
| | Flat indices; element arity follows the corresponding Rust event field.
|
| size_t | r2SoftBodyTearEvent_PieceParticles (const struct R2SoftBodyTearEvent *event, size_t piece_index, uint32_t *buffer, size_t capacity) |
| | Copy the particles of the piece_index-th body of r2SoftBodyTearEvent_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 | r2SoftBodyTearEvent_Clusters (const struct R2SoftBodyTearEvent *event, struct R2SoftClusterSplit *buffer, size_t capacity) |
| | Copy cluster-to-piece and rigid-proxy remapping records.
|
| size_t | r2SoftBodyTearEvent_MovedJoints (const struct R2SoftBodyTearEvent *event, struct R2SoftJointMove *buffer, size_t capacity) |
| | Copy impulse-joint remapping records produced by the tear.
|
| struct R2SoftBodyTearEvent * | r2SoftBody_Tear (struct R2SoftBodyHandle 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 | r2SoftBody_AddCluster (struct R2SoftBodyHandle handle, const uint32_t *particles, size_t count) |
| | Create a rigid proxy cluster from the supplied particle indices and return its cluster index.
|
| R2Status | r2SoftBody_RemoveCluster (struct R2SoftBodyHandle handle, uint32_t cluster) |
| | Remove the selected cluster and its rigid proxy.
|
| struct R2OptionalParticleDestination | r2SoftBodyTearEvent_TryParticleDestination (const struct R2SoftBodyTearEvent *event, uint32_t particle) |
| | Optional particle destination after a tear.
|
| struct R2SoftBodyTearEvent * | r2CutSoftBody (struct R2SoftBodyHandle handle, const struct R2Vector *blade) |
| | Cut using DIM points (a segment in 2D, triangle in 3D).
|
| struct R2VolumeMeshParameters | r2NewVolumeMeshParameters (R2Real cell_size) |
| | Return volume-meshing settings for the supplied cell size; this POD value requires no destructor.
|
| struct R2BuildInfo | r2BuildInfo (void) |
| | Return ABI version, dimension, scalar size, and pointer size of the linked library.
|
| const char * | r2Version (void) |
| | Release version of the loaded C bindings, e.g.
|
| const char * | r2BuildProfile (void) |
| | Cargo profile of the loaded physics library: "debug" or "release".
|
| struct R2BuildFeatures | r2BuildFeatures (void) |
| | Return profiling, SIMD width, parallelism, and determinism of the linked library.
|
| R2SharedShape * | r2HeightfieldSharedShape (struct R2RealView heights, size_t rows, size_t columns, struct R2Vector scale) |
| | Create an owned heightfield shape from copied samples.
|
| struct R2Aabb | r2SharedShape_ComputeAabb (const R2SharedShape *shape, struct R2Pose pose) |
| | Compute the shape axis-aligned bounds at the supplied world-space pose.
|
| struct R2MassProperties | r2SharedShape_MassProperties (const R2SharedShape *shape, R2Real density) |
| | Compute local mass properties for the supplied nonnegative density.
|
| R2Bool | r2SharedShape_ContainsPoint (const R2SharedShape *shape, struct R2Pose pose, struct R2Vector point) |
| | Test whether the world-space point lies inside the shape at pose.
|
| size_t | r2ContactPairs (const struct R2World *world, struct R2ContactPair *buffer, size_t capacity) |
| | Copy current narrow-phase contact pairs, including pairs without active solver contacts.
|
| struct R2ContactPair | r2ContactPair (struct R2ColliderHandle collider1, struct R2ColliderHandle collider2) |
| | Return the narrow-phase contact pair for two colliders, or report R2_NOT_FOUND.
|
| size_t | r2IntersectionPairs (const struct R2World *world, struct R2IntersectionPair *buffer, size_t capacity) |
| | Copy current sensor intersection pairs from the narrow phase.
|
| size_t | r2ContactPoints (struct R2ColliderHandle collider1, struct R2ColliderHandle collider2, struct R2ContactPoint *buffer, size_t capacity) |
| | Contact points in collider-local space; normal in world space.
|
| size_t | r2MultibodyJoint_GeneralizedVelocity (struct R2MultibodyJointHandle handle, R2Real *buffer, size_t capacity) |
| | Copy the articulation generalized velocities in native degree-of-freedom order.
|
| R2Status | r2MultibodyJoint_SetGeneralizedVelocity (struct R2MultibodyJointHandle handle, const R2Real *values, size_t count) |
| | Replace articulation generalized velocities; the array length must match its degrees of freedom.
|
| R2Status | r2CheckAbi (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 | r2QuarantinedRigidBodies (const struct R2World *world, struct R2RigidBodyHandle *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 | r2QuarantinedColliders (const struct R2World *world, struct R2ColliderHandle *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 | r2QuarantinedSoftBodies (const struct R2World *world, struct R2SoftBodyHandle *buffer, size_t capacity) |
| | Copy the soft bodies quarantined by the most recent Step because a particle position or velocity became non-finite.
|
| R2Real | r2Sin (R2Real x) |
| | Sine of an angle in radians, computed by Rapier's math backend.
|
| R2Real | r2Cos (R2Real x) |
| | Cosine of an angle in radians, computed by Rapier's math backend.
|
| R2Real | r2Tan (R2Real x) |
| | Tangent of an angle in radians, computed by Rapier's math backend.
|
| R2Real | r2Asin (R2Real x) |
| | Arcsine in radians, computed by Rapier's math backend.
|
| R2Real | r2Acos (R2Real x) |
| | Arccosine in radians, computed by Rapier's math backend.
|
| R2Real | r2Atan2 (R2Real y, R2Real x) |
| | Angle in radians of the point (x, y), in [-pi, pi], computed by Rapier's math backend.
|
| R2Real | r2Exp (R2Real x) |
| | Exponential e^x, computed by Rapier's math backend.
|
| R2Real | r2Ln (R2Real x) |
| | Natural logarithm, computed by Rapier's math backend.
|
| R2Real | r2Powf (R2Real base, R2Real exponent) |
| | base raised to the power exponent, computed by Rapier's math backend.
|
| struct R2ShapeMesh * | r2SharedShape_Tessellate (const R2SharedShape *shape, uint32_t subdivisions) |
| | Return owned local-space rendering geometry; release it with r2FreeShapeMesh.
|
| size_t | r2ShapeMesh_Triangles (const struct R2ShapeMesh *mesh, struct R2Vector *buffer, size_t capacity) |
| | Flat groups of three vertices.
|
| size_t | r2ShapeMesh_Lines (const struct R2ShapeMesh *mesh, struct R2Vector *buffer, size_t capacity) |
| | Flat groups of two vertices.
|
| R2Status | r2FreeShapeMesh (struct R2ShapeMesh *mesh) |
| | Release an owned shape mesh.
|
| struct R2Pose | r2RigidBody_Position (struct R2RigidBodyHandle handle) |
| | Return the rigid body world-space pose.
|
| struct R2Vector | r2RigidBody_Translation (struct R2RigidBodyHandle handle) |
| | Return the rigid body world-space translation.
|
| struct R2Vector | r2RigidBody_Linvel (struct R2RigidBodyHandle handle) |
| | Return the rigid body world-space linear velocity.
|
| R2AngVector | r2RigidBody_Angvel (struct R2RigidBodyHandle handle) |
| | Return the rigid body world-space angular velocity (radians per second).
|
| R2Bool | r2RigidBody_IsSleeping (struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is sleeping.
|
| R2Bool | r2RigidBody_IsEnabled (struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is enabled.
|
| struct R2UserData | r2RigidBody_UserData (struct R2RigidBodyHandle handle) |
| | Return the rigid body application-owned 128-bit user value.
|
| R2Status | r2RigidBody_SetPosition (struct R2RigidBodyHandle handle, struct R2Pose value, R2Bool wake_up) |
| | Set the rigid body world-space pose.
|
| R2Status | r2RigidBody_SetTranslation (struct R2RigidBodyHandle handle, struct R2Vector value, R2Bool wake_up) |
| | Set the rigid body world-space translation.
|
| R2Status | r2RigidBody_SetLinvel (struct R2RigidBodyHandle handle, struct R2Vector value, R2Bool wake_up) |
| | Set the rigid body world-space linear velocity.
|
| R2Status | r2RigidBody_SetAngvel (struct R2RigidBodyHandle handle, R2AngVector value, R2Bool wake_up) |
| | Set the rigid body world-space angular velocity (radians per second).
|
| R2Status | r2RigidBody_SetNextKinematicPosition (struct R2RigidBodyHandle handle, struct R2Pose value) |
| | Set the rigid body next kinematic world-space pose.
|
| R2Status | r2RigidBody_SetNextKinematicTranslation (struct R2RigidBodyHandle handle, struct R2Vector value) |
| | Set the rigid body next kinematic world-space translation.
|
| R2Status | r2RigidBody_SetGravityScale (struct R2RigidBodyHandle handle, R2Real value, R2Bool wake_up) |
| | Set the rigid body gravity multiplier.
|
| R2Status | r2RigidBody_SetLinearDamping (struct R2RigidBodyHandle handle, R2Real value) |
| | Set the rigid body linear damping coefficient.
|
| R2Status | r2RigidBody_SetAngularDamping (struct R2RigidBodyHandle handle, R2Real value) |
| | Set the rigid body angular damping coefficient.
|
| R2Status | r2RigidBody_SetEnabled (struct R2RigidBodyHandle handle, R2Bool value) |
| | Enable or disable the rigid body.
|
| R2Status | r2RigidBody_SetUserData (struct R2RigidBodyHandle handle, struct R2UserData value) |
| | Set the rigid body application-owned 128-bit user value.
|
| R2Status | r2RigidBody_ApplyImpulse (struct R2RigidBodyHandle handle, struct R2Vector value, R2Bool wake_up) |
| | Apply a world-space linear impulse.
|
| R2Status | r2RigidBody_ApplyImpulseAtPoint (struct R2RigidBodyHandle handle, struct R2Vector value, struct R2Vector point, R2Bool wake_up) |
| | Apply a world-space impulse at a world-space point.
|
| R2Status | r2RigidBody_AddForce (struct R2RigidBodyHandle handle, struct R2Vector value, R2Bool wake_up) |
| | Accumulate a world-space force; it persists until reset.
|
| R2Status | r2RigidBody_ResetForces (struct R2RigidBodyHandle handle, R2Bool wake_up) |
| | Clear accumulated user forces.
|
| R2Status | r2RigidBody_Sleep (struct R2RigidBodyHandle handle) |
| | Put the body to sleep.
|
| struct R2Pose | r2Collider_Position (struct R2ColliderHandle handle) |
| | Return the collider world-space pose.
|
| struct R2Vector | r2Collider_Translation (struct R2ColliderHandle handle) |
| | Return the collider world-space translation.
|
| R2Real | r2Collider_Friction (struct R2ColliderHandle handle) |
| | Return the collider friction coefficient.
|
| R2Real | r2Collider_Restitution (struct R2ColliderHandle handle) |
| | Return the collider restitution coefficient.
|
| R2Bool | r2Collider_IsSensor (struct R2ColliderHandle handle) |
| | Return whether the collider is a sensor (detects overlaps without contact forces).
|
| struct R2RigidBodyHandle | r2Collider_Parent (struct R2ColliderHandle handle) |
| | Return the parent body handle, or an invalid handle with OK status for a standalone collider.
|
| R2Status | r2Collider_SetPosition (struct R2ColliderHandle handle, struct R2Pose value) |
| | Set the collider world-space pose.
|
| R2Status | r2Collider_SetTranslation (struct R2ColliderHandle handle, struct R2Vector value) |
| | Set the collider world-space translation.
|
| R2Status | r2Collider_SetFriction (struct R2ColliderHandle handle, R2Real value) |
| | Set the collider friction coefficient.
|
| R2Status | r2Collider_SetRestitution (struct R2ColliderHandle handle, R2Real value) |
| | Set the collider restitution coefficient.
|
| R2Status | r2Collider_SetSensor (struct R2ColliderHandle handle, R2Bool value) |
| | Enable or disable a sensor (detects overlaps without contact forces) for the collider.
|
| R2Status | r2Collider_SetCollisionGroups (struct R2ColliderHandle handle, struct R2InteractionGroups value) |
| | Set the collider collision filtering groups.
|
| R2Status | r2Collider_SetUserData (struct R2ColliderHandle handle, struct R2UserData value) |
| | Set the collider application-owned 128-bit user value.
|
| struct R2Vector | r2SoftBody_ParticlePosition (struct R2SoftBodyHandle handle, size_t index) |
| | Return the world-space position of the indexed particle.
|
| size_t | r2SoftBody_ParticlePositions (struct R2SoftBodyHandle handle, struct R2Vector *buffer, size_t capacity) |
| | Copy world-space particle positions.
|
| struct R2SoftBodyMaterial | r2SoftBody_Material (struct R2SoftBodyHandle handle) |
| | Return a copy of the soft body material parameters.
|
| R2Status | r2SoftBody_SetParticlePosition (struct R2SoftBodyHandle handle, size_t index, struct R2Vector value) |
| | Set the world-space position of the indexed particle.
|
| R2Status | r2SoftBody_SetMaterial (struct R2SoftBodyHandle handle, const struct R2SoftBodyMaterial *data) |
| | Copy material parameters into the soft body.
|
| R2Status | r2SoftBody_AddParticleForce (struct R2SoftBodyHandle handle, size_t index, struct R2Vector value, R2Bool wake_up) |
| | Add a world-space force to the indexed particle.
|
| size_t | r2RigidBodyReadStates (const struct R2World *world, const struct R2RigidBodyHandle *handles, size_t handle_count, struct R2RigidBodyState *states, size_t capacity) |
| | Copies states in the same order as handles, without allocating temporary storage.
|
| struct R2JointDesc | r2ImpulseJoint_Desc (struct R2ImpulseJointHandle handle) |
| | Copies joint configuration without returning a borrowed joint pointer.
|
| R2Status | r2ImpulseJoint_SetDesc (struct R2ImpulseJointHandle handle, const struct R2JointDesc *desc, R2Bool wake_up) |
| | Replaces configuration after validation, resetting cached limit/motor impulses.
|
| uint16_t | r2Collider_ActiveCollisionTypes (struct R2ColliderHandle handle) |
| | Return the collider body-type collision activation bitmask (R2_COLLISION_TYPES_* bits).
|
| uint32_t | r2Collider_ActiveHooks (struct R2ColliderHandle handle) |
| | Return the collider physics-hook activation bitmask.
|
| uint32_t | r2Collider_FrictionCombineRule (struct R2ColliderHandle handle) |
| | Return the collider friction combination rule (R2_COMBINE_*).
|
| uint32_t | r2Collider_RestitutionCombineRule (struct R2ColliderHandle handle) |
| | Return the collider restitution combination rule (R2_COMBINE_*).
|
| struct R2Pose | r2Collider_PositionWrtParent (struct R2ColliderHandle handle) |
| | Return the collider pose relative to its parent rigid body, or its world-space pose if it has no parent.
|
| int8_t | r2RigidBody_DominanceGroup (struct R2RigidBodyHandle handle) |
| | Return the rigid body signed dominance group.
|
| size_t | r2RigidBody_AdditionalSolverIterations (struct R2RigidBodyHandle handle) |
| | Return the rigid body additional solver iterations for connected bodies.
|
| size_t | r2RigidBody_AdditionalPgsIterations (struct R2RigidBodyHandle handle) |
| | Return the rigid body additional PGS iterations for connected bodies.
|
| R2Bool | r2RigidBody_IsFastRotationAllowed (struct R2RigidBodyHandle handle) |
| | Return whether the rigid body may exceed the angular-velocity limit of its CCD.
|
| R2Status | r2Collider_SetRotation (struct R2ColliderHandle handle, struct R2Rotation value) |
| | Set the collider world-space rotation.
|
| R2Status | r2RigidBody_SetAllowFastRotation (struct R2RigidBodyHandle handle, R2Bool value) |
| | Allow or disallow the rigid body to exceed the angular-velocity limit of its CCD (e.g.
|
| R2Status | r2ShapeDesc_SetTrimesh (struct R2ShapeDesc *desc, struct R2VectorView vertices, struct R2TriangleView indices, uint32_t flags) |
| | Replace the shape geometry with a borrowed tri mesh.
|
| R2Status | r2ShapeDesc_SetPolyline (struct R2ShapeDesc *desc, struct R2VectorView vertices, struct R2EdgeView indices, uint32_t flags) |
| | Replace the shape geometry with a borrowed polyline.
|
| R2Status | r2ShapeDesc_SetConvexHull (struct R2ShapeDesc *desc, struct R2VectorView vertices) |
| | Replace the shape geometry with a borrowed convex hull point cloud.
|
| R2Status | r2SoftBodyDesc_SetParticles (struct R2SoftBodyDesc *desc, struct R2VectorView positions) |
| | Select an explicit particle recipe and borrow its positions.
|
| R2Status | r2SoftBodyDesc_SetSurfaceMesh (struct R2SoftBodyDesc *desc, struct R2VectorView vertices, R2SurfaceElementView elements) |
| | Select a surface recipe and borrow its vertices and elements.
|
| R2Status | r2SoftBodyDesc_SetTrimesh (struct R2SoftBodyDesc *desc, struct R2VectorView vertices, struct R2TriangleView triangles) |
| | Select a 2D triangle-mesh recipe and borrow its vertices and triangles (stored in positions and cells).
|
| R2Status | r2SoftBodyDesc_SetAppended (struct R2SoftBodyDesc *desc, struct R2SoftBodyDescView view) |
| | Borrow descriptions to merge into this body (see R2SoftBodyDesc::appended); preserve all other fields.
|
| R2Status | r2SoftBodyDesc_SetAddedEdges (struct R2SoftBodyDesc *desc, struct R2EdgeView view) |
| | Borrow structural edges added after appending (see R2SoftBodyDesc::addedEdges); preserve all other fields.
|
| R2Status | r2SoftBodyDesc_SetSkin (struct R2SoftBodyDesc *desc, struct R2VectorView vertices, R2SurfaceElementView elements) |
| | Borrow skin geometry.
|
| R2Status | r2SoftBodyDesc_SetMasses (struct R2SoftBodyDesc *desc, struct R2RealView view) |
| | Borrow masses; preserve all other fields.
|
| R2Status | r2SoftBodyDesc_SetPinnedParticles (struct R2SoftBodyDesc *desc, struct R2IndexView view) |
| | Borrow pinned particles; preserve all other fields.
|
| R2Status | r2SoftBodyDesc_SetEdges (struct R2SoftBodyDesc *desc, struct R2EdgeView view) |
| | Borrow edges; preserve all other fields.
|
| R2Status | r2SoftBodyDesc_SetBendEdges (struct R2SoftBodyDesc *desc, struct R2EdgeView view) |
| | Borrow bend edges; preserve all other fields.
|
| R2Status | r2SoftBodyDesc_SetCells (struct R2SoftBodyDesc *desc, R2CellView view) |
| | Borrow cells; preserve all other fields.
|
| R2Status | r2SoftBodyDesc_SetSurface (struct R2SoftBodyDesc *desc, R2SurfaceElementView view) |
| | Borrow surface; preserve all other fields.
|
| R2Status | r2SoftBodyDesc_SetTensionOnlyEdges (struct R2SoftBodyDesc *desc, struct R2IndexView view) |
| | Borrow tension only edges; preserve all other fields.
|
| struct R2ColliderDesc | r2RoundCuboidColliderDesc (struct R2Vector half_extents, R2Real border_radius) |
| | Return a rounded box description; half_extents exclude the added border_radius.
|
| struct R2ColliderDesc | r2CapsuleColliderDesc (struct R2Vector a, struct R2Vector b, R2Real radius) |
| | Return a capsule description with segment endpoints a/b and the supplied radius.
|
| struct R2ColliderDesc | r2SegmentColliderDesc (struct R2Vector a, struct R2Vector b) |
| | Return a segment description with endpoints a and b.
|
| struct R2ColliderDesc | r2TriangleColliderDesc (struct R2Vector a, struct R2Vector b, struct R2Vector c) |
| | Return a triangle description with vertices a, b, and c.
|
| struct R2ColliderDesc | r2HalfspaceColliderDesc (struct R2Vector normal) |
| | Return a half-space description bounded by a plane through the origin; normal points outward.
|
| struct R2ColliderDesc | r2CapsuleXColliderDesc (R2Real half_height, R2Real radius) |
| | Return a X-aligned capsule description; half_height is half the segment length, excluding caps.
|
| struct R2ColliderDesc | r2CapsuleYColliderDesc (R2Real half_height, R2Real radius) |
| | Return a Y-aligned capsule description; half_height is half the segment length, excluding caps.
|
| struct R2SoftBodyDesc | r2RopeSoftBodyDesc (struct R2Vector a, struct R2Vector b, size_t particles) |
| | Return a rope recipe with particles evenly spaced from a to b, including both endpoints.
|
| struct R2SoftBodyDesc | r2GridSoftBodyDesc (struct R2Vector center, struct R2Vector half_extents, size_t nx, size_t ny) |
| | Return a solid rectangle recipe on an nx by ny particle grid.
|
| struct R2SoftBodyDesc | r2PolygonSoftBodyDesc (struct R2VectorView points) |
| | Return a closed polygon recipe from at least 3 counter-clockwise points: structural edges along the boundary, bending edges between second neighbors, and area preservation.
|
| struct R2SoftBodyDesc | r2DiskSoftBodyDesc (struct R2Vector center, R2Real radius, size_t particles) |
| | Return a closed regular polygon recipe with the specified boundary particle count and area preservation.
|
| struct R2SoftBodyDesc | r2VolumetricSoftBodyDesc (struct R2VectorView vertices, R2SurfaceElementView surface, struct R2VolumeMeshParameters parameters) |
| | Initializes a borrowed meshing recipe.
|
| struct R2SoftBodyMaterial | r2UniformSoftBodyMaterial (struct R2SpringCoefficients value) |
| | Returns a material with the same softness for each constraint family.
|
| size_t | r2SoftBodyDesc_ParticlePositions (const struct R2SoftBodyDesc *desc, struct R2Vector *buffer, size_t capacity) |
| | Copies generated particle positions into caller-owned storage; no persistent builder.
|
| size_t | r2SoftBodyDesc_CellIndices (const struct R2SoftBodyDesc *desc, uint32_t *buffer, size_t capacity) |
| | Copies generated cell indices into caller-owned storage.
|
| struct R2Vector | r2SoftBody_ParticleVelocity (struct R2SoftBodyHandle handle, size_t index) |
| | Return the world-space velocity of the indexed particle.
|
| uint32_t | r2SoftBody_Solver (struct R2SoftBodyHandle handle) |
| | Return the solver simulating the soft body's elasticity (R2_SOFT_SOLVER_*).
|
| R2Status | r2SoftBody_SetClusterEdgeSoftness (struct R2SoftBodyHandle handle, uint32_t cluster, const struct R2SpringCoefficients *softness) |
| | Override the softness of every structural or bending edge fully contained in a live cluster: regional stiffness for cloth and ropes.
|
| R2Status | r2SoftBody_ApplyImpulseAtPoint (struct R2SoftBodyHandle handle, struct R2Vector impulse, struct R2Vector point, R2Real falloff_radius, R2Bool 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.
|
| R2Status | r2SoftBody_ApplyRadialImpulse (struct R2SoftBodyHandle handle, struct R2Vector center, R2Real magnitude, R2Real falloff_radius, R2Bool 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.
|
| R2Status | r2SoftBody_ResetPlasticity (struct R2SoftBodyHandle handle) |
| | Undo every permanent (plastic) deformation: edge rest lengths, dihedral rest angles, cell rest shapes and particle rest positions return to their creation state.
|
| R2Status | r2SoftBody_TearEdge (struct R2SoftBodyHandle handle, size_t index) |
| | Mark the indexed edge as torn.
|
| R2Status | r2SoftBody_TearCell (struct R2SoftBodyHandle handle, size_t index) |
| | Mark the indexed cell as torn.
|
| struct R2SoftBodyHandle | r2Collider_SoftBody (struct R2ColliderHandle handle) |
| | Return the soft body owning this deformable collider (a soft-body collision mesh), or an invalid handle for any other collider.
|
| struct R2SoftBodyHandle | r2ReadCollider_SoftBody (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the soft body owning this deformable collider, or an invalid handle for any other collider.
|
| size_t | r2SoftBodyTearEvent_PieceCount (const struct R2SoftBodyTearEvent *event) |
| | Return the number of soft bodies the torn body is in after the tear: the length of r2SoftBodyTearEvent_Bodies, and the exclusive bound of the piece_index of r2SoftBodyTearEvent_PieceParticles.
|
| R2Bool | r2RecoveryAuthoredVelocityMargin (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::authoredVelocityMargin.
|
| R2Bool | r2RecoveryEdgeSpeculation (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::edgeSpeculation.
|
| R2Bool | r2RecoveryInvertedCellDetection (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::invertedCellDetection.
|
| R2Bool | r2RecoverySelfCrossingDetection (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::selfCrossingDetection.
|
| R2Bool | r2RecoveryDetectionMotionGating (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::detectionMotionGating.
|
| R2Bool | r2RecoveryCrossBodyDetection (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::crossBodyDetection.
|
| R2Bool | r2RecoverySelfStandDown (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::selfStandDown.
|
| R2Bool | r2RecoveryCrossBodyExpelGate (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::crossBodyExpelGate.
|
| R2Bool | r2RecoveryEdgeStandDown (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::edgeStandDown.
|
| R2Bool | r2RecoveryCrossingRepulsion (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::crossingRepulsion.
|
| R2Bool | r2RecoveryCrossingRepulsionGuide (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::crossingRepulsionGuide.
|
| R2Bool | r2RecoveryCrossingRepulsionSelfGuide (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::crossingRepulsionSelfGuide.
|
| R2Real | r2RecoveryRecoveryPace (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::recoveryPace.
|
| R2Bool | r2RecoveryOverlapConstraints (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::overlapConstraints.
|
| R2Bool | r2RecoveryOverlapRigid (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::overlapRigid.
|
| R2Bool | r2RecoveryOverlapSkipSelfTangled (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::overlapSkipSelfTangled.
|
| R2Bool | r2RecoveryOverlapEdgeStandDown (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::overlapEdgeStandDown.
|
| R2Real | r2RecoveryOverlapConstraintPace (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::overlapConstraintPace.
|
| uint32_t | r2RecoveryOverlapPatchConstraints (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::overlapPatchConstraints.
|
| R2Status | r2RecoverySetOverlapPatchConstraints (struct R2World *world, uint32_t value) |
| | Set the world setting documented by R2SoftRecoverySettings::overlapPatchConstraints.
|
| R2Bool | r2RecoveryOverlapSkinVolume (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::overlapSkinVolume.
|
| R2Real | r2RecoveryOverlapKeptDepth (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::overlapKeptDepth.
|
| R2Bool | r2RecoveryOverlapSelfRegions (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::overlapSelfRegions.
|
| R2Bool | r2RecoveryOverlapNormalPush (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::overlapNormalPush.
|
| R2Bool | r2RecoveryOverlapMultiVolume (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::overlapMultiVolume.
|
| uint32_t | r2RecoveryOverlapSplit (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::overlapSplit.
|
| R2Status | r2RecoverySetOverlapSplit (struct R2World *world, uint32_t value) |
| | Set the world setting documented by R2SoftRecoverySettings::overlapSplit.
|
| uint32_t | r2RecoveryOverlapPatience (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::overlapPatience.
|
| R2Status | r2RecoverySetOverlapPatience (struct R2World *world, uint32_t value) |
| | Set the world setting documented by R2SoftRecoverySettings::overlapPatience.
|
| R2Real | r2RecoveryOverlapProgressMargin (const struct R2World *world) |
| | Return the world setting documented by R2SoftRecoverySettings::overlapProgressMargin.
|
| R2Real | r2FemLinearTolerance (const struct R2World *world) |
| | Return the world setting documented by R2SoftFemParameters::linearTolerance.
|
| size_t | r2FemMaxLinearIterations (const struct R2World *world) |
| | Return the world setting documented by R2SoftFemParameters::maxLinearIterations.
|
| size_t | r2FemMaxDenseDofs (const struct R2World *world) |
| | Return the world setting documented by R2SoftFemParameters::maxDenseDofs.
|
| size_t | r2Collider_ShapeIdentity (struct R2ColliderHandle handle) |
| | Return a process-local geometry identity for caching, not a serializable ID.
|
| size_t | r2SoftBody_NumParticles (struct R2SoftBodyHandle handle) |
| | Return the soft body particle count.
|
| uint32_t | r2SoftBody_TopologyVersion (struct R2SoftBodyHandle handle) |
| | Return a counter that changes when particle connectivity changes; use it to invalidate mesh caches.
|
| R2Real | r2SoftBody_Mass (struct R2SoftBodyHandle handle) |
| | Return the soft body mass.
|
| R2Real | r2SoftBody_Volume (struct R2SoftBodyHandle handle) |
| | Return the soft body current volume.
|
| R2Real | r2SoftBody_RestVolume (struct R2SoftBodyHandle handle) |
| | Return the soft body undeformed volume.
|
| R2Real | r2SoftBody_VolumeFactor (struct R2SoftBodyHandle handle) |
| | Return the soft body target volume multiplier.
|
| struct R2Vector | r2SoftBody_CenterOfMass (struct R2SoftBodyHandle handle) |
| | Return the soft body world-space center of mass.
|
| struct R2RigidBodyHandle | r2SoftBody_RootBody (struct R2SoftBodyHandle handle) |
| | Return the soft body root rigid-proxy handle.
|
| R2Bool | r2SoftBody_IsEnabled (struct R2SoftBodyHandle handle) |
| | Return whether the soft body is enabled.
|
| R2Bool | r2SoftBody_IsSleeping (struct R2SoftBodyHandle handle) |
| | Return whether the soft body is sleeping.
|
| size_t | r2SoftBody_ParticleVelocities (struct R2SoftBodyHandle handle, struct R2Vector *buffer, size_t capacity) |
| | Copy world-space particle velocities.
|
| size_t | r2SoftBody_Edges (struct R2SoftBodyHandle handle, uint32_t *buffer, size_t capacity) |
| | Copy flattened edge vertex indices.
|
| size_t | r2SoftBody_Cells (struct R2SoftBodyHandle handle, uint32_t *buffer, size_t capacity) |
| | Copy flattened cell vertex indices.
|
| size_t | r2SoftBody_Boundary (struct R2SoftBodyHandle handle, uint32_t *buffer, size_t capacity) |
| | Copy flattened boundary element indices.
|
| size_t | r2SoftBody_Pieces (struct R2SoftBodyHandle handle, struct R2SoftBodyHandle *buffer, size_t capacity) |
| | Copy piece identifiers.
|
| R2Status | r2SoftBody_SetParticleVelocity (struct R2SoftBodyHandle handle, size_t index, struct R2Vector value) |
| | Set the soft body particle world-space velocity.
|
| R2Status | r2SoftBody_SetParticleKinematicTarget (struct R2SoftBodyHandle handle, size_t index, struct R2Vector value) |
| | Set the next world-space target position of a pinned particle.
|
| R2Status | r2SoftBody_SetParticlePinned (struct R2SoftBodyHandle handle, size_t index, R2Bool value) |
| | Enable or disable pinning the particle for the soft body.
|
| R2Status | r2SoftBody_ApplyParticleImpulse (struct R2SoftBodyHandle handle, size_t index, struct R2Vector value, R2Bool wake_up) |
| | Apply a world-space impulse to one particle.
|
| R2Status | r2SoftBody_AddForce (struct R2SoftBodyHandle handle, struct R2Vector value, R2Bool wake_up) |
| | Accumulate a world-space force; it persists until reset.
|
| R2Status | r2SoftBody_ApplyImpulse (struct R2SoftBodyHandle handle, struct R2Vector value, R2Bool 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).
|
| R2Status | r2SoftBody_ResetForces (struct R2SoftBodyHandle handle, R2Bool wake_up) |
| | Clear accumulated user forces.
|
| R2Status | r2SoftBody_SetEnabled (struct R2SoftBodyHandle handle, R2Bool value) |
| | Enable or disable the soft body.
|
| R2Status | r2SoftBody_SetVolumeFactor (struct R2SoftBodyHandle handle, R2Real value) |
| | Set the soft body target volume multiplier.
|
| R2Status | r2SoftBody_AttachParticle (struct R2SoftBodyHandle handle, size_t index, struct R2RigidBodyHandle rigid_body) |
| | Attach a particle to a rigid body by a two-way point-to-point constraint (unlike pinning).
|
| R2Bool | r2SoftBody_DetachParticle (struct R2SoftBodyHandle handle, size_t index) |
| | Detach a particle from every rigid body it was attached to with r2SoftBody_AttachParticle.
|
| size_t | r2SoftBody_Clusters (struct R2SoftBodyHandle handle, uint32_t *buffer, size_t capacity) |
| | Copy cluster indices.
|
| struct R2RigidBodyHandle | r2SoftBody_ClusterProxy (struct R2SoftBodyHandle handle, uint32_t cluster) |
| | Return the rigid proxy for the selected cluster.
|
| size_t | r2SoftBody_ClusterParticles (struct R2SoftBodyHandle handle, uint32_t cluster, uint32_t *buffer, size_t capacity) |
| | Copy particle indices for a cluster.
|
| R2Status | r2SoftBody_SetClusterPinned (struct R2SoftBodyHandle handle, uint32_t cluster, R2Bool value) |
| | Enable or disable pinning the cluster for the soft body.
|
| R2Status | r2SoftBody_SetClusterKinematicTarget (struct R2SoftBodyHandle handle, uint32_t cluster, struct R2Pose value) |
| | Set the next world-space target pose of a pinned cluster.
|
| R2Status | r2SoftBody_SetClusterShapeMatchingEnabled (struct R2SoftBodyHandle handle, uint32_t cluster, R2Bool value) |
| | Enable or disable using cluster shape matching for the soft body.
|
| R2Status | r2SoftBody_SetClusterStiffnessScale (struct R2SoftBodyHandle handle, uint32_t cluster, R2Real value) |
| | Scale the material stiffness (Young modulus) of every cell fully contained in a live cluster: regional materials without a separate body.
|
| R2Status | r2SoftBody_SetClusterTearResistance (struct R2SoftBodyHandle handle, uint32_t cluster, R2Real value) |
| | Set the soft body cluster tear-resistance multiplier.
|
| size_t | r2SoftBody_Meshes (struct R2SoftBodyHandle handle, struct R2SoftMeshInfo *buffer, size_t capacity) |
| | Copy collision mesh metadata.
|
| size_t | r2SoftBody_MeshVerticesById (struct R2SoftBodyHandle handle, struct R2SoftMeshId id, struct R2Vector *buffer, size_t capacity) |
| | Copy world-space vertices for a mesh ID.
|
| size_t | r2SoftBody_MeshIndicesById (struct R2SoftBodyHandle handle, struct R2SoftMeshId id, uint32_t *buffer, size_t capacity) |
| | Copy flattened indices for a mesh ID.
|
| size_t | r2SoftBody_MeshColliders (struct R2SoftBodyHandle handle, struct R2ColliderHandle *buffer, size_t capacity) |
| | Copy collision mesh collider handles.
|
| size_t | r2SoftBody_MeshVertices (struct R2SoftBodyHandle handle, struct R2ColliderHandle collider, struct R2Vector *buffer, size_t capacity) |
| | Copy world-space collision mesh vertices.
|
| size_t | r2SoftBody_MeshIndices (struct R2SoftBodyHandle handle, struct R2ColliderHandle collider, uint32_t *buffer, size_t capacity) |
| | Copy flattened collision mesh indices.
|
| size_t | r2SoftBody_MeshArity (struct R2SoftBodyHandle handle, struct R2ColliderHandle collider) |
| | Return indices per collision-mesh element (2 for segments, 3 for triangles).
|
| uint32_t | r2SoftBody_MeshTopologyVersion (struct R2SoftBodyHandle handle, struct R2ColliderHandle collider) |
| | Return the selected collision mesh topology revision for cache invalidation.
|
| R2Status | r2SoftBody_SetSolver (struct R2SoftBodyHandle handle, uint32_t solver) |
| | Set the soft body soft solver kind (R2_SOFT_SOLVER_*).
|
| R2Status | r2SoftBody_SetClusterShapeMatchingTarget (struct R2SoftBodyHandle handle, uint32_t cluster, const struct R2Pose *target) |
| | Set the soft body cluster shape-matching target pose.
|
| R2Status | r2SoftBody_SetEdgeTearResistance (struct R2SoftBodyHandle handle, size_t index, R2Real resistance) |
| | Set the soft body edge tear-resistance multiplier.
|
| R2Bool | r2SoftBody_MeshIsClosed (struct R2SoftBodyHandle handle, struct R2ColliderHandle collider) |
| | Return whether the selected collision mesh is closed.
|
| R2Status | r2RigidBody_SetAdditionalMassProperties (struct R2RigidBodyHandle handle, struct R2MassProperties properties, R2Bool wake_up) |
| | Set the rigid body local mass properties added to collider contributions.
|
| R2Status | r2RigidBody_RecomputeMassPropertiesFromColliders (struct R2RigidBodyHandle handle) |
| | Recompute body mass and inertia from attached colliders and additional mass properties.
|
| R2Status | r2Collider_SetMassProperties (struct R2ColliderHandle handle, struct R2MassProperties properties) |
| | Set the collider local mass properties.
|
| struct R2MassProperties | r2Collider_MassProperties (struct R2ColliderHandle handle) |
| | Return the collider local mass properties.
|
| R2Status | r2RigidBody_SetLockedAxes (struct R2RigidBodyHandle handle, uint8_t axes, R2Bool wake_up) |
| | Set the rigid body translation/rotation lock bitmask.
|
| uint8_t | r2RigidBody_LockedAxes (struct R2RigidBodyHandle handle) |
| | Return the rigid body translation/rotation lock bitmask.
|
| R2Bool | r2Collider_IsVoxels (struct R2ColliderHandle handle) |
| | Return whether the collider is a voxel shape.
|
| struct R2VoxelQuery | r2Collider_VoxelAtFlatId (struct R2ColliderHandle handle, uint32_t id) |
| | Return voxel information at a flat index; found = 0 if absent.
|
| R2Status | r2Collider_SetVoxel (struct R2ColliderHandle handle, struct R2VoxelKey key, R2Bool filled) |
| | Fill or clear the voxel at key; the collider must have a voxel shape.
|
| struct R2Pose | r2RigidBody_NextPosition (struct R2RigidBodyHandle handle) |
| | Return the rigid body next kinematic world-space pose.
|
| struct R2Rotation | r2RigidBody_Rotation (struct R2RigidBodyHandle handle) |
| | Return the rigid body world-space rotation.
|
| struct R2Vector | r2RigidBody_CenterOfMass (struct R2RigidBodyHandle handle) |
| | Return the rigid body world-space center of mass.
|
| struct R2Vector | r2RigidBody_LocalCenterOfMass (struct R2RigidBodyHandle handle) |
| | Return the rigid body body-local center of mass.
|
| struct R2Vector | r2RigidBody_UserForce (struct R2RigidBodyHandle handle) |
| | Return the rigid body accumulated user-applied world-space force.
|
| R2AngVector | r2RigidBody_UserTorque (struct R2RigidBodyHandle handle) |
| | Return the rigid body accumulated user-applied world-space torque.
|
| uint32_t | r2RigidBody_BodyType (struct R2RigidBodyHandle handle) |
| | Return the rigid body body type (R2_DYNAMIC, R2_FIXED, or a kinematic kind).
|
| R2Real | r2RigidBody_Mass (struct R2RigidBodyHandle handle) |
| | Return the rigid body mass.
|
| R2Real | r2RigidBody_GravityScale (struct R2RigidBodyHandle handle) |
| | Return the rigid body gravity multiplier.
|
| R2Real | r2RigidBody_LinearDamping (struct R2RigidBodyHandle handle) |
| | Return the rigid body linear damping coefficient.
|
| R2Real | r2RigidBody_AngularDamping (struct R2RigidBodyHandle handle) |
| | Return the rigid body angular damping coefficient.
|
| R2Real | r2RigidBody_KineticEnergy (struct R2RigidBodyHandle handle) |
| | Return the rigid body kinetic energy.
|
| R2Real | r2RigidBody_SoftCcdPrediction (struct R2RigidBodyHandle handle) |
| | Return the rigid body soft-CCD prediction distance.
|
| R2Bool | r2RigidBody_IsCcdEnabled (struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is using continuous collision detection.
|
| R2Bool | r2RigidBody_IsDynamic (struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is dynamic.
|
| struct R2SoftBodyHandle | r2RigidBody_SoftBody (struct R2RigidBodyHandle handle) |
| | Return the associated soft-body handle, or an invalid handle if this is not a soft proxy.
|
| R2Bool | r2RigidBody_IsSoftFrame (struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is a soft-body proxy.
|
| R2Bool | r2RigidBody_IsFixed (struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is fixed.
|
| R2Bool | r2RigidBody_IsKinematic (struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is kinematic.
|
| R2Bool | r2RigidBody_IsMoving (struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is moving.
|
| R2Bool | r2RigidBody_IsCcdActive (struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is currently using CCD for its motion.
|
| R2Status | r2RigidBody_SetRotation (struct R2RigidBodyHandle handle, struct R2Rotation value, R2Bool wake_up) |
| | Set the rigid body world-space rotation.
|
| R2Status | r2RigidBody_SetBodyType (struct R2RigidBodyHandle handle, uint32_t value, R2Bool wake_up) |
| | Set the rigid body body type (R2_DYNAMIC, R2_FIXED, or a kinematic kind).
|
| R2Status | r2RigidBody_SetNextKinematicRotation (struct R2RigidBodyHandle handle, struct R2Rotation value) |
| | Set the rigid body next kinematic world-space rotation.
|
| R2Status | r2RigidBody_SetAdditionalMass (struct R2RigidBodyHandle handle, R2Real value, R2Bool wake_up) |
| | Set the rigid body mass added to collider contributions.
|
| R2Status | r2RigidBody_SetSoftCcdPrediction (struct R2RigidBodyHandle handle, R2Real value) |
| | Set the rigid body soft-CCD prediction distance.
|
| R2Status | r2RigidBody_SetCcdEnabled (struct R2RigidBodyHandle handle, R2Bool value) |
| | Enable or disable using continuous collision detection for the rigid body.
|
| R2Status | r2RigidBody_SetTranslationsLocked (struct R2RigidBodyHandle handle, R2Bool value, R2Bool wake_up) |
| | Enable or disable locking translation for the rigid body.
|
| R2Status | r2RigidBody_SetRotationsLocked (struct R2RigidBodyHandle handle, R2Bool value, R2Bool wake_up) |
| | Enable or disable locking rotation for the rigid body.
|
| R2Status | r2RigidBody_SetDominanceGroup (struct R2RigidBodyHandle handle, int8_t value) |
| | Set the rigid body signed dominance group.
|
| R2Status | r2RigidBody_SetAdditionalSolverIterations (struct R2RigidBodyHandle handle, size_t value) |
| | Set the rigid body additional solver iterations for connected bodies.
|
| R2Status | r2RigidBody_SetAdditionalPgsIterations (struct R2RigidBodyHandle handle, size_t value) |
| | Set the rigid body additional PGS iterations.
|
| R2Status | r2RigidBody_AddTorque (struct R2RigidBodyHandle handle, R2AngVector value, R2Bool wake_up) |
| | Accumulate a world-space torque; it persists until reset.
|
| R2Status | r2RigidBody_ApplyTorqueImpulse (struct R2RigidBodyHandle handle, R2AngVector value, R2Bool wake_up) |
| | Apply a world-space angular impulse.
|
| R2Status | r2RigidBody_AddForceAtPoint (struct R2RigidBodyHandle handle, struct R2Vector value, struct R2Vector point, R2Bool wake_up) |
| | Accumulate a world-space force applied at a world-space point.
|
| R2Status | r2RigidBody_ResetTorques (struct R2RigidBodyHandle handle, R2Bool wake_up) |
| | Clear accumulated user torques.
|
| struct R2Vector | r2RigidBody_VelocityAtPoint (struct R2RigidBodyHandle handle, struct R2Vector point) |
| | Return world-space velocity at a world-space point, including angular motion.
|
| size_t | r2RigidBody_Colliders (struct R2RigidBodyHandle handle, struct R2ColliderHandle *buffer, size_t capacity) |
| | Copy attached collider handles.
|
| R2Status | r2Collider_SetDensity (struct R2ColliderHandle handle, R2Real value) |
| | Set the collider mass per unit volume.
|
| R2Status | r2Collider_SetMass (struct R2ColliderHandle handle, R2Real value) |
| | Set the collider mass.
|
| R2Status | r2Collider_SetEnabled (struct R2ColliderHandle handle, R2Bool value) |
| | Enable or disable the collider.
|
| R2Status | r2Collider_SetSolverGroups (struct R2ColliderHandle handle, struct R2InteractionGroups value) |
| | Set the collider contact-force filtering groups.
|
| R2Status | r2Collider_SetFrictionCombineRule (struct R2ColliderHandle handle, uint32_t value) |
| | Set the collider friction combination rule (R2_COMBINE_*).
|
| R2Status | r2Collider_SetRestitutionCombineRule (struct R2ColliderHandle handle, uint32_t value) |
| | Set the collider restitution combination rule (R2_COMBINE_*).
|
| R2Status | r2Collider_SetContactSkin (struct R2ColliderHandle handle, R2Real value) |
| | Set the collider extra separation skin around the shape.
|
| R2Status | r2Collider_SetContactForceEventThreshold (struct R2ColliderHandle handle, R2Real value) |
| | Set the collider force threshold for contact-force events.
|
| R2Status | r2Collider_SetActiveEvents (struct R2ColliderHandle handle, uint32_t value) |
| | Set the collider event-generation bitmask (R2_COLLISION_EVENTS and R2_CONTACT_FORCE_EVENTS).
|
| R2Status | r2Collider_SetActiveHooks (struct R2ColliderHandle handle, uint32_t value) |
| | Set the collider physics-hook activation bitmask.
|
| R2Status | r2Collider_SetActiveCollisionTypes (struct R2ColliderHandle handle, uint16_t value) |
| | Set the collider body-type collision activation bitmask.
|
| struct R2Rotation | r2Collider_Rotation (struct R2ColliderHandle handle) |
| | Return the collider world-space rotation.
|
| struct R2InteractionGroups | r2Collider_CollisionGroups (struct R2ColliderHandle handle) |
| | Return the collider collision filtering groups.
|
| struct R2InteractionGroups | r2Collider_SolverGroups (struct R2ColliderHandle handle) |
| | Return the collider contact-force filtering groups.
|
| struct R2UserData | r2Collider_UserData (struct R2ColliderHandle handle) |
| | Return the collider application-owned 128-bit user value.
|
| uint32_t | r2Collider_ActiveEvents (struct R2ColliderHandle handle) |
| | Return the collider event-generation bitmask (R2_COLLISION_EVENTS and R2_CONTACT_FORCE_EVENTS).
|
| R2Real | r2Collider_Mass (struct R2ColliderHandle handle) |
| | Return the collider mass.
|
| R2Real | r2Collider_Density (struct R2ColliderHandle handle) |
| | Return the collider mass per unit volume.
|
| R2Real | r2Collider_Volume (struct R2ColliderHandle handle) |
| | Return the collider current volume.
|
| R2Real | r2Collider_ContactSkin (struct R2ColliderHandle handle) |
| | Return the collider extra separation skin around the shape.
|
| R2Real | r2Collider_ContactForceEventThreshold (struct R2ColliderHandle handle) |
| | Return the collider force threshold for contact-force events.
|
| R2Bool | r2Collider_IsEnabled (struct R2ColliderHandle handle) |
| | Return whether the collider is enabled.
|
| struct R2Aabb | r2Collider_ComputeAabb (struct R2ColliderHandle handle) |
| | Return the current world-space axis-aligned bounds.
|
| R2SharedShape * | r2Collider_CloneShape (struct R2ColliderHandle handle) |
| | Return an owned wrapper sharing the collider geometry.
|
| R2Status | r2Collider_SetShape (struct R2ColliderHandle handle, const R2SharedShape *shape) |
| | Replace collider geometry by sharing shape; the supplied wrapper is not consumed.
|
| R2Status | r2Collider_SetPositionWrtParent (struct R2ColliderHandle handle, struct R2Pose value) |
| | Set the collider pose relative to the parent rigid body.
|
| R2Status | r2RigidBody_ValidateHandle (struct R2RigidBodyHandle handle) |
| | Validate the index and generation in the live owning world.
|
| R2Status | r2Collider_ValidateHandle (struct R2ColliderHandle handle) |
| | Validate the index and generation in the live owning world.
|
| R2Status | r2SoftBody_ValidateHandle (struct R2SoftBodyHandle handle) |
| | Validate the index and generation in the live owning world.
|
| R2Status | r2JointDesc_SetLocalFrame1 (struct R2JointDesc *desc, struct R2Pose value) |
| | Set the joint desc joint frame relative to body 1.
|
| R2Status | r2ImpulseJoint_SetLocalFrame1 (struct R2ImpulseJointHandle handle, struct R2Pose value, R2Bool wake_up) |
| | Set the impulse joint joint frame relative to body 1.
|
| R2Status | r2JointDesc_SetLocalFrame2 (struct R2JointDesc *desc, struct R2Pose value) |
| | Set the joint desc joint frame relative to body 2.
|
| R2Status | r2ImpulseJoint_SetLocalFrame2 (struct R2ImpulseJointHandle handle, struct R2Pose value, R2Bool wake_up) |
| | Set the impulse joint joint frame relative to body 2.
|
| R2Status | r2JointDesc_SetLocalAnchor1 (struct R2JointDesc *desc, struct R2Vector value) |
| | Set the joint desc joint anchor relative to body 1.
|
| R2Status | r2ImpulseJoint_SetLocalAnchor1 (struct R2ImpulseJointHandle handle, struct R2Vector value, R2Bool wake_up) |
| | Set the impulse joint joint anchor relative to body 1.
|
| R2Status | r2JointDesc_SetLocalAnchor2 (struct R2JointDesc *desc, struct R2Vector value) |
| | Set the joint desc joint anchor relative to body 2.
|
| R2Status | r2ImpulseJoint_SetLocalAnchor2 (struct R2ImpulseJointHandle handle, struct R2Vector value, R2Bool wake_up) |
| | Set the impulse joint joint anchor relative to body 2.
|
| R2Status | r2JointDesc_SetContactsEnabled (struct R2JointDesc *desc, R2Bool value) |
| | Enable or disable allowing contacts between connected bodies for the joint desc.
|
| R2Status | r2ImpulseJoint_SetContactsEnabled (struct R2ImpulseJointHandle handle, R2Bool value, R2Bool wake_up) |
| | Enable or disable allowing contacts between connected bodies for the impulse joint.
|
| R2Status | r2JointDesc_SetEnabled (struct R2JointDesc *desc, R2Bool value) |
| | Enable or disable the joint desc.
|
| R2Status | r2ImpulseJoint_SetEnabled (struct R2ImpulseJointHandle handle, R2Bool value, R2Bool wake_up) |
| | Enable or disable the impulse joint.
|
| R2Status | r2JointDesc_SetSoftness (struct R2JointDesc *desc, struct R2SpringCoefficients value) |
| | Set the joint desc joint spring coefficients.
|
| R2Status | r2ImpulseJoint_SetSoftness (struct R2ImpulseJointHandle handle, struct R2SpringCoefficients value, R2Bool wake_up) |
| | Set the impulse joint joint spring coefficients.
|
| R2Status | r2JointDesc_SetLockedAxes (struct R2JointDesc *desc, uint8_t value) |
| | Set the joint desc translation/rotation lock bitmask.
|
| R2Status | r2ImpulseJoint_SetLockedAxes (struct R2ImpulseJointHandle handle, uint8_t value, R2Bool wake_up) |
| | Set the impulse joint translation/rotation lock bitmask.
|
| R2Status | r2JointDesc_SetLimitAxes (struct R2JointDesc *desc, uint8_t value) |
| | Set the joint desc joint axis mask with limits enabled.
|
| R2Status | r2ImpulseJoint_SetLimitAxes (struct R2ImpulseJointHandle handle, uint8_t value, R2Bool wake_up) |
| | Set the impulse joint joint axis mask with limits enabled.
|
| R2Status | r2JointDesc_SetMotorAxes (struct R2JointDesc *desc, uint8_t value) |
| | Set the joint desc joint axis mask with motors enabled.
|
| R2Status | r2ImpulseJoint_SetMotorAxes (struct R2ImpulseJointHandle handle, uint8_t value, R2Bool wake_up) |
| | Set the impulse joint joint axis mask with motors enabled.
|
| R2Status | r2JointDesc_SetCoupledAxes (struct R2JointDesc *desc, uint8_t value) |
| | Set the joint desc coupled joint axis mask.
|
| R2Status | r2ImpulseJoint_SetCoupledAxes (struct R2ImpulseJointHandle handle, uint8_t value, R2Bool wake_up) |
| | Set the impulse joint coupled joint axis mask.
|
| R2Status | r2JointDesc_SetLocalAxis1 (struct R2JointDesc *desc, struct R2Vector value) |
| | Set the joint desc joint principal axis in body 1 local coordinates.
|
| R2Status | r2ImpulseJoint_SetLocalAxis1 (struct R2ImpulseJointHandle handle, struct R2Vector value, R2Bool wake_up) |
| | Set the impulse joint joint principal axis in body 1 local coordinates.
|
| R2Status | r2JointDesc_SetLocalAxis2 (struct R2JointDesc *desc, struct R2Vector value) |
| | Set the joint desc joint principal axis in body 2 local coordinates.
|
| R2Status | r2ImpulseJoint_SetLocalAxis2 (struct R2ImpulseJointHandle handle, struct R2Vector value, R2Bool wake_up) |
| | Set the impulse joint joint principal axis in body 2 local coordinates.
|
| R2Status | r2JointDesc_SetLimits (struct R2JointDesc *desc, uint32_t joint_axis, R2Real min, R2Real max) |
| | Set the joint desc minimum and maximum limits on an axis (linear distance or angular radians).
|
| R2Status | r2ImpulseJoint_SetLimits (struct R2ImpulseJointHandle handle, uint32_t joint_axis, R2Real min, R2Real max, R2Bool wake_up) |
| | Set the impulse joint minimum and maximum limits on an axis (linear distance or angular radians).
|
| R2Status | r2JointDesc_SetMotor (struct R2JointDesc *desc, uint32_t joint_axis, R2Real target_position, R2Real target_velocity, R2Real stiffness, R2Real damping) |
| | Set the joint desc motor position/velocity targets and spring coefficients on an axis.
|
| R2Status | r2ImpulseJoint_SetMotor (struct R2ImpulseJointHandle handle, uint32_t joint_axis, R2Real target_position, R2Real target_velocity, R2Real stiffness, R2Real damping, R2Bool wake_up) |
| | Set the impulse joint motor position/velocity targets and spring coefficients on an axis.
|
| R2Status | r2JointDesc_SetMotorMaxForce (struct R2JointDesc *desc, uint32_t joint_axis, R2Real max_force) |
| | Set the joint desc maximum motor force or torque on an axis.
|
| R2Status | r2ImpulseJoint_SetMotorMaxForce (struct R2ImpulseJointHandle handle, uint32_t joint_axis, R2Real max_force, R2Bool wake_up) |
| | Set the impulse joint maximum motor force or torque on an axis.
|
| R2Status | r2JointDesc_SetMotorModel (struct R2JointDesc *desc, uint32_t joint_axis, uint32_t model) |
| | Set the joint desc motor model on an axis (0 = acceleration-based, 1 = force-based).
|
| R2Status | r2ImpulseJoint_SetMotorModel (struct R2ImpulseJointHandle handle, uint32_t joint_axis, uint32_t model, R2Bool wake_up) |
| | Set the impulse joint motor model on an axis (0 = acceleration-based, 1 = force-based).
|
| R2Status | r2JointDesc_SetUserData (struct R2JointDesc *desc, struct R2UserData value) |
| | Set the joint desc application-owned 128-bit user value.
|
| R2Status | r2ImpulseJoint_SetUserData (struct R2ImpulseJointHandle handle, struct R2UserData value, R2Bool wake_up) |
| | Set the impulse joint application-owned 128-bit user value.
|
| R2Status | r2JointDesc_SetMotorPosition (struct R2JointDesc *desc, uint32_t joint_axis, R2Real target_position, R2Real stiffness, R2Real damping) |
| | Set the joint desc motor position target and spring coefficients on an axis.
|
| R2Status | r2ImpulseJoint_SetMotorPosition (struct R2ImpulseJointHandle handle, uint32_t joint_axis, R2Real target_position, R2Real stiffness, R2Real damping, R2Bool wake_up) |
| | Set the impulse joint motor position target and spring coefficients on an axis.
|
| R2Status | r2JointDesc_SetMotorVelocity (struct R2JointDesc *desc, uint32_t joint_axis, R2Real target_velocity, R2Real factor) |
| | Set the joint desc motor velocity target and damping factor on an axis.
|
| R2Status | r2ImpulseJoint_SetMotorVelocity (struct R2ImpulseJointHandle handle, uint32_t joint_axis, R2Real target_velocity, R2Real factor, R2Bool wake_up) |
| | Set the impulse joint motor velocity target and damping factor on an axis.
|
| struct R2JointImpulses | r2ImpulseJoint_Impulses (struct R2ImpulseJointHandle handle) |
| | Return the impulses applied by the impulse joint during the last step.
|
| struct R2UserData | r2ImpulseJoint_UserData (struct R2ImpulseJointHandle handle) |
| | Return the impulse joint application-owned 128-bit user value.
|
| size_t | r2ImpulseJointCount (const struct R2World *world) |
| | Return the number of impulse joints in the world.
|
| size_t | r2MultibodyJointCount (const struct R2World *world) |
| | Return the number of multibody joints in the world, which is the number of handles copied by r2MultibodyJointHandles.
|
| struct R2JointDesc | r2MultibodyJoint_Desc (struct R2MultibodyJointHandle handle) |
| | Copies the multibody joint configuration without returning a borrowed joint pointer.
|
| R2Status | r2MultibodyJoint_SetDesc (struct R2MultibodyJointHandle handle, const struct R2JointDesc *desc, R2Bool wake_up) |
| | Replaces the multibody joint configuration after validation.
|
| struct R2JointBodies | r2MultibodyJoint_Bodies (struct R2MultibodyJointHandle handle) |
| | Return the two bodies connected by a multibody joint: its parent link, then its own link.
|
| R2SharedShape * | r2ConvexDecompositionSharedShape (struct R2VectorView vertices, R2SurfaceElementView indices) |
| | Create an owned compound shape by convex decomposition of the input surface.
|
| R2SharedShape * | r2VoxelsSharedShapeFromPoints (struct R2Vector voxel_size, struct R2VectorView points) |
| | Create an owned voxel shape by quantizing points with the supplied per-axis voxel size.
|
| R2SharedShape * | r2VoxelizedMeshSharedShape (struct R2VectorView vertices, R2SurfaceElementView indices, R2Real voxel_size) |
| | Create an owned voxel shape from a surface mesh with the supplied uniform voxel size.
|
| R2SharedShape * | r2ConvexHullSharedShape (struct R2VectorView vertices) |
| | Create an owned convex hull of the supplied vertices.
|
| R2SharedShape * | r2TrimeshSharedShape (struct R2VectorView vertices, struct R2TriangleView indices) |
| | Create an owned triangle mesh from vertices and triangle indices.
|
| R2SharedShape * | r2PolylineSharedShape (struct R2VectorView vertices, struct R2EdgeView indices) |
| | Create an owned polyline from vertices and edge indices.
|
| R2SharedShape * | r2OrientedPolylineSharedShape (struct R2VectorView vertices, struct R2EdgeView indices) |
| | Create an owned oriented 2D polyline from vertices and edge indices.
|
| R2SharedShape * | r2ConvexPolylineSharedShape (struct R2VectorView vertices) |
| | Create an owned convex polygon from vertices already ordered along its boundary.
|
| R2SharedShape * | r2RoundConvexHullSharedShape (struct R2VectorView vertices, R2Real border_radius) |
| | Create an owned round convex hull shape.
|
| R2SharedShape * | r2TrimeshSharedShapeWithFlags (struct R2VectorView vertices, struct R2TriangleView indices, uint32_t flags) |
| | Create an owned triangle mesh with the supplied TRIMESH_* processing flags.
|
| struct R2World * | r2NewWorld (void) |
| | Create an owned world.
|
| R2Status | r2FreeWorld (struct R2World *world) |
| | Free a world.
|
| struct R2VelocityCorrection | r2ReadPidController_RigidBodyCorrection (const struct R2ReadContext *context, struct R2PidController *controller, R2Real dt, struct R2RigidBodyHandle body, struct R2Pose target_pose, struct R2Vector target_linvel, R2AngVector target_angvel) |
| | Compute a velocity correction from callback-visible body state, updating the PID controller history.
|
| struct R2VelocityCorrection | r2ReadPdController_RigidBodyCorrection (const struct R2ReadContext *context, const struct R2PdController *controller, struct R2RigidBodyHandle body, struct R2Pose target_pose, struct R2Vector target_linvel, R2AngVector target_angvel) |
| | Compute a PD velocity correction from callback-visible body state.
|
| size_t | r2ReadRigidBodyCount (const struct R2ReadContext *context) |
| | Return the number of rigid body objects in the world.
|
| size_t | r2ReadRigidBodyHandles (const struct R2ReadContext *context, struct R2RigidBodyHandle *buffer, size_t capacity) |
| | Copy entity handles.
|
| R2Bool | r2ReadRigidBody_Contains (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Test whether the live world contains this rigid body handle.
|
| size_t | r2ReadColliderCount (const struct R2ReadContext *context) |
| | Return the number of collider objects in the world.
|
| size_t | r2ReadColliderHandles (const struct R2ReadContext *context, struct R2ColliderHandle *buffer, size_t capacity) |
| | Copy entity handles.
|
| R2Bool | r2ReadCollider_Contains (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Test whether the live world contains this collider handle.
|
| size_t | r2ReadCollider_ShapeIdentity (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return a process-local geometry identity for caching, not a serializable ID.
|
| struct R2MassProperties | r2ReadCollider_MassProperties (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider local mass properties.
|
| uint8_t | r2ReadRigidBody_LockedAxes (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body translation/rotation lock bitmask.
|
| R2Bool | r2ReadCollider_IsVoxels (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return whether the collider is a voxel shape.
|
| struct R2VoxelQuery | r2ReadCollider_VoxelAtFlatId (const struct R2ReadContext *context, struct R2ColliderHandle handle, uint32_t id) |
| | Return voxel information at a flat index; found = 0 if absent.
|
| struct R2Pose | r2ReadRigidBody_NextPosition (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body next kinematic world-space pose.
|
| struct R2Rotation | r2ReadRigidBody_Rotation (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body world-space rotation.
|
| struct R2Vector | r2ReadRigidBody_CenterOfMass (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body world-space center of mass.
|
| struct R2Vector | r2ReadRigidBody_LocalCenterOfMass (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body body-local center of mass.
|
| struct R2Vector | r2ReadRigidBody_UserForce (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body accumulated user-applied world-space force.
|
| R2AngVector | r2ReadRigidBody_UserTorque (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body accumulated user-applied world-space torque.
|
| uint32_t | r2ReadRigidBody_BodyType (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body body type (R2_DYNAMIC, R2_FIXED, or a kinematic kind).
|
| R2Real | r2ReadRigidBody_Mass (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body mass.
|
| R2Real | r2ReadRigidBody_GravityScale (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body gravity multiplier.
|
| R2Real | r2ReadRigidBody_LinearDamping (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body linear damping coefficient.
|
| R2Real | r2ReadRigidBody_AngularDamping (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body angular damping coefficient.
|
| R2Real | r2ReadRigidBody_KineticEnergy (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body kinetic energy.
|
| R2Real | r2ReadRigidBody_SoftCcdPrediction (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body soft-CCD prediction distance.
|
| R2Bool | r2ReadRigidBody_IsCcdEnabled (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is using continuous collision detection.
|
| R2Bool | r2ReadRigidBody_IsDynamic (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is dynamic.
|
| struct R2SoftBodyHandle | r2ReadRigidBody_SoftBody (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the associated soft-body handle, or an invalid handle if this is not a soft proxy.
|
| R2Bool | r2ReadRigidBody_IsSoftFrame (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is a soft-body proxy.
|
| R2Bool | r2ReadRigidBody_IsFixed (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is fixed.
|
| R2Bool | r2ReadRigidBody_IsKinematic (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is kinematic.
|
| R2Bool | r2ReadRigidBody_IsMoving (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is moving.
|
| R2Bool | r2ReadRigidBody_IsCcdActive (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is currently using CCD for its motion.
|
| struct R2Vector | r2ReadRigidBody_VelocityAtPoint (const struct R2ReadContext *context, struct R2RigidBodyHandle handle, struct R2Vector point) |
| | Return world-space velocity at a world-space point, including angular motion.
|
| size_t | r2ReadRigidBody_Colliders (const struct R2ReadContext *context, struct R2RigidBodyHandle handle, struct R2ColliderHandle *buffer, size_t capacity) |
| | Copy attached collider handles.
|
| struct R2Rotation | r2ReadCollider_Rotation (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider world-space rotation.
|
| struct R2InteractionGroups | r2ReadCollider_CollisionGroups (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider collision filtering groups.
|
| struct R2InteractionGroups | r2ReadCollider_SolverGroups (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider contact-force filtering groups.
|
| struct R2UserData | r2ReadCollider_UserData (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider application-owned 128-bit user value.
|
| uint32_t | r2ReadCollider_ActiveEvents (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider event-generation bitmask (R2_COLLISION_EVENTS and R2_CONTACT_FORCE_EVENTS).
|
| R2Real | r2ReadCollider_Mass (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider mass.
|
| R2Real | r2ReadCollider_Density (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider mass per unit volume.
|
| R2Real | r2ReadCollider_Volume (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider current volume.
|
| R2Real | r2ReadCollider_ContactSkin (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider extra separation skin around the shape.
|
| R2Real | r2ReadCollider_ContactForceEventThreshold (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider force threshold for contact-force events.
|
| R2Bool | r2ReadCollider_IsEnabled (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return whether the collider is enabled.
|
| struct R2Aabb | r2ReadCollider_ComputeAabb (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the current world-space axis-aligned bounds.
|
| R2SharedShape * | r2ReadCollider_CloneShape (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return an owned wrapper sharing the collider geometry.
|
| R2Status | r2ReadRigidBody_ValidateHandle (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Validate the index and generation in the live owning world.
|
| R2Status | r2ReadCollider_ValidateHandle (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Validate the index and generation in the live owning world.
|
| struct R2Pose | r2ReadRigidBody_Position (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body world-space pose.
|
| struct R2Vector | r2ReadRigidBody_Translation (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body world-space translation.
|
| struct R2Vector | r2ReadRigidBody_Linvel (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body world-space linear velocity.
|
| R2AngVector | r2ReadRigidBody_Angvel (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body world-space angular velocity (radians per second).
|
| R2Bool | r2ReadRigidBody_IsSleeping (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is sleeping.
|
| R2Bool | r2ReadRigidBody_IsEnabled (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return whether the rigid body is enabled.
|
| struct R2UserData | r2ReadRigidBody_UserData (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body application-owned 128-bit user value.
|
| struct R2Pose | r2ReadCollider_Position (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider world-space pose.
|
| struct R2Vector | r2ReadCollider_Translation (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider world-space translation.
|
| R2Real | r2ReadCollider_Friction (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider friction coefficient.
|
| R2Real | r2ReadCollider_Restitution (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider restitution coefficient.
|
| R2Bool | r2ReadCollider_IsSensor (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return whether the collider is a sensor (detects overlaps without contact forces).
|
| struct R2RigidBodyHandle | r2ReadCollider_Parent (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Read the parent body handle during a callback; a standalone collider returns an invalid handle with OK status.
|
| size_t | r2ReadRigidBodyReadStates (const struct R2ReadContext *context, const struct R2RigidBodyHandle *handles, size_t handle_count, struct R2RigidBodyState *states, size_t capacity) |
| | Copy callback-visible body states in the supplied handle order.
|
| uint16_t | r2ReadCollider_ActiveCollisionTypes (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider body-type collision activation bitmask (R2_COLLISION_TYPES_* bits).
|
| uint32_t | r2ReadCollider_ActiveHooks (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider physics-hook activation bitmask.
|
| uint32_t | r2ReadCollider_FrictionCombineRule (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider friction combination rule (R2_COMBINE_*).
|
| uint32_t | r2ReadCollider_RestitutionCombineRule (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider restitution combination rule (R2_COMBINE_*).
|
| struct R2Pose | r2ReadCollider_PositionWrtParent (const struct R2ReadContext *context, struct R2ColliderHandle handle) |
| | Return the collider pose relative to its parent rigid body, or its world-space pose if it has no parent.
|
| int8_t | r2ReadRigidBody_DominanceGroup (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body signed dominance group.
|
| size_t | r2ReadRigidBody_AdditionalSolverIterations (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body additional solver iterations for connected bodies.
|
| size_t | r2ReadRigidBody_AdditionalPgsIterations (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return the rigid body additional PGS iterations for connected bodies.
|
| R2Bool | r2ReadRigidBody_IsFastRotationAllowed (const struct R2ReadContext *context, struct R2RigidBodyHandle handle) |
| | Return whether the rigid body may exceed the angular-velocity limit of its CCD.
|
| size_t | r2IntersectRay (const struct R2World *world, const struct R2QueryOptions *query_options, struct R2Vector origin, struct R2Vector direction, R2Real max_toi, R2Bool solid, struct R2RayHit *buffer, size_t capacity) |
| | Copy the hits of every collider intersected by the ray, in no particular order.
|
| struct R2OptionalShapeCastHit | r2TryCastShape (const struct R2World *world, const struct R2QueryOptions *query_options, struct R2Pose pose, struct R2Vector velocity, const R2SharedShape *shape, struct R2ShapeCastOptions options) |
| | Sweep shape from pose along velocity and return the first hit, with found = 0 on a miss (R2_OK).
|
| struct R2OptionalPointProjection | r2TryProjectPoint (const struct R2World *world, const struct R2QueryOptions *query_options, struct R2Vector point, R2Real max_distance, R2Bool solid) |
| | Return the closest surface projection within max_distance, with found = 0 if there is none (R2_OK).
|
| struct R2Pose | r2NonlinearRigidMotion_PositionAtTime (const struct R2NonlinearRigidMotion *motion, R2Real time) |
| | Return the world-space pose of the motion at the given time.
|
| struct R2OptionalShapeCastHit | r2TryCastShapeNonlinear (const struct R2World *world, const struct R2QueryOptions *query_options, const struct R2NonlinearRigidMotion *motion, const R2SharedShape *shape, R2Real start_time, R2Real end_time, R2Bool 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 (R2_OK).
|
| struct R2OptionalContactPair | r2TryContactPair (struct R2ColliderHandle collider1, struct R2ColliderHandle collider2) |
| | Return the narrow-phase contact pair for two colliders, with found = 0 if the broad phase found no potential contact between them (R2_OK).
|
| struct R2IntersectionPair | r2IntersectionPair (struct R2ColliderHandle collider1, struct R2ColliderHandle collider2) |
| | Return the intersection state of two colliders involving a sensor, or report R2_NOT_FOUND if the broad phase found no potential intersection.
|
| struct R2OptionalIntersectionPair | r2TryIntersectionPair (struct R2ColliderHandle collider1, struct R2ColliderHandle collider2) |
| | Return the intersection state of two colliders involving a sensor, with found = 0 if the broad phase found no potential intersection (R2_OK).
|
| size_t | r2Collider_ContactPairs (struct R2ColliderHandle handle, struct R2ContactPair *buffer, size_t capacity) |
| | Copy the narrow-phase contact pairs involving the collider, including pairs without active solver contacts.
|
| size_t | r2Collider_IntersectionPairs (struct R2ColliderHandle handle, struct R2IntersectionPair *buffer, size_t capacity) |
| | Copy the intersection pairs involving the collider, in the narrow-phase order.
|
| size_t | r2ContactManifolds (struct R2ColliderHandle collider1, struct R2ColliderHandle collider2, struct R2ContactManifold *buffer, size_t capacity) |
| | Copy the geometric contact manifolds of a contact pair, or report R2_NOT_FOUND without a pair.
|
| size_t | r2SolverContacts (struct R2ColliderHandle collider1, struct R2ColliderHandle collider2, size_t manifold_index, struct R2SolverContact *buffer, size_t capacity) |
| | Copy the solver contacts of one manifold of a contact pair, or report R2_NOT_FOUND without a pair.
|
| R2Bool | r2ContactModificationContext_IsSoft (const struct R2ContactModificationContext *context) |
| | Return whether the context holds the contact candidates of two soft surfaces rather than a manifold.
|
| size_t | r2ContactModificationContext_SolverContactCount (const struct R2ContactModificationContext *context) |
| | Return the number of solver contacts of the manifold; zero for a soft context.
|
| struct R2SolverContact | r2ContactModificationContext_SolverContact (const struct R2ContactModificationContext *context, size_t index) |
| | Return a solver contact of the manifold.
|
| R2Status | r2ContactModificationContext_SetSolverContact (struct R2ContactModificationContext *context, size_t index, const struct R2SolverContact *contact) |
| | Replace the points, distance and tangent velocity of a solver contact of the manifold.
|
| R2Status | r2ContactModificationContext_RemoveSolverContact (struct R2ContactModificationContext *context, size_t index) |
| | Remove a solver contact of the manifold.
|
| R2Status | r2EventCollector_SetCallbacks (struct R2EventCollector *events, const struct R2EventCallbacks *callbacks) |
| | Replace the callbacks invoked while stepping with this collector; NULL removes them.
|
| struct R2DebugRenderStyle | r2DefaultDebugRenderStyle (void) |
| | Return native default debug-render style.
|
| size_t | r2DebugRenderWithStyle (const struct R2World *world, uint32_t mode, const struct R2DebugRenderStyle *style, struct R2DebugLine *buffer, size_t capacity) |
| | Copy the debug-render lines of the world drawn with the given style.
|