|
Rapier C — 3D / f64 0.36.0+c.0
|
Collider descriptions, material properties, sensor flags, and filtering. More...
Data Structures | |
| struct | R3ColliderDesc |
| Copyable collider construction data. More... | |
| struct | R3ColliderHandle |
| Copyable non-owning handle: world pointer plus entity index and generation. More... | |
Macros | |
| #define | R3_MASS_DENSITY 0 |
| Mass density. | |
| #define | R3_MASS_TOTAL 1 |
| Mass total. | |
| #define | R3_MASS_PROPERTIES 2 |
| Mass properties. | |
| #define | R3_COLLISION_EVENTS 1 |
| Enable collision-start and collision-stop events for this collider. | |
| #define | R3_CONTACT_FORCE_EVENTS 2 |
| Enable contact-force events for this collider, subject to its force threshold. | |
| #define | R3_COMBINE_AVERAGE 0 |
| Combine the two material coefficients by their arithmetic mean. | |
| #define | R3_COMBINE_MIN 1 |
| Use the smaller of the two material coefficients. | |
| #define | R3_COMBINE_MULTIPLY 2 |
| Multiply the two material coefficients. | |
| #define | R3_COMBINE_MAX 3 |
| Use the larger of the two material coefficients. | |
| #define | R3_COMBINE_CLAMPED_SUM 4 |
| Use the sum of the two material coefficients, clamped to [0, 1]. | |
| #define | R3_COMBINE_GEOMETRIC_MEAN 5 |
| Use the geometric mean (square root of the product) of the two material coefficients. | |
| #define | R3_COLLISION_TYPES_DYNAMIC_DYNAMIC 1 |
| Active collision type bit: contacts between two dynamic bodies. | |
| #define | R3_COLLISION_TYPES_DYNAMIC_KINEMATIC 12 |
| Active collision type bit: contacts between a dynamic and a kinematic body. | |
| #define | R3_COLLISION_TYPES_DYNAMIC_FIXED 2 |
| Active collision type bit: contacts between a dynamic and a fixed body (or a collider without parent). | |
| #define | R3_COLLISION_TYPES_KINEMATIC_KINEMATIC 52224 |
| Active collision type bit: contacts between two kinematic bodies. | |
| #define | R3_COLLISION_TYPES_KINEMATIC_FIXED 8704 |
| Active collision type bit: contacts between a kinematic and a fixed body (or a collider without parent). | |
| #define | R3_COLLISION_TYPES_FIXED_FIXED 32 |
| Active collision type bit: contacts between two fixed bodies (or colliders without parent). | |
| #define | R3_COLLISION_TYPES_DEFAULT 15 |
| Default active collision types: dynamic-dynamic, dynamic-kinematic, and dynamic-fixed. | |
| #define | R3_FILTER_CONTACT_PAIRS 1 |
| Invoke the contact-pair filtering hook for this collider. | |
| #define | R3_FILTER_INTERSECTION_PAIR 2 |
| Invoke the sensor-intersection filtering hook for this collider. | |
| #define | R3_MODIFY_SOLVER_CONTACTS 4 |
| Invoke the solver-contact modification hook for this collider. | |
| #define | R3_GROUPS_AND 0 |
| Require both membership/filter intersections to be nonempty. | |
| #define | R3_GROUPS_OR 1 |
| Accept either membership/filter intersection if both participants select OR; otherwise use AND. | |
Typedefs | |
| typedef struct R3ColliderDesc | R3ColliderDesc |
| Copyable collider construction data. | |
| typedef struct R3ColliderHandle | R3ColliderHandle |
| Copyable non-owning handle: world pointer plus entity index and generation. | |
Functions | |
| struct R3ColliderHandle | r3InsertDeformableCollider (const struct R3ColliderDesc *collider, const struct R3SoftMeshBindingDesc *binding, struct R3RigidBodyHandle parent) |
| Create a deformable collider bound to a soft-body cluster. | |
| struct R3ColliderDesc | r3DefaultColliderDesc (void) |
| Return native default collider desc. | |
| struct R3ColliderDesc | r3BallColliderDesc (R3Real radius) |
| Return a ball description with the supplied radius. | |
| struct R3ColliderDesc | r3CuboidColliderDesc (struct R3Vector half_extents) |
| Return an axis-aligned box description with the supplied half-extents. | |
| struct R3ColliderHandle | r3InsertCollider (struct R3RigidBodyHandle parent, const struct R3ColliderDesc *desc) |
| Insert a collider attached to a rigid body, using the world stored in its handle. | |
| struct R3ColliderHandle | r3InsertColliderWithoutParent (struct R3World *world, const struct R3ColliderDesc *desc) |
| Insert a collider without a rigid-body parent. | |
| R3Status | r3RemoveCollider (struct R3ColliderHandle handle, R3Bool wake_up) |
| Remove the collider and update its parent body mass properties. | |
| size_t | r3ColliderCount (const struct R3World *world) |
| Return the number of collider objects in the world. | |
| size_t | r3ColliderHandles (const struct R3World *world, struct R3ColliderHandle *buffer, size_t capacity) |
| Copy entity handles. | |
| R3Bool | r3Collider_Contains (struct R3ColliderHandle handle) |
| Test whether the live world contains this collider handle. | |
| struct R3Pose | r3Collider_Position (struct R3ColliderHandle handle) |
| Return the collider world-space pose. | |
| struct R3Vector | r3Collider_Translation (struct R3ColliderHandle handle) |
| Return the collider world-space translation. | |
| R3Real | r3Collider_Friction (struct R3ColliderHandle handle) |
| Return the collider friction coefficient. | |
| R3Real | r3Collider_Restitution (struct R3ColliderHandle handle) |
| Return the collider restitution coefficient. | |
| R3Bool | r3Collider_IsSensor (struct R3ColliderHandle handle) |
| Return whether the collider is a sensor (detects overlaps without contact forces). | |
| struct R3RigidBodyHandle | r3Collider_Parent (struct R3ColliderHandle handle) |
| Return the parent body handle, or an invalid handle with OK status for a standalone collider. | |
| R3Status | r3Collider_SetPosition (struct R3ColliderHandle handle, struct R3Pose value) |
| Set the collider world-space pose. | |
| R3Status | r3Collider_SetTranslation (struct R3ColliderHandle handle, struct R3Vector value) |
| Set the collider world-space translation. | |
| R3Status | r3Collider_SetFriction (struct R3ColliderHandle handle, R3Real value) |
| Set the collider friction coefficient. | |
| R3Status | r3Collider_SetRestitution (struct R3ColliderHandle handle, R3Real value) |
| Set the collider restitution coefficient. | |
| R3Status | r3Collider_SetSensor (struct R3ColliderHandle handle, R3Bool value) |
| Enable or disable a sensor (detects overlaps without contact forces) for the collider. | |
| R3Status | r3Collider_SetCollisionGroups (struct R3ColliderHandle handle, struct R3InteractionGroups value) |
| Set the collider collision filtering groups. | |
| R3Status | r3Collider_SetUserData (struct R3ColliderHandle handle, struct R3UserData value) |
| Set the collider application-owned 128-bit user value. | |
| uint16_t | r3Collider_ActiveCollisionTypes (struct R3ColliderHandle handle) |
| Return the collider body-type collision activation bitmask (R3_COLLISION_TYPES_* bits). | |
| uint32_t | r3Collider_ActiveHooks (struct R3ColliderHandle handle) |
| Return the collider physics-hook activation bitmask. | |
| uint32_t | r3Collider_FrictionCombineRule (struct R3ColliderHandle handle) |
| Return the collider friction combination rule (R3_COMBINE_*). | |
| uint32_t | r3Collider_RestitutionCombineRule (struct R3ColliderHandle handle) |
| Return the collider restitution combination rule (R3_COMBINE_*). | |
| struct R3Pose | r3Collider_PositionWrtParent (struct R3ColliderHandle handle) |
| Return the collider pose relative to its parent rigid body, or its world-space pose if it has no parent. | |
| R3Status | r3Collider_SetRotation (struct R3ColliderHandle handle, struct R3Rotation value) |
| Set the collider world-space rotation. | |
| struct R3ColliderDesc | r3RoundCuboidColliderDesc (struct R3Vector half_extents, R3Real border_radius) |
| Return a rounded box description; half_extents exclude the added border_radius. | |
| struct R3ColliderDesc | r3CapsuleColliderDesc (struct R3Vector a, struct R3Vector b, R3Real radius) |
| Return a capsule description with segment endpoints a/b and the supplied radius. | |
| struct R3ColliderDesc | r3SegmentColliderDesc (struct R3Vector a, struct R3Vector b) |
| Return a segment description with endpoints a and b. | |
| struct R3ColliderDesc | r3TriangleColliderDesc (struct R3Vector a, struct R3Vector b, struct R3Vector c) |
| Return a triangle description with vertices a, b, and c. | |
| struct R3ColliderDesc | r3HalfspaceColliderDesc (struct R3Vector normal) |
| Return a half-space description bounded by a plane through the origin; normal points outward. | |
| struct R3ColliderDesc | r3CylinderColliderDesc (R3Real half_height, R3Real radius) |
| Return a Y-aligned cylinder description with the supplied half-height and radius. | |
| struct R3ColliderDesc | r3ConeColliderDesc (R3Real half_height, R3Real radius) |
| Return a Y-aligned cone description with the supplied half-height and base radius. | |
| struct R3ColliderDesc | r3RoundCylinderColliderDesc (R3Real half_height, R3Real radius, R3Real border_radius) |
| Return a rounded Y-aligned cylinder description; dimensions exclude border_radius. | |
| struct R3ColliderDesc | r3RoundConeColliderDesc (R3Real half_height, R3Real radius, R3Real border_radius) |
| Return a rounded Y-aligned cone description; dimensions exclude border_radius. | |
| struct R3ColliderDesc | r3CapsuleXColliderDesc (R3Real half_height, R3Real radius) |
| Return a X-aligned capsule description; half_height is half the segment length, excluding caps. | |
| struct R3ColliderDesc | r3CapsuleYColliderDesc (R3Real half_height, R3Real radius) |
| Return a Y-aligned capsule description; half_height is half the segment length, excluding caps. | |
| struct R3ColliderDesc | r3CapsuleZColliderDesc (R3Real half_height, R3Real radius) |
| Return a Z-aligned capsule description; half_height is half the segment length, excluding caps. | |
| struct R3SoftBodyHandle | r3Collider_SoftBody (struct R3ColliderHandle handle) |
| Return the soft body owning this deformable collider (a soft-body collision mesh), or an invalid handle for any other collider. | |
| R3Status | r3Collider_SetMassProperties (struct R3ColliderHandle handle, struct R3MassProperties properties) |
| Set the collider local mass properties. | |
| struct R3MassProperties | r3Collider_MassProperties (struct R3ColliderHandle handle) |
| Return the collider local mass properties. | |
| R3Bool | r3Collider_IsVoxels (struct R3ColliderHandle handle) |
| Return whether the collider is a voxel shape. | |
| struct R3VoxelQuery | r3Collider_VoxelAtFlatId (struct R3ColliderHandle handle, uint32_t id) |
| Return voxel information at a flat index; found = 0 if absent. | |
| R3Status | r3Collider_SetVoxel (struct R3ColliderHandle handle, struct R3VoxelKey key, R3Bool filled) |
| Fill or clear the voxel at key; the collider must have a voxel shape. | |
| R3Status | r3Collider_SetDensity (struct R3ColliderHandle handle, R3Real value) |
| Set the collider mass per unit volume. | |
| R3Status | r3Collider_SetMass (struct R3ColliderHandle handle, R3Real value) |
| Set the collider mass. | |
| R3Status | r3Collider_SetEnabled (struct R3ColliderHandle handle, R3Bool value) |
| Enable or disable the collider. | |
| R3Status | r3Collider_SetSolverGroups (struct R3ColliderHandle handle, struct R3InteractionGroups value) |
| Set the collider contact-force filtering groups. | |
| R3Status | r3Collider_SetFrictionCombineRule (struct R3ColliderHandle handle, uint32_t value) |
| Set the collider friction combination rule (R3_COMBINE_*). | |
| R3Status | r3Collider_SetRestitutionCombineRule (struct R3ColliderHandle handle, uint32_t value) |
| Set the collider restitution combination rule (R3_COMBINE_*). | |
| R3Status | r3Collider_SetContactSkin (struct R3ColliderHandle handle, R3Real value) |
| Set the collider extra separation skin around the shape. | |
| R3Status | r3Collider_SetContactForceEventThreshold (struct R3ColliderHandle handle, R3Real value) |
| Set the collider force threshold for contact-force events. | |
| R3Status | r3Collider_SetActiveEvents (struct R3ColliderHandle handle, uint32_t value) |
| Set the collider event-generation bitmask (R3_COLLISION_EVENTS and R3_CONTACT_FORCE_EVENTS). | |
| R3Status | r3Collider_SetActiveHooks (struct R3ColliderHandle handle, uint32_t value) |
| Set the collider physics-hook activation bitmask. | |
| R3Status | r3Collider_SetActiveCollisionTypes (struct R3ColliderHandle handle, uint16_t value) |
| Set the collider body-type collision activation bitmask. | |
| struct R3Rotation | r3Collider_Rotation (struct R3ColliderHandle handle) |
| Return the collider world-space rotation. | |
| struct R3InteractionGroups | r3Collider_CollisionGroups (struct R3ColliderHandle handle) |
| Return the collider collision filtering groups. | |
| struct R3InteractionGroups | r3Collider_SolverGroups (struct R3ColliderHandle handle) |
| Return the collider contact-force filtering groups. | |
| struct R3UserData | r3Collider_UserData (struct R3ColliderHandle handle) |
| Return the collider application-owned 128-bit user value. | |
| uint32_t | r3Collider_ActiveEvents (struct R3ColliderHandle handle) |
| Return the collider event-generation bitmask (R3_COLLISION_EVENTS and R3_CONTACT_FORCE_EVENTS). | |
| R3Real | r3Collider_Mass (struct R3ColliderHandle handle) |
| Return the collider mass. | |
| R3Real | r3Collider_Density (struct R3ColliderHandle handle) |
| Return the collider mass per unit volume. | |
| R3Real | r3Collider_Volume (struct R3ColliderHandle handle) |
| Return the collider current volume. | |
| R3Real | r3Collider_ContactSkin (struct R3ColliderHandle handle) |
| Return the collider extra separation skin around the shape. | |
| R3Real | r3Collider_ContactForceEventThreshold (struct R3ColliderHandle handle) |
| Return the collider force threshold for contact-force events. | |
| R3Bool | r3Collider_IsEnabled (struct R3ColliderHandle handle) |
| Return whether the collider is enabled. | |
| struct R3Aabb | r3Collider_ComputeAabb (struct R3ColliderHandle handle) |
| Return the current world-space axis-aligned bounds. | |
| R3Status | r3Collider_SetPositionWrtParent (struct R3ColliderHandle handle, struct R3Pose value) |
| Set the collider pose relative to the parent rigid body. | |
| R3Status | r3Collider_ValidateHandle (struct R3ColliderHandle handle) |
| Validate the index and generation in the live owning world. | |
Collider descriptions, material properties, sensor flags, and filtering.
A parented collider's description pose is relative to its rigid body.
| #define R3_COLLISION_EVENTS 1 |
Enable collision-start and collision-stop events for this collider.
| #define R3_COLLISION_TYPES_DEFAULT 15 |
Default active collision types: dynamic-dynamic, dynamic-kinematic, and dynamic-fixed.
| #define R3_COLLISION_TYPES_DYNAMIC_DYNAMIC 1 |
Active collision type bit: contacts between two dynamic bodies.
| #define R3_COLLISION_TYPES_DYNAMIC_FIXED 2 |
Active collision type bit: contacts between a dynamic and a fixed body (or a collider without parent).
| #define R3_COLLISION_TYPES_DYNAMIC_KINEMATIC 12 |
Active collision type bit: contacts between a dynamic and a kinematic body.
| #define R3_COLLISION_TYPES_FIXED_FIXED 32 |
Active collision type bit: contacts between two fixed bodies (or colliders without parent).
| #define R3_COLLISION_TYPES_KINEMATIC_FIXED 8704 |
Active collision type bit: contacts between a kinematic and a fixed body (or a collider without parent).
| #define R3_COLLISION_TYPES_KINEMATIC_KINEMATIC 52224 |
Active collision type bit: contacts between two kinematic bodies.
| #define R3_COMBINE_AVERAGE 0 |
Combine the two material coefficients by their arithmetic mean.
| #define R3_COMBINE_CLAMPED_SUM 4 |
Use the sum of the two material coefficients, clamped to [0, 1].
| #define R3_COMBINE_GEOMETRIC_MEAN 5 |
Use the geometric mean (square root of the product) of the two material coefficients.
| #define R3_COMBINE_MAX 3 |
Use the larger of the two material coefficients.
| #define R3_COMBINE_MIN 1 |
Use the smaller of the two material coefficients.
| #define R3_COMBINE_MULTIPLY 2 |
Multiply the two material coefficients.
| #define R3_CONTACT_FORCE_EVENTS 2 |
Enable contact-force events for this collider, subject to its force threshold.
| #define R3_FILTER_CONTACT_PAIRS 1 |
Invoke the contact-pair filtering hook for this collider.
| #define R3_FILTER_INTERSECTION_PAIR 2 |
Invoke the sensor-intersection filtering hook for this collider.
| #define R3_GROUPS_AND 0 |
Require both membership/filter intersections to be nonempty.
| #define R3_GROUPS_OR 1 |
Accept either membership/filter intersection if both participants select OR; otherwise use AND.
| #define R3_MASS_DENSITY 0 |
Mass density.
| #define R3_MASS_PROPERTIES 2 |
Mass properties.
| #define R3_MASS_TOTAL 1 |
Mass total.
| #define R3_MODIFY_SOLVER_CONTACTS 4 |
Invoke the solver-contact modification hook for this collider.
| typedef struct R3ColliderDesc R3ColliderDesc |
Copyable collider construction data.
Shape inputs are borrowed, never owned.
| typedef struct R3ColliderHandle R3ColliderHandle |
Copyable non-owning handle: world pointer plus entity index and generation.
The world must remain alive throughout every use. Copying does not retain it. UINT32_MAX/UINT32_MAX with a NULL world is invalid.
| struct R3ColliderDesc r3BallColliderDesc | ( | R3Real | radius | ) |
Return a ball description with the supplied radius.
Returns a description without allocating or validating. Build/insert validates its fields.
| struct R3ColliderDesc r3CapsuleColliderDesc | ( | struct R3Vector | a, |
| struct R3Vector | b, | ||
| R3Real | radius ) |
Return a capsule description with segment endpoints a/b and the supplied radius.
Returns a description without allocating or validating. Build/insert validates its fields.
| struct R3ColliderDesc r3CapsuleXColliderDesc | ( | R3Real | half_height, |
| R3Real | radius ) |
Return a X-aligned capsule description; half_height is half the segment length, excluding caps.
Returns a description without allocating or validating. Build/insert validates its fields.
| struct R3ColliderDesc r3CapsuleYColliderDesc | ( | R3Real | half_height, |
| R3Real | radius ) |
Return a Y-aligned capsule description; half_height is half the segment length, excluding caps.
Returns a description without allocating or validating. Build/insert validates its fields.
| struct R3ColliderDesc r3CapsuleZColliderDesc | ( | R3Real | half_height, |
| R3Real | radius ) |
Return a Z-aligned capsule description; half_height is half the segment length, excluding caps.
Returns a description without allocating or validating. Build/insert validates its fields.
| uint16_t r3Collider_ActiveCollisionTypes | ( | struct R3ColliderHandle | handle | ) |
Return the collider body-type collision activation bitmask (R3_COLLISION_TYPES_* bits).
| uint32_t r3Collider_ActiveEvents | ( | struct R3ColliderHandle | handle | ) |
Return the collider event-generation bitmask (R3_COLLISION_EVENTS and R3_CONTACT_FORCE_EVENTS).
| uint32_t r3Collider_ActiveHooks | ( | struct R3ColliderHandle | handle | ) |
Return the collider physics-hook activation bitmask.
| struct R3InteractionGroups r3Collider_CollisionGroups | ( | struct R3ColliderHandle | handle | ) |
Return the collider collision filtering groups.
| struct R3Aabb r3Collider_ComputeAabb | ( | struct R3ColliderHandle | handle | ) |
Return the current world-space axis-aligned bounds.
| R3Real r3Collider_ContactForceEventThreshold | ( | struct R3ColliderHandle | handle | ) |
Return the collider force threshold for contact-force events.
| R3Real r3Collider_ContactSkin | ( | struct R3ColliderHandle | handle | ) |
Return the collider extra separation skin around the shape.
| R3Bool r3Collider_Contains | ( | struct R3ColliderHandle | handle | ) |
Test whether the live world contains this collider handle.
A removed/stale handle returns false.
| R3Real r3Collider_Density | ( | struct R3ColliderHandle | handle | ) |
Return the collider mass per unit volume.
| R3Real r3Collider_Friction | ( | struct R3ColliderHandle | handle | ) |
Return the collider friction coefficient.
| uint32_t r3Collider_FrictionCombineRule | ( | struct R3ColliderHandle | handle | ) |
Return the collider friction combination rule (R3_COMBINE_*).
| R3Bool r3Collider_IsEnabled | ( | struct R3ColliderHandle | handle | ) |
Return whether the collider is enabled.
| R3Bool r3Collider_IsSensor | ( | struct R3ColliderHandle | handle | ) |
Return whether the collider is a sensor (detects overlaps without contact forces).
| R3Bool r3Collider_IsVoxels | ( | struct R3ColliderHandle | handle | ) |
Return whether the collider is a voxel shape.
| R3Real r3Collider_Mass | ( | struct R3ColliderHandle | handle | ) |
Return the collider mass.
| struct R3MassProperties r3Collider_MassProperties | ( | struct R3ColliderHandle | handle | ) |
Return the collider local mass properties.
| struct R3RigidBodyHandle r3Collider_Parent | ( | struct R3ColliderHandle | handle | ) |
Return the parent body handle, or an invalid handle with OK status for a standalone collider.
| struct R3Pose r3Collider_Position | ( | struct R3ColliderHandle | handle | ) |
Return the collider world-space pose.
| struct R3Pose r3Collider_PositionWrtParent | ( | struct R3ColliderHandle | handle | ) |
Return the collider pose relative to its parent rigid body, or its world-space pose if it has no parent.
| R3Real r3Collider_Restitution | ( | struct R3ColliderHandle | handle | ) |
Return the collider restitution coefficient.
| uint32_t r3Collider_RestitutionCombineRule | ( | struct R3ColliderHandle | handle | ) |
Return the collider restitution combination rule (R3_COMBINE_*).
| struct R3Rotation r3Collider_Rotation | ( | struct R3ColliderHandle | handle | ) |
Return the collider world-space rotation.
| R3Status r3Collider_SetActiveCollisionTypes | ( | struct R3ColliderHandle | handle, |
| uint16_t | value ) |
Set the collider body-type collision activation bitmask.
| R3Status r3Collider_SetActiveEvents | ( | struct R3ColliderHandle | handle, |
| uint32_t | value ) |
Set the collider event-generation bitmask (R3_COLLISION_EVENTS and R3_CONTACT_FORCE_EVENTS).
| R3Status r3Collider_SetActiveHooks | ( | struct R3ColliderHandle | handle, |
| uint32_t | value ) |
Set the collider physics-hook activation bitmask.
| R3Status r3Collider_SetCollisionGroups | ( | struct R3ColliderHandle | handle, |
| struct R3InteractionGroups | value ) |
Set the collider collision filtering groups.
| R3Status r3Collider_SetContactForceEventThreshold | ( | struct R3ColliderHandle | handle, |
| R3Real | value ) |
Set the collider force threshold for contact-force events.
| R3Status r3Collider_SetContactSkin | ( | struct R3ColliderHandle | handle, |
| R3Real | value ) |
Set the collider extra separation skin around the shape.
| R3Status r3Collider_SetDensity | ( | struct R3ColliderHandle | handle, |
| R3Real | value ) |
Set the collider mass per unit volume.
| R3Status r3Collider_SetEnabled | ( | struct R3ColliderHandle | handle, |
| R3Bool | value ) |
Enable or disable the collider.
| R3Status r3Collider_SetFriction | ( | struct R3ColliderHandle | handle, |
| R3Real | value ) |
Set the collider friction coefficient.
| R3Status r3Collider_SetFrictionCombineRule | ( | struct R3ColliderHandle | handle, |
| uint32_t | value ) |
Set the collider friction combination rule (R3_COMBINE_*).
| R3Status r3Collider_SetMass | ( | struct R3ColliderHandle | handle, |
| R3Real | value ) |
Set the collider mass.
| R3Status r3Collider_SetMassProperties | ( | struct R3ColliderHandle | handle, |
| struct R3MassProperties | properties ) |
Set the collider local mass properties.
| R3Status r3Collider_SetPosition | ( | struct R3ColliderHandle | handle, |
| struct R3Pose | value ) |
Set the collider world-space pose.
For a collider attached to a rigid body, prefer SetPositionWrtParent: the body pose overwrites it at the next step.
| R3Status r3Collider_SetPositionWrtParent | ( | struct R3ColliderHandle | handle, |
| struct R3Pose | value ) |
Set the collider pose relative to the parent rigid body.
| R3Status r3Collider_SetRestitution | ( | struct R3ColliderHandle | handle, |
| R3Real | value ) |
Set the collider restitution coefficient.
| R3Status r3Collider_SetRestitutionCombineRule | ( | struct R3ColliderHandle | handle, |
| uint32_t | value ) |
Set the collider restitution combination rule (R3_COMBINE_*).
| R3Status r3Collider_SetRotation | ( | struct R3ColliderHandle | handle, |
| struct R3Rotation | value ) |
Set the collider world-space rotation.
For a collider attached to a rigid body, prefer SetPositionWrtParent: the body pose overwrites it at the next step.
| R3Status r3Collider_SetSensor | ( | struct R3ColliderHandle | handle, |
| R3Bool | value ) |
Enable or disable a sensor (detects overlaps without contact forces) for the collider.
| R3Status r3Collider_SetSolverGroups | ( | struct R3ColliderHandle | handle, |
| struct R3InteractionGroups | value ) |
Set the collider contact-force filtering groups.
| R3Status r3Collider_SetTranslation | ( | struct R3ColliderHandle | handle, |
| struct R3Vector | value ) |
Set the collider world-space translation.
For a collider attached to a rigid body, prefer SetPositionWrtParent: the body pose overwrites it at the next step.
| R3Status r3Collider_SetUserData | ( | struct R3ColliderHandle | handle, |
| struct R3UserData | value ) |
Set the collider application-owned 128-bit user value.
| R3Status r3Collider_SetVoxel | ( | struct R3ColliderHandle | handle, |
| struct R3VoxelKey | key, | ||
| R3Bool | filled ) |
Fill or clear the voxel at key; the collider must have a voxel shape.
| struct R3SoftBodyHandle r3Collider_SoftBody | ( | struct R3ColliderHandle | handle | ) |
Return the soft body owning this deformable collider (a soft-body collision mesh), or an invalid handle for any other collider.
| struct R3InteractionGroups r3Collider_SolverGroups | ( | struct R3ColliderHandle | handle | ) |
Return the collider contact-force filtering groups.
| struct R3Vector r3Collider_Translation | ( | struct R3ColliderHandle | handle | ) |
Return the collider world-space translation.
| struct R3UserData r3Collider_UserData | ( | struct R3ColliderHandle | handle | ) |
Return the collider application-owned 128-bit user value.
| R3Status r3Collider_ValidateHandle | ( | struct R3ColliderHandle | handle | ) |
Validate the index and generation in the live owning world.
Cannot detect a world pointer that has already been freed.
| R3Real r3Collider_Volume | ( | struct R3ColliderHandle | handle | ) |
Return the collider current volume.
| struct R3VoxelQuery r3Collider_VoxelAtFlatId | ( | struct R3ColliderHandle | handle, |
| uint32_t | id ) |
Return voxel information at a flat index; found = 0 if absent.
| size_t r3ColliderCount | ( | const struct R3World * | world | ) |
Return the number of collider objects in the world.
| size_t r3ColliderHandles | ( | const struct R3World * | world, |
| struct R3ColliderHandle * | buffer, | ||
| size_t | capacity ) |
Copy entity handles.
| struct R3ColliderDesc r3ConeColliderDesc | ( | R3Real | half_height, |
| R3Real | radius ) |
Return a Y-aligned cone description with the supplied half-height and base radius.
Returns a description without allocating or validating. Build/insert validates its fields.
| struct R3ColliderDesc r3CuboidColliderDesc | ( | struct R3Vector | half_extents | ) |
Return an axis-aligned box description with the supplied half-extents.
Returns a description without allocating or validating. Build/insert validates its fields.
| struct R3ColliderDesc r3CylinderColliderDesc | ( | R3Real | half_height, |
| R3Real | radius ) |
Return a Y-aligned cylinder description with the supplied half-height and radius.
Returns a description without allocating or validating. Build/insert validates its fields.
| struct R3ColliderDesc r3DefaultColliderDesc | ( | void | ) |
Return native default collider desc.
This POD value owns no resources.
| struct R3ColliderDesc r3HalfspaceColliderDesc | ( | struct R3Vector | normal | ) |
Return a half-space description bounded by a plane through the origin; normal points outward.
Returns a description without allocating or validating. Build/insert validates its fields.
| struct R3ColliderHandle r3InsertCollider | ( | struct R3RigidBodyHandle | parent, |
| const struct R3ColliderDesc * | desc ) |
Insert a collider attached to a rigid body, using the world stored in its handle.
The parent handle is copied by value. The description is borrowed through this call. Invalid or removed parents fail without inserting a collider.
| struct R3ColliderHandle r3InsertColliderWithoutParent | ( | struct R3World * | world, |
| const struct R3ColliderDesc * | desc ) |
Insert a collider without a rigid-body parent.
The world owns the collider. The description is borrowed through this call.
| struct R3ColliderHandle r3InsertDeformableCollider | ( | const struct R3ColliderDesc * | collider, |
| const struct R3SoftMeshBindingDesc * | binding, | ||
| struct R3RigidBodyHandle | parent ) |
Create a deformable collider bound to a soft-body cluster.
The world owns the collider; binding arrays are borrowed only during insertion.
| R3Status r3RemoveCollider | ( | struct R3ColliderHandle | handle, |
| R3Bool | wake_up ) |
Remove the collider and update its parent body mass properties.
wake_up wakes the parent.
| struct R3ColliderDesc r3RoundConeColliderDesc | ( | R3Real | half_height, |
| R3Real | radius, | ||
| R3Real | border_radius ) |
Return a rounded Y-aligned cone description; dimensions exclude border_radius.
Returns a description without allocating or validating. Build/insert validates its fields.
| struct R3ColliderDesc r3RoundCuboidColliderDesc | ( | struct R3Vector | half_extents, |
| R3Real | border_radius ) |
Return a rounded box description; half_extents exclude the added border_radius.
Returns a description without allocating or validating. Build/insert validates its fields.
| struct R3ColliderDesc r3RoundCylinderColliderDesc | ( | R3Real | half_height, |
| R3Real | radius, | ||
| R3Real | border_radius ) |
Return a rounded Y-aligned cylinder description; dimensions exclude border_radius.
Returns a description without allocating or validating. Build/insert validates its fields.
| struct R3ColliderDesc r3SegmentColliderDesc | ( | struct R3Vector | a, |
| struct R3Vector | b ) |
Return a segment description with endpoints a and b.
Returns a description without allocating or validating. Build/insert validates its fields.
| struct R3ColliderDesc r3TriangleColliderDesc | ( | struct R3Vector | a, |
| struct R3Vector | b, | ||
| struct R3Vector | c ) |
Return a triangle description with vertices a, b, and c.
Returns a description without allocating or validating. Build/insert validates its fields.