5#if !defined(RAPIER_DIM2) && !defined(RAPIER_DIM3)
8#if defined(RAPIER_DIM2) && defined(RAPIER_DIM3)
9#error Select exactly one Rapier dimension
11#if !defined(RAPIER_F32) && !defined(RAPIER_F64)
14#if defined(RAPIER_F32) && defined(RAPIER_F64)
15#error Select exactly one Rapier precision
17#if defined(RAPIER_DIM2)
21#define RAPIER_TYPE(name) R2##name
23#define RAPIER_CONST(name) R2_##name
25#define RAPIER_FN(name) r2##name
30#define RAPIER_TYPE(name) R3##name
32#define RAPIER_CONST(name) R3_##name
34#define RAPIER_FN(name) r3##name
38#define RAPIER_CALL __cdecl
44#if defined(_WIN32) && !defined(RAPIER_STATIC)
46#define RAPIER_API __declspec(dllimport)
65#if defined(RAPIER_DIM2)
67#if defined(RAPIER_DIM3)
73#define R2_FRICTION_MODEL_SIMPLIFIED 0
76#if defined(RAPIER_DIM3)
81#define R2_FRICTION_MODEL_COULOMB 1
84#if defined(RAPIER_DIM2)
89#define R2_JOINT_DOF_COUNT 3
92#if defined(RAPIER_DIM3)
97#define R2_JOINT_DOF_COUNT 6
104#define R2_SOFT_DESC_PARTICLES 0
110#define R2_SOFT_DESC_ROPE 1
116#define R2_SOFT_DESC_GRID 2
122#define R2_SOFT_DESC_CLOTH 3
128#define R2_SOFT_DESC_CUBOID 4
134#define R2_SOFT_DESC_SURFACE 5
140#define R2_SOFT_DESC_DISK 6
146#define R2_SOFT_DESC_SPHERE 7
152#define R2_SOFT_DESC_CLOTH_TUBE 8
158#define R2_SOFT_DESC_VOLUMETRIC 9
160#if defined(RAPIER_DIM2)
165#define R2_SOFT_DESC_POLYGON 10
168#if defined(RAPIER_DIM2)
173#define R2_SOFT_DESC_TRIMESH 11
176#if defined(RAPIER_DIM3)
181#define R2_SOFT_DESC_CLOTH_ANISOTROPIC 12
188#define R2_SOFT_BINDING_SKINNED 0
194#define R2_SOFT_BINDING_DIRECT 1
200#define R2_SOFT_BINDING_DIRECT_BY_POSITION 2
202#if defined(RAPIER_DIM2)
207#define R2_POLYLINE_ORIENTED 1
214#define R2_POLYLINE_DEFORMABLE 2
220#define R2_SHAPE_DESC_BALL 0
226#define R2_SHAPE_DESC_CUBOID 1
232#define R2_SHAPE_DESC_ROUND_CUBOID 2
238#define R2_SHAPE_DESC_CAPSULE 3
244#define R2_SHAPE_DESC_SEGMENT 4
250#define R2_SHAPE_DESC_TRIANGLE 5
256#define R2_SHAPE_DESC_HALFSPACE 6
262#define R2_SHAPE_DESC_CONVEX_HULL 7
268#define R2_SHAPE_DESC_TRIMESH 8
274#define R2_SHAPE_DESC_POLYLINE 9
280#define R2_SHAPE_DESC_SHARED 10
286#define R2_SHAPE_DESC_HEIGHTFIELD 11
292#define R2_SHAPE_DESC_CYLINDER 12
298#define R2_SHAPE_DESC_CONE 13
304#define R2_SHAPE_DESC_COMPOUND 14
310#define R2_SHAPE_DESC_ROUND_CYLINDER 15
316#define R2_SHAPE_DESC_ROUND_CONE 16
322#define R2_MASS_DENSITY 0
328#define R2_MASS_TOTAL 1
334#define R2_MASS_PROPERTIES 2
340#define R2_ABI_VERSION 1
358#define R2_KINEMATIC_POSITION_BASED 2
364#define R2_KINEMATIC_VELOCITY_BASED 3
370#define R2_COLLISION_EVENTS 1
376#define R2_CONTACT_FORCE_EVENTS 2
382#define R2_COMBINE_AVERAGE 0
388#define R2_COMBINE_MIN 1
394#define R2_COMBINE_MULTIPLY 2
400#define R2_COMBINE_MAX 3
406#define R2_COMBINE_CLAMPED_SUM 4
412#define R2_COMBINE_GEOMETRIC_MEAN 5
418#define R2_COLLISION_TYPES_DYNAMIC_DYNAMIC 1
424#define R2_COLLISION_TYPES_DYNAMIC_KINEMATIC 12
430#define R2_COLLISION_TYPES_DYNAMIC_FIXED 2
436#define R2_COLLISION_TYPES_KINEMATIC_KINEMATIC 52224
442#define R2_COLLISION_TYPES_KINEMATIC_FIXED 8704
448#define R2_COLLISION_TYPES_FIXED_FIXED 32
454#define R2_COLLISION_TYPES_DEFAULT 15
460#define R2_FILTER_CONTACT_PAIRS 1
466#define R2_FILTER_INTERSECTION_PAIR 2
472#define R2_MODIFY_SOLVER_CONTACTS 4
478#define R2_QUERY_EXCLUDE_FIXED 1
484#define R2_QUERY_EXCLUDE_KINEMATIC 2
490#define R2_QUERY_EXCLUDE_DYNAMIC 4
496#define R2_QUERY_EXCLUDE_SENSORS 8
502#define R2_QUERY_EXCLUDE_SOLIDS 16
508#define R2_QUERY_ONLY_DYNAMIC 3
514#define R2_QUERY_ONLY_KINEMATIC 5
520#define R2_QUERY_ONLY_FIXED 6
526#define R2_DEBUG_COLLIDER_SHAPES 1
532#define R2_DEBUG_RIGID_BODY_AXES 2
538#define R2_DEBUG_MULTIBODY_JOINTS 4
544#define R2_DEBUG_IMPULSE_JOINTS 8
550#define R2_DEBUG_SOLVER_CONTACTS 16
556#define R2_DEBUG_CONTACTS 32
562#define R2_DEBUG_COLLIDER_AABBS 64
568#define R2_DEBUG_SOFT_BODIES 128
574#define R2_DEBUG_PSEUDO_NORMALS 256
580#define R2_DEBUG_SOFT_VOLUME_CONTACTS 512
586#define R2_DEBUG_SOFT_BODY_STRESS 1024
592#define R2_GROUPS_AND 0
598#define R2_GROUPS_OR 1
604#define R2_MOTOR_ACCELERATION_BASED 0
610#define R2_MOTOR_FORCE_BASED 1
616#define R2_SOFT_CELL_VOLUME 0
622#define R2_SOFT_CELL_COROTATIONAL 1
628#define R2_SOFT_CELL_NEO_HOOKEAN 2
634#define R2_SOFT_SOLVER_CONSTRAINTS 0
640#define R2_SOFT_SOLVER_FEM 1
646#define R2_SOFT_EDGE_PLASTIC_FLOW_BOTH 0
652#define R2_SOFT_EDGE_PLASTIC_FLOW_COMPRESSION 1
658#define R2_SOFT_EDGE_PLASTIC_FLOW_TENSION 2
664#define R2_SOFT_PATCH_CONSTRAINTS_KEEP 0
670#define R2_SOFT_PATCH_CONSTRAINTS_STAND_DOWN 1
676#define R2_SOFT_PATCH_CONSTRAINTS_ALONG_NORMAL 2
682#define R2_AXIS_LIN_X 0
688#define R2_AXIS_LIN_Y 1
694#define R2_LOCK_TRANSLATION_X 1
700#define R2_LOCK_TRANSLATION_Y 2
706#define R2_LOCK_TRANSLATION_Z 4
712#define R2_LOCK_ROTATION_X 8
718#define R2_LOCK_ROTATION_Y 16
724#define R2_LOCK_ROTATION_Z 32
726#if defined(RAPIER_DIM2)
731#define R2_AXIS_ANG_X 2
734#if defined(RAPIER_DIM3)
739#define R2_AXIS_ANG_X 3
742#if defined(RAPIER_DIM2)
747#define R2_JOINT_FIXED_AXES 7
750#if defined(RAPIER_DIM3)
755#define R2_JOINT_FIXED_AXES 63
758#if defined(RAPIER_DIM2)
763#define R2_JOINT_REVOLUTE_AXES 3
766#if defined(RAPIER_DIM3)
771#define R2_JOINT_REVOLUTE_AXES 55
774#if defined(RAPIER_DIM2)
779#define R2_JOINT_PRISMATIC_AXES 6
782#if defined(RAPIER_DIM3)
787#define R2_JOINT_PRISMATIC_AXES 62
790#if defined(RAPIER_DIM3)
795#define R2_AXIS_LIN_Z 2
798#if defined(RAPIER_DIM3)
803#define R2_AXIS_ANG_Y 4
806#if defined(RAPIER_DIM3)
811#define R2_AXIS_ANG_Z 5
814#if defined(RAPIER_DIM3)
819#define R2_JOINT_SPHERICAL_AXES 7
826#define R2_SOFT_FRAME 4
832#define R2_SHAPE_CAST_OUT_OF_ITERATIONS 0
838#define R2_SHAPE_CAST_CONVERGED 1
844#define R2_SHAPE_CAST_FAILED 2
850#define R2_SHAPE_CAST_PENETRATING 3
856#define R2_FEATURE_UNKNOWN 0
862#define R2_FEATURE_VERTEX 1
868#define R2_FEATURE_EDGE 2
874#define R2_FEATURE_FACE 3
880#define R2_MULTIBODY_JOINTS_ARE_KINEMATIC 1
886#define R2_MULTIBODY_DISABLE_SELF_CONTACTS 2
893#define R2_MULTIBODY_SKIP_LOOP_CLOSURES 4
899#define R2_MULTIBODY_SKIP_JOINT_MOTORS 8
905#define R2_MULTIBODY_SKIP_JOINT_LIMITS 16
911#define R2_MULTIBODY_SKIP_JOINT_SPRINGS 32
917#define R2_TRIMESH_HALF_EDGE_TOPOLOGY 1
923#define R2_TRIMESH_CONNECTED_COMPONENTS 2
929#define R2_TRIMESH_DELETE_BAD_TOPOLOGY_TRIANGLES 4
935#define R2_TRIMESH_ORIENTED 8
941#define R2_TRIMESH_MERGE_DUPLICATE_VERTICES 16
947#define R2_TRIMESH_DELETE_DEGENERATE_TRIANGLES 32
953#define R2_TRIMESH_DELETE_DUPLICATE_TRIANGLES 64
959#define R2_TRIMESH_FIX_INTERNAL_EDGES 144
965#define R2_TRIMESH_DEFORMABLE 256
971#define R2_TRIMESH_FIX_INTERNAL_EDGES_TWO_SIDED 656
977#define R2_HEIGHTFIELD_FIX_INTERNAL_EDGES 1
983#define R2_AXES_MASK_LIN_X 1
989#define R2_AXES_MASK_LIN_Y 2
991#if defined(RAPIER_DIM3)
996#define R2_AXES_MASK_LIN_Z 4
999#if defined(RAPIER_DIM3)
1004#define R2_AXES_MASK_ANG_X 8
1007#if defined(RAPIER_DIM3)
1012#define R2_AXES_MASK_ANG_Y 16
1019#define R2_AXES_MASK_ANG_Z 32
1025#define R2_ABI_FEATURE_FEM 1
1031#define R2_ABI_FEATURE_ROBOTICS 2
1033#if (defined(RAPIER_FEM) && defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1038#define R2_ABI_FEATURES 3
1041#if (defined(RAPIER_FEM) && !(defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32)))
1046#define R2_ABI_FEATURES 1
1049#if (!defined(RAPIER_FEM) && defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1054#define R2_ABI_FEATURES 2
1057#if (!defined(RAPIER_FEM) && !(defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32)))
1062#define R2_ABI_FEATURES 0
1065#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1070#define R2_MESH_CONVERTER_TRIMESH 0
1073#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1078#define R2_MESH_CONVERTER_OBB 1
1081#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1086#define R2_MESH_CONVERTER_AABB 2
1089#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1094#define R2_MESH_CONVERTER_CONVEX_HULL 3
1097#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1102#define R2_MESH_CONVERTER_CONVEX_DECOMPOSITION 4
1109#define R2_COLLISION_EVENT_SENSOR 1
1115#define R2_COLLISION_EVENT_REMOVED 2
1121typedef struct R2Bytes R2Bytes;
1127typedef struct R2ContactModificationContext R2ContactModificationContext;
1129#if defined(RAPIER_DIM3)
1134typedef struct R2DynamicRayCastVehicleController R2DynamicRayCastVehicleController;
1143typedef struct R2EventCollector R2EventCollector;
1151typedef struct R2KinematicCharacterController R2KinematicCharacterController;
1153#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1159typedef struct R2LoadedMeshes R2LoadedMeshes;
1162#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1168typedef struct R2MjcfContactHooks R2MjcfContactHooks;
1171#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1176typedef struct R2MjcfRobot R2MjcfRobot;
1179#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1185typedef struct R2MjcfRobotHandles R2MjcfRobotHandles;
1193typedef struct R2PidController R2PidController;
1200typedef struct R2ReadContext R2ReadContext;
1208typedef struct R2ShapeMesh R2ShapeMesh;
1214typedef struct R2SoftBodyTearEvent R2SoftBodyTearEvent;
1216#if defined(RAPIER_DIM3)
1221typedef struct R2TriMeshData R2TriMeshData;
1224#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1230typedef struct R2UrdfRobot R2UrdfRobot;
1233#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1239typedef struct R2UrdfRobotHandles R2UrdfRobotHandles;
1248typedef struct R2World R2World;
1250#if defined(RAPIER_F32)
1255typedef float R2Real;
1258#if defined(RAPIER_F64)
1263typedef double R2Real;
1270typedef struct R2SpringCoefficients {
1274 R2Real natural_frequency;
1278 R2Real damping_ratio;
1279} R2SpringCoefficients;
1285typedef uint32_t R2Bool;
1291typedef struct R2OptionalReal {
1306typedef struct R2OptionalU32 {
1321typedef struct R2SoftBodyMaterial {
1325 struct R2SpringCoefficients edgeSoftness;
1329 struct R2SpringCoefficients bendSoftness;
1333 struct R2SpringCoefficients volumeSoftness;
1337 struct R2SpringCoefficients shapeMatchingSoftness;
1341 R2Real youngModulus;
1345 R2Real poissonRatio;
1349 R2Real elasticDampingRatio;
1353 R2Real plasticYield;
1357 R2Real plasticCreep;
1365 R2Real deformationDamping;
1369 R2Real edgePlasticYield;
1373 R2Real edgePlasticCreep;
1377 R2Real edgePlasticMax;
1381 uint32_t edgePlasticFlow;
1385 struct R2OptionalReal tearStrain;
1389 struct R2OptionalReal tearForce;
1393 R2Real tearSmoothing;
1397 R2Real interiorStrength;
1401 uint32_t maxTearsPerStep;
1405 struct R2OptionalU32 minPiece;
1406} R2SoftBodyMaterial;
1412typedef struct R2SoftRecoverySettings {
1416 R2Bool authoredVelocityMargin;
1420 R2Bool edgeSpeculation;
1424 R2Bool invertedCellDetection;
1428 R2Bool selfCrossingDetection;
1432 R2Bool detectionMotionGating;
1436 R2Bool crossBodyDetection;
1440 R2Bool selfStandDown;
1444 R2Bool crossBodyExpelGate;
1448 R2Bool edgeStandDown;
1452 R2Bool crossingRepulsion;
1456 R2Bool crossingRepulsionGuide;
1460 R2Bool crossingRepulsionSelfGuide;
1464 R2Real recoveryPace;
1468 R2Bool overlapConstraints;
1472 R2Bool overlapRigid;
1476 R2Bool overlapSkipSelfTangled;
1480 R2Bool overlapEdgeStandDown;
1484 R2Real overlapConstraintPace;
1489 uint32_t overlapPatchConstraints;
1493 R2Bool overlapSkinVolume;
1497 R2Real overlapKeptDepth;
1501 R2Bool overlapSelfRegions;
1505 R2Bool overlapNormalPush;
1509 R2Bool overlapMultiVolume;
1513 uint32_t overlapSplit;
1517 uint32_t overlapPatience;
1521 R2Real overlapProgressMargin;
1522} R2SoftRecoverySettings;
1524#if defined(RAPIER_FEM)
1529typedef struct R2SoftFemParameters {
1533 R2Real linearTolerance;
1537 size_t maxLinearIterations;
1541 size_t maxDenseDofs;
1542} R2SoftFemParameters;
1549typedef struct R2SoftBodiesSettings {
1553 struct R2SoftRecoverySettings recovery;
1557 R2Real resweepStrain;
1561 size_t maxExtraSubsteps;
1565 R2Real contactStiffening;
1566#if defined(RAPIER_FEM)
1570 struct R2SoftFemParameters fem;
1572} R2SoftBodiesSettings;
1578typedef struct R2IntegrationParameters {
1590 struct R2SpringCoefficients contactSoftness;
1594 struct R2SpringCoefficients staticContactSoftness;
1598 R2Real warmstartCoefficient;
1606 struct R2SoftBodiesSettings softBodies;
1610 R2Real normalizedAllowedLinearError;
1614 R2Real normalizedMaxCorrectiveVelocity;
1618 R2Real normalizedPredictionDistance;
1622 R2Real normalizedMaxLinearVelocity;
1626 size_t numSolverIterations;
1630 size_t numInternalPgsIterations;
1634 size_t numInternalStabilizationIterations;
1638 size_t maxCcdSubsteps;
1642 R2Bool contactClustering;
1646 R2Bool contactRecycling;
1650 R2Real normalizedContactRecycleDistance;
1654 R2Bool frictionInBiasPass;
1658 R2Bool warmstartJoints;
1659#if defined(RAPIER_DIM3)
1663 uint32_t frictionModel;
1665} R2IntegrationParameters;
1671typedef uint32_t R2Status;
1677typedef struct R2Vector {
1686#if defined(RAPIER_DIM3)
1698typedef struct R2Rotation {
1699#if defined(RAPIER_DIM2)
1705#if defined(RAPIER_DIM3)
1711#if defined(RAPIER_DIM3)
1717#if defined(RAPIER_DIM3)
1723#if defined(RAPIER_DIM3)
1736typedef struct R2Pose {
1740 struct R2Vector translation;
1744 struct R2Rotation rotation;
1751typedef struct R2JointLimits {
1766typedef struct R2JointMotor {
1797typedef struct R2UserData {
1813typedef struct R2JointDesc {
1817 struct R2Pose localFrame1;
1821 struct R2Pose localFrame2;
1837 uint8_t coupledAxes;
1841 struct R2JointLimits limits[R2_JOINT_DOF_COUNT];
1845 struct R2JointMotor motors[R2_JOINT_DOF_COUNT];
1849 struct R2SpringCoefficients softness;
1853 R2Bool contactsEnabled;
1861 struct R2UserData userData;
1870typedef struct R2ImpulseJointHandle {
1874 struct R2World *world;
1882 uint32_t generation;
1883} R2ImpulseJointHandle;
1891typedef struct R2RigidBodyHandle {
1895 struct R2World *world;
1903 uint32_t generation;
1912typedef struct R2MultibodyJointHandle {
1916 struct R2World *world;
1924 uint32_t generation;
1925} R2MultibodyJointHandle;
1931typedef struct R2VolumeMeshParameters {
1936#if defined(RAPIER_DIM2)
1942#if defined(RAPIER_DIM3)
1948#if defined(RAPIER_DIM3)
1952 uint32_t cover_smoothing;
1954#if defined(RAPIER_DIM3)
1960#if defined(RAPIER_DIM3)
1964 uint32_t cover_subdivisions;
1966} R2VolumeMeshParameters;
1975typedef struct R2VectorView {
1979 const struct R2Vector *data;
1993typedef struct R2RealView {
2011typedef struct R2IndexView {
2015 const uint32_t *data;
2026typedef struct R2Edge {
2044typedef struct R2EdgeView {
2048 const struct R2Edge *data;
2059typedef struct R2SoftEdgeSoftness {
2067 struct R2SpringCoefficients softness;
2068} R2SoftEdgeSoftness;
2074typedef struct R2SoftEdgeSoftnessView {
2078 const struct R2SoftEdgeSoftness *data;
2083} R2SoftEdgeSoftnessView;
2089typedef struct R2SoftEdgeTear {
2104typedef struct R2SoftEdgeTearView {
2108 const struct R2SoftEdgeTear *data;
2113} R2SoftEdgeTearView;
2119typedef struct R2Triangle {
2141typedef struct R2TriangleView {
2145 const struct R2Triangle *data;
2156typedef struct R2Tetrahedron {
2182typedef struct R2TetrahedronView {
2186 const struct R2Tetrahedron *data;
2193#if defined(RAPIER_DIM2)
2198typedef struct R2TriangleView R2CellView;
2201#if defined(RAPIER_DIM3)
2206typedef struct R2TetrahedronView R2CellView;
2209#if defined(RAPIER_DIM2)
2214typedef struct R2EdgeView R2SurfaceElementView;
2217#if defined(RAPIER_DIM3)
2222typedef struct R2TriangleView R2SurfaceElementView;
2229typedef struct R2Dihedral {
2255typedef struct R2DihedralView {
2259 const struct R2Dihedral *data;
2272typedef struct R2SoftBodyDescView {
2276 const struct R2SoftBodyDesc *data;
2281} R2SoftBodyDescView;
2287typedef struct R2OptionalBool {
2302typedef struct R2SharedShape R2SharedShape;
2309typedef struct R2CompoundShapeView {
2313 const struct R2CompoundShapeDesc *data;
2318} R2CompoundShapeView;
2328typedef struct R2ShapeDesc {
2356 R2Real borderRadius;
2360 struct R2VectorView vertices;
2364 struct R2TriangleView triangles;
2368 struct R2EdgeView edges;
2376 struct R2RealView heights;
2388 struct R2Vector scale;
2392 const R2SharedShape *sharedShape;
2396 struct R2CompoundShapeView children;
2403typedef struct R2CompoundShapeDesc {
2411 struct R2ShapeDesc shape;
2412} R2CompoundShapeDesc;
2415#if defined(RAPIER_DIM2)
2420typedef R2Real R2AngVector;
2423#if defined(RAPIER_DIM3)
2428typedef struct R2Vector R2AngVector;
2436typedef struct R2MassProperties {
2440 struct R2Vector local_com;
2448 R2AngVector principal_inertia;
2449#if defined(RAPIER_DIM3)
2453 struct R2Rotation principal_inertia_local_frame;
2461typedef struct R2InteractionGroups {
2465 uint32_t memberships;
2474} R2InteractionGroups;
2480typedef struct R2ColliderDesc {
2484 struct R2ShapeDesc shape;
2488 struct R2Pose position;
2504 struct R2MassProperties massProperties;
2516 uint32_t frictionCombineRule;
2520 uint32_t restitutionCombineRule;
2532 struct R2InteractionGroups collisionGroups;
2536 struct R2InteractionGroups solverGroups;
2540 uint16_t activeCollisionTypes;
2544 uint32_t activeHooks;
2548 uint32_t activeEvents;
2552 R2Real contactForceEventThreshold;
2560 struct R2UserData userData;
2573typedef struct R2SoftBodyDesc {
2594#if defined(RAPIER_DIM3)
2598 struct R2SpringCoefficients warpSoftness;
2600#if defined(RAPIER_DIM3)
2604 struct R2SpringCoefficients weftSoftness;
2606#if defined(RAPIER_DIM3)
2610 struct R2SpringCoefficients shearSoftness;
2635 struct R2Vector translation;
2639 struct R2OptionalReal totalMass;
2643 struct R2VolumeMeshParameters meshing;
2647 struct R2VectorView positions;
2651 struct R2RealView masses;
2655 struct R2IndexView pinned;
2659 struct R2EdgeView edges;
2663 struct R2EdgeView bendEdges;
2667 struct R2IndexView tensionOnlyEdges;
2671 struct R2SoftEdgeSoftnessView edgeSoftness;
2675 struct R2SoftEdgeTearView edgeTearResistance;
2683 R2SurfaceElementView surface;
2684#if defined(RAPIER_DIM3)
2688 struct R2DihedralView dihedrals;
2690#if defined(RAPIER_DIM3)
2694 struct R2EdgeView wire;
2699 struct R2VectorView skinVertices;
2703 R2SurfaceElementView skinIndices;
2710 struct R2SoftBodyDescView appended;
2715 struct R2EdgeView addedEdges;
2719 struct R2SoftBodyMaterial material;
2731 R2Real particleMass;
2735 struct R2OptionalReal particleRadius;
2739 R2Bool volumePreservation;
2743 R2Real volumeFactor;
2747 struct R2OptionalBool shapeMatching;
2752 struct R2OptionalBool oriented;
2756 R2Bool selfContacts;
2760 R2Bool skinCollision;
2764 R2Bool collisionEnabled;
2768 struct R2ColliderDesc collider;
2772 R2Real linearDamping;
2776 R2Real gravityScale;
2780 size_t additionalSolverIterations;
2784 size_t additionalPgsIterations;
2792 int8_t dominanceGroup;
2796 struct R2UserData userData;
2805typedef struct R2SoftBodyHandle {
2809 struct R2World *world;
2817 uint32_t generation;
2824typedef struct R2SoftMeshBindingDesc {
2832 struct R2IndexView particles;
2840 R2Bool selfContacts;
2841} R2SoftMeshBindingDesc;
2849typedef struct R2ColliderHandle {
2853 struct R2World *world;
2861 uint32_t generation;
2868typedef struct R2QueryFilter {
2880 struct R2InteractionGroups groups;
2884 struct R2ColliderHandle exclude_collider;
2888 struct R2RigidBodyHandle exclude_rigid_body;
2896typedef R2Bool (
RAPIER_CALL *R2QueryPredicate)(
void *user_data,
2897 const struct R2ReadContext *read,
2898 struct R2ColliderHandle handle);
2904typedef struct R2QueryOptions {
2908 struct R2QueryFilter filter;
2912 R2QueryPredicate predicate;
2923typedef struct R2RayHit {
2927 struct R2ColliderHandle collider;
2931 R2Real time_of_impact;
2935 struct R2Vector normal;
2940 uint32_t feature_type;
2944 uint32_t feature_id;
2951typedef struct R2PointProjection {
2955 struct R2ColliderHandle collider;
2959 struct R2Vector point;
2970typedef struct R2ShapeCastHit {
2974 struct R2ColliderHandle collider;
2978 R2Real time_of_impact;
2982 struct R2Vector witness1;
2986 struct R2Vector witness2;
2990 struct R2Vector normal1;
2994 struct R2Vector normal2;
3006typedef struct R2ShapeCastOptions {
3010 R2Real max_time_of_impact;
3014 R2Real target_distance;
3018 R2Bool stop_at_penetration;
3022 R2Bool compute_impact_geometry_on_penetration;
3023} R2ShapeCastOptions;
3029typedef struct R2Aabb {
3033 struct R2Vector mins;
3037 struct R2Vector maxs;
3044typedef struct R2RayToi {
3048 struct R2ColliderHandle collider;
3063typedef struct R2OptionalRayHit {
3067 struct R2RayHit hit;
3080typedef struct R2RigidBodyDesc {
3084 struct R2Pose position;
3088 struct R2Vector linvel;
3100 R2Real gravityScale;
3104 R2Real linearDamping;
3108 R2Real angularDamping;
3112 R2Real additionalMass;
3116 R2Bool useAdditionalMassProperties;
3120 struct R2MassProperties additionalMassProperties;
3140 R2Real softCcdPrediction;
3144 R2Bool allowFastRotation;
3152 int8_t dominanceGroup;
3156 size_t additionalSolverIterations;
3160 size_t additionalPgsIterations;
3164 R2Bool gyroscopicForcesEnabled;
3168 struct R2UserData userData;
3175typedef struct R2PodLayout {
3179 size_t rigidBodyDesc;
3183 size_t colliderDesc;
3195 size_t softBodyMaterial;
3199 size_t integrationParameters;
3203 size_t softBodyDesc;
3207 size_t softMeshBindingDesc;
3215 size_t urdfLoaderOptions;
3219 size_t mjcfLoaderOptions;
3227typedef struct R2CharacterLength {
3243typedef struct R2CharacterAutostep {
3251 struct R2CharacterLength max_height;
3255 struct R2CharacterLength min_width;
3259 R2Bool include_dynamic_bodies;
3260} R2CharacterAutostep;
3266typedef struct R2CharacterMovement {
3270 struct R2Vector translation;
3278 R2Bool is_sliding_down_slope;
3279} R2CharacterMovement;
3285typedef struct R2CharacterCollision {
3289 struct R2ColliderHandle collider;
3293 struct R2Pose character_pos;
3297 struct R2Vector translation_applied;
3301 struct R2Vector translation_remaining;
3305 struct R2ShapeCastHit hit;
3306} R2CharacterCollision;
3312typedef struct R2PidGains {
3316 struct R2Vector lin_kp;
3320 struct R2Vector lin_ki;
3324 struct R2Vector lin_kd;
3344typedef struct R2PdController {
3348 struct R2Vector lin_kp;
3352 struct R2Vector lin_kd;
3371typedef struct R2VelocityCorrection {
3375 struct R2Vector linear;
3379 R2AngVector angularVelocity;
3380} R2VelocityCorrection;
3386typedef struct R2CharacterControllerSettings {
3394 R2Real max_slope_climb_angle;
3398 R2Real min_slope_slide_angle;
3402 R2Bool snap_to_ground;
3406 struct R2CharacterLength snap_distance;
3407} R2CharacterControllerSettings;
3409#if defined(RAPIER_DIM3)
3414typedef struct R2WheelTuning {
3418 R2Real suspension_stiffness;
3422 R2Real suspension_compression;
3426 R2Real suspension_damping;
3430 R2Real max_suspension_travel;
3434 R2Real friction_slip;
3438 R2Real max_suspension_force;
3442 R2Real side_friction_stiffness;
3446#if defined(RAPIER_DIM3)
3451typedef struct R2WheelState {
3455 struct R2Vector center;
3459 struct R2Vector suspension;
3463 struct R2Vector axle;
3471 R2Real suspension_force;
3475 R2Real suspension_length;
3479 R2Bool is_in_contact;
3483 struct R2ColliderHandle ground_object;
3487 struct R2Vector contact_point;
3491 struct R2Vector contact_normal;
3502typedef void (
RAPIER_CALL *R2ErrorCallback)(R2Status,
const char*,
void*);
3509typedef struct R2ErrorHandler {
3513 R2ErrorCallback callback;
3524typedef struct R2JointBodies {
3528 struct R2RigidBodyHandle body1;
3532 struct R2RigidBodyHandle body2;
3539typedef struct R2InverseKinematicsOptions {
3551 uint8_t constrained_axes;
3555 R2Real epsilon_linear;
3559 R2Real epsilon_angular;
3560} R2InverseKinematicsOptions;
3566typedef R2Bool (
RAPIER_CALL *R2IkJointCanMove)(
void*,
struct R2RigidBodyHandle);
3572typedef struct R2CollisionEvent {
3576 struct R2ColliderHandle collider1;
3580 struct R2ColliderHandle collider2;
3595typedef struct R2ContactForceEvent {
3599 struct R2ColliderHandle collider1;
3603 struct R2ColliderHandle collider2;
3607 struct R2Vector total_force;
3611 R2Real total_force_magnitude;
3615 struct R2Vector max_force_direction;
3619 R2Real max_force_magnitude;
3625} R2ContactForceEvent;
3633typedef int32_t (
RAPIER_CALL *R2PairFilter)(
void *user_data,
3634 const struct R2ReadContext *read,
3635 struct R2ColliderHandle collider1,
3636 struct R2ColliderHandle collider2,
3637 struct R2RigidBodyHandle body1,
3638 struct R2RigidBodyHandle body2);
3644typedef struct R2ContactModification {
3648 struct R2Vector normal;
3665} R2ContactModification;
3671typedef void (
RAPIER_CALL *R2ModifyContacts)(
void *user_data,
3672 const struct R2ReadContext *read,
3673 struct R2ColliderHandle collider1,
3674 struct R2ColliderHandle collider2,
3675 struct R2ContactModification *contact);
3681typedef void (
RAPIER_CALL *R2ModifyContactContext)(
void *user_data,
3682 const struct R2ReadContext *read,
3683 struct R2ColliderHandle collider1,
3684 struct R2ColliderHandle collider2,
3685 struct R2ContactModificationContext *context);
3695typedef struct R2PhysicsHooks {
3703 R2PairFilter filter_contact_pair;
3707 R2PairFilter filter_intersection_pair;
3711 R2ModifyContacts modify_solver_contacts;
3715 R2ModifyContactContext modify_solver_contacts_context;
3722typedef struct R2ByteView {
3726 const uint8_t *data;
3737typedef struct R2DebugLine {
3756typedef struct R2ParticleDestination {
3760 struct R2SoftBodyHandle body;
3765} R2ParticleDestination;
3771typedef struct R2SoftClusterSplit {
3775 uint32_t source_cluster;
3787 struct R2RigidBodyHandle proxy;
3792} R2SoftClusterSplit;
3798typedef struct R2SoftJointMove {
3802 struct R2ImpulseJointHandle
joint;
3806 struct R2RigidBodyHandle from;
3810 struct R2RigidBodyHandle to;
3817typedef struct R2OptionalParticleDestination {
3821 struct R2SoftBodyHandle body;
3830} R2OptionalParticleDestination;
3836typedef struct R2BuildInfo {
3840 uint32_t abi_version;
3852 uint32_t pointer_size;
3859typedef struct R2BuildFeatures {
3867 uint32_t simd_lanes;
3876 R2Bool enhanced_determinism;
3883typedef struct R2ContactPair {
3887 struct R2ColliderHandle collider1;
3891 struct R2ColliderHandle collider2;
3895 R2Bool has_any_active_contact;
3899 struct R2Vector total_impulse;
3903 R2Real total_impulse_magnitude;
3911 struct R2Vector max_impulse_direction;
3918typedef struct R2IntersectionPair {
3922 struct R2ColliderHandle collider1;
3926 struct R2ColliderHandle collider2;
3930 R2Bool intersecting;
3931} R2IntersectionPair;
3937typedef struct R2ContactPoint {
3941 size_t manifold_index;
3945 struct R2Vector local_p1;
3949 struct R2Vector local_p2;
3953 struct R2Vector normal;
3962#if defined(RAPIER_DIM2)
3966 R2Real tangent_impulse[1];
3968#if defined(RAPIER_DIM3)
3972 R2Real tangent_impulse[2];
3976#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
3982typedef struct R2UrdfLoaderOptions {
3986 R2Bool createCollidersFromCollisionShapes;
3990 R2Bool createCollidersFromVisualShapes;
3994 R2Bool applyImportedMassProps;
3998 R2Bool enableJointCollisions;
4002 R2Bool makeRootsFixed;
4006 R2Bool squeezeEmptyFixedLinks;
4010 struct R2Pose shift;
4018 struct R2ColliderDesc colliderBlueprint;
4022 struct R2RigidBodyDesc rigidBodyBlueprint;
4023} R2UrdfLoaderOptions;
4026#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
4032typedef struct R2MjcfLoaderOptions {
4036 R2Bool createCollidersFromCollisionShapes;
4040 R2Bool createCollidersFromVisualShapes;
4044 R2Bool applyImportedMassProps;
4048 R2Bool enableJointCollisions;
4052 R2Bool makeRootsFixed;
4056 R2Bool skipPlaneGeoms;
4060 R2Bool disableJointMotors;
4064 struct R2Pose shift;
4072 struct R2ColliderDesc colliderBlueprint;
4076 struct R2RigidBodyDesc rigidBodyBlueprint;
4077} R2MjcfLoaderOptions;
4080#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
4085typedef struct R2MjcfVisualMesh R2MjcfVisualMesh;
4088#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
4093typedef struct R2RenderMaterial {
4113#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
4118typedef struct R2MjcfVisualMeshInfo {
4122 struct R2Pose local_pose;
4130 struct R2RenderMaterial material;
4138 R2Bool has_material;
4143} R2MjcfVisualMeshInfo;
4150typedef struct R2RigidBodyState {
4154 struct R2Pose position;
4158 struct R2Vector linvel;
4174 struct R2UserData userData;
4181typedef struct R2SoftMeshId {
4196typedef struct R2SoftMeshInfo {
4200 struct R2SoftMeshId id;
4204 struct R2ColliderHandle collider;
4216 R2Bool collision_enabled;
4219#if defined(RAPIER_F32)
4224typedef int32_t R2VoxelCoord;
4227#if defined(RAPIER_F64)
4232typedef int64_t R2VoxelCoord;
4239typedef struct R2VoxelKey {
4248#if defined(RAPIER_DIM3)
4260typedef struct R2VoxelQuery {
4264 struct R2VoxelKey key;
4268 struct R2Vector center;
4272 struct R2Vector size;
4283typedef struct R2JointImpulses {
4287 struct R2Vector linear;
4291 R2AngVector angular;
4295 R2Real limits[R2_JOINT_DOF_COUNT];
4299 R2Real motors[R2_JOINT_DOF_COUNT];
4306typedef struct R2OptionalShapeCastHit {
4310 struct R2ShapeCastHit hit;
4315} R2OptionalShapeCastHit;
4321typedef struct R2OptionalPointProjection {
4325 struct R2PointProjection projection;
4330} R2OptionalPointProjection;
4337typedef struct R2NonlinearRigidMotion {
4341 struct R2Pose start;
4345 struct R2Vector local_center;
4349 struct R2Vector linvel;
4354} R2NonlinearRigidMotion;
4360typedef struct R2OptionalContactPair {
4364 struct R2ContactPair pair;
4369} R2OptionalContactPair;
4375typedef struct R2OptionalIntersectionPair {
4379 struct R2IntersectionPair pair;
4384} R2OptionalIntersectionPair;
4391typedef struct R2ContactManifold {
4395 struct R2Vector local_n1;
4399 struct R2Vector local_n2;
4403 struct R2Vector normal;
4419 size_t num_solver_contacts;
4430typedef struct R2SolverContact {
4434 struct R2Vector point1;
4438 struct R2Vector point2;
4446 struct R2Vector tangent_velocity;
4455typedef void (
RAPIER_CALL *R2CollisionEventCallback)(
void *user_data,
4456 const struct R2ReadContext *read,
4457 const struct R2CollisionEvent *event,
4458 const struct R2ContactPoint *contacts,
4459 size_t contact_count);
4465typedef void (
RAPIER_CALL *R2ContactForceEventCallback)(
void *user_data,
4466 const struct R2ReadContext *read,
4467 const struct R2ContactForceEvent *event);
4476typedef struct R2EventCallbacks {
4484 R2CollisionEventCallback collision_event;
4488 R2ContactForceEventCallback contact_force_event;
4497typedef struct R2DebugRenderStyle {
4501 uint32_t subdivisions;
4505 uint32_t border_subdivisions;
4509 float collider_dynamic_color[4];
4513 float collider_fixed_color[4];
4517 float collider_kinematic_color[4];
4521 float collider_parentless_color[4];
4525 float impulse_joint_anchor_color[4];
4529 float impulse_joint_separation_color[4];
4533 float multibody_joint_anchor_color[4];
4537 float multibody_joint_separation_color[4];
4541 float sleep_color_multiplier[4];
4545 float sleep_eligible_color_multiplier[4];
4549 float disabled_color_multiplier[4];
4553 R2Real rigid_body_axes_length;
4557 float contact_depth_color[4];
4561 float contact_normal_color[4];
4565 R2Real contact_normal_length;
4569 float soft_body_element_color[4];
4573 float soft_body_slack_color[4];
4577 float soft_body_loaded_color[4];
4581 float soft_body_frame_color[4];
4585 float collider_aabb_color[4];
4589 float vertex_pseudo_normal_color[4];
4593 float edge_pseudo_normal_color[4];
4597 R2Real pseudo_normal_length;
4601 float volume_contact_normal_color[4];
4605 float volume_gradient_color[4];
4606} R2DebugRenderStyle;
4618#define R2_NULL_POINTER 1
4624#define R2_INVALID_ARGUMENT 2
4630#define R2_INVALID_HANDLE 3
4636#define R2_BUFFER_TOO_SMALL 4
4642#define R2_UNSUPPORTED 5
4654#define R2_NOT_FOUND 7
4660#define R2_WORLD_BUSY 8
4670RAPIER_API
struct R2SoftBodyMaterial
RAPIER_CALL r2DefaultSoftBodyMaterial(void);
4676RAPIER_API
struct R2SoftRecoverySettings
RAPIER_CALL r2DefaultSoftRecoverySettings(void);
4678#if defined(RAPIER_FEM)
4683RAPIER_API
struct R2SoftFemParameters
RAPIER_CALL r2DefaultSoftFemParameters(void);
4690RAPIER_API
struct R2SoftBodiesSettings
RAPIER_CALL r2DefaultSoftBodiesSettings(void);
4696RAPIER_API
struct R2IntegrationParameters
RAPIER_CALL r2DefaultIntegrationParameters(void);
4702RAPIER_API
struct R2IntegrationParameters
RAPIER_CALL r2IntegrationParameters(const struct R2World *world);
4709R2Status
RAPIER_CALL r2SetIntegrationParameters(
struct R2World *world,
4710 const struct R2IntegrationParameters *data);
4716RAPIER_API
struct R2JointDesc
RAPIER_CALL r2DefaultJointDesc(void);
4722RAPIER_API
struct R2JointDesc
RAPIER_CALL r2FixedJointDesc(void);
4724#if defined(RAPIER_DIM2)
4729RAPIER_API
struct R2JointDesc
RAPIER_CALL r2RevoluteJointDesc(void);
4732#if defined(RAPIER_DIM3)
4737RAPIER_API
struct R2JointDesc
RAPIER_CALL r2RevoluteJointDesc(struct R2Vector axis_vector);
4744RAPIER_API
struct R2JointDesc
RAPIER_CALL r2PrismaticJointDesc(struct R2Vector axis_vector);
4750RAPIER_API
struct R2JointDesc
RAPIER_CALL r2RopeJointDesc(R2Real length);
4757struct R2JointDesc
RAPIER_CALL r2SpringJointDesc(R2Real length,
4761#if defined(RAPIER_DIM3)
4766RAPIER_API
struct R2JointDesc
RAPIER_CALL r2SphericalJointDesc(void);
4769#if defined(RAPIER_DIM2)
4774RAPIER_API
struct R2JointDesc
RAPIER_CALL r2PinSlotJointDesc(struct R2Vector axis_vector);
4783struct R2ImpulseJointHandle
RAPIER_CALL r2InsertImpulseJoint(struct R2RigidBodyHandle body1,
4784 struct R2RigidBodyHandle body2,
4785 const struct R2JointDesc *
joint);
4793struct R2MultibodyJointHandle
RAPIER_CALL r2InsertMultibodyJoint(struct R2RigidBodyHandle body1,
4794 struct R2RigidBodyHandle body2,
4795 const struct R2JointDesc *
joint);
4801RAPIER_API
struct R2SoftBodyDesc
RAPIER_CALL r2DefaultSoftBodyDesc(void);
4808struct R2SoftBodyHandle
RAPIER_CALL r2InsertSoftBody(struct R2World *world,
4809 const struct R2SoftBodyDesc *desc);
4815RAPIER_API
struct R2SoftMeshBindingDesc
RAPIER_CALL r2DefaultSoftMeshBindingDesc(void);
4823struct R2ColliderHandle
RAPIER_CALL r2InsertDeformableCollider(const struct R2ColliderDesc *collider,
4824 const struct R2SoftMeshBindingDesc *binding,
4825 struct R2RigidBodyHandle parent);
4831RAPIER_API
struct R2QueryOptions
RAPIER_CALL r2DefaultQueryOptions(void);
4842struct R2RayHit
RAPIER_CALL r2CastRay(const struct R2World *world,
4843 const struct R2QueryOptions *query_options,
4844 struct R2Vector origin,
4845 struct R2Vector direction,
4857struct R2PointProjection
RAPIER_CALL r2ProjectPoint(const struct R2World *world,
4858 const struct R2QueryOptions *query_options,
4859 struct R2Vector point,
4860 R2Real max_distance,
4871struct R2ShapeCastHit
RAPIER_CALL r2CastShape(const struct R2World *world,
4872 const struct R2QueryOptions *query_options,
4874 struct R2Vector velocity,
4875 const R2SharedShape *shape,
4876 struct R2ShapeCastOptions options);
4886size_t RAPIER_CALL r2IntersectPoint(
const struct R2World *world,
4887 const struct R2QueryOptions *query_options,
4888 struct R2Vector point,
4889 struct R2ColliderHandle *buffer,
4901size_t RAPIER_CALL r2IntersectShape(
const struct R2World *world,
4902 const struct R2QueryOptions *query_options,
4904 const R2SharedShape *shape,
4905 struct R2ColliderHandle *buffer,
4917size_t RAPIER_CALL r2IntersectAabbConservative(
const struct R2World *world,
4918 const struct R2QueryOptions *query_options,
4920 struct R2ColliderHandle *buffer,
4931struct R2RayToi
RAPIER_CALL r2CastRayToi(const struct R2World *world,
4932 const struct R2QueryOptions *query_options,
4933 struct R2Vector origin,
4934 struct R2Vector direction,
4946struct R2OptionalRayHit
RAPIER_CALL r2TryCastRay(const struct R2World *world,
4947 const struct R2QueryOptions *query_options,
4948 struct R2Vector origin,
4949 struct R2Vector direction,
4957RAPIER_API
struct R2RigidBodyDesc
RAPIER_CALL r2DynamicRigidBodyDesc(void);
4963RAPIER_API
struct R2RigidBodyDesc
RAPIER_CALL r2FixedRigidBodyDesc(void);
4969RAPIER_API
struct R2RigidBodyDesc
RAPIER_CALL r2KinematicPositionBasedRigidBodyDesc(void);
4975RAPIER_API
struct R2RigidBodyDesc
RAPIER_CALL r2KinematicVelocityBasedRigidBodyDesc(void);
4981RAPIER_API
struct R2ShapeDesc
RAPIER_CALL r2DefaultShapeDesc(void);
4988RAPIER_API R2SharedShape *
RAPIER_CALL r2ShapeDesc_Build(
const struct R2ShapeDesc *desc);
4994RAPIER_API
struct R2ColliderDesc
RAPIER_CALL r2DefaultColliderDesc(void);
5001RAPIER_API
struct R2ColliderDesc
RAPIER_CALL r2BallColliderDesc(R2Real radius);
5008RAPIER_API
struct R2ColliderDesc
RAPIER_CALL r2CuboidColliderDesc(struct R2Vector half_extents);
5015struct R2RigidBodyHandle
RAPIER_CALL r2InsertRigidBody(struct R2World *world,
5016 const struct R2RigidBodyDesc *desc);
5025struct R2ColliderHandle
RAPIER_CALL r2InsertCollider(struct R2RigidBodyHandle parent,
5026 const struct R2ColliderDesc *desc);
5034struct R2ColliderHandle
RAPIER_CALL r2InsertColliderWithoutParent(struct R2World *world,
5035 const struct R2ColliderDesc *desc);
5041RAPIER_API
struct R2PodLayout
RAPIER_CALL r2PodLayout(void);
5048RAPIER_API
struct R2KinematicCharacterController *
RAPIER_CALL r2NewKinematicCharacterController(
void);
5056R2Status
RAPIER_CALL r2FreeKinematicCharacterController(
struct R2KinematicCharacterController *controller);
5063R2Status
RAPIER_CALL r2KinematicCharacterController_SetUp(
struct R2KinematicCharacterController *controller,
5064 struct R2Vector up);
5071R2Status
RAPIER_CALL r2KinematicCharacterController_SetOffset(
struct R2KinematicCharacterController *controller,
5072 struct R2CharacterLength offset);
5079R2Status
RAPIER_CALL r2KinematicCharacterController_SetSlide(
struct R2KinematicCharacterController *controller,
5087R2Status
RAPIER_CALL r2KinematicCharacterController_SetSlopes(
struct R2KinematicCharacterController *controller,
5088 R2Real max_climb_angle,
5089 R2Real min_slide_angle);
5096R2Status
RAPIER_CALL r2KinematicCharacterController_SetAutostep(
struct R2KinematicCharacterController *controller,
5098 struct R2CharacterLength max_height,
5099 struct R2CharacterLength min_width,
5100 R2Bool include_dynamic_bodies);
5107R2Status
RAPIER_CALL r2KinematicCharacterController_SetSnapToGround(
struct R2KinematicCharacterController *controller,
5109 struct R2CharacterLength distance);
5116struct R2Vector
RAPIER_CALL r2KinematicCharacterController_Up(const struct R2KinematicCharacterController *controller);
5123struct R2CharacterLength
RAPIER_CALL r2KinematicCharacterController_Offset(const struct R2KinematicCharacterController *controller);
5131struct R2CharacterAutostep
RAPIER_CALL r2KinematicCharacterController_Autostep(const struct R2KinematicCharacterController *controller);
5139R2Status
RAPIER_CALL r2KinematicCharacterController_SetNormalNudgeFactor(
struct R2KinematicCharacterController *controller,
5147R2Real
RAPIER_CALL r2KinematicCharacterController_NormalNudgeFactor(
const struct R2KinematicCharacterController *controller);
5157struct R2CharacterMovement
RAPIER_CALL r2KinematicCharacterController_MoveShape(const struct R2World *world,
5158 const struct R2QueryOptions *options,
5159 struct R2KinematicCharacterController *controller,
5161 const R2SharedShape *shape,
5163 struct R2Vector desired_translation);
5171size_t RAPIER_CALL r2KinematicCharacterController_Collisions(
const struct R2KinematicCharacterController *controller,
5172 struct R2CharacterCollision *buffer,
5183R2Status
RAPIER_CALL r2KinematicCharacterController_SolveCharacterCollisionImpulses(
const struct R2KinematicCharacterController *controller,
5184 const R2SharedShape *shape,
5187 const struct R2QueryOptions *options);
5194RAPIER_API
struct R2PidController *
RAPIER_CALL r2NewPidController(
void);
5201RAPIER_API R2Status
RAPIER_CALL r2FreePidController(
struct R2PidController *controller);
5207RAPIER_API
struct R2PidGains
RAPIER_CALL r2PidController_Gains(const struct R2PidController *controller);
5214R2Status
RAPIER_CALL r2PidController_SetGains(
struct R2PidController *controller,
5215 struct R2PidGains gains);
5223R2Status
RAPIER_CALL r2PidController_SetAxes(
struct R2PidController *controller,
5230RAPIER_API uint32_t
RAPIER_CALL r2PidController_Axes(
const struct R2PidController *controller);
5236RAPIER_API R2Status
RAPIER_CALL r2PidController_ResetIntegrals(
struct R2PidController *controller);
5243RAPIER_API
struct R2PdController
RAPIER_CALL r2DefaultPdController(void);
5251struct R2VelocityCorrection
RAPIER_CALL r2PdController_RigidBodyCorrection(const struct R2PdController *controller,
5252 struct R2RigidBodyHandle body,
5253 struct R2Pose target_pose,
5254 struct R2Vector target_linvel,
5255 R2AngVector target_angvel);
5262struct R2VelocityCorrection
RAPIER_CALL r2PidController_RigidBodyCorrection(struct R2PidController *controller,
5264 struct R2RigidBodyHandle body,
5265 struct R2Pose target_pose,
5266 struct R2Vector target_linvel,
5267 R2AngVector target_angvel);
5274struct R2CharacterControllerSettings
RAPIER_CALL r2KinematicCharacterController_Settings(const struct R2KinematicCharacterController *controller);
5276#if defined(RAPIER_DIM3)
5281RAPIER_API
struct R2WheelTuning
RAPIER_CALL r2DefaultWheelTuning(void);
5284#if defined(RAPIER_DIM3)
5291struct R2DynamicRayCastVehicleController *
RAPIER_CALL r2NewDynamicRayCastVehicleController(
struct R2RigidBodyHandle chassis);
5294#if defined(RAPIER_DIM3)
5301R2Status
RAPIER_CALL r2FreeDynamicRayCastVehicleController(
struct R2DynamicRayCastVehicleController *controller);
5304#if defined(RAPIER_DIM3)
5311size_t RAPIER_CALL r2DynamicRayCastVehicleController_AddWheel(
struct R2DynamicRayCastVehicleController *controller,
5312 struct R2Vector connection,
5313 struct R2Vector direction,
5314 struct R2Vector axle,
5317 const struct R2WheelTuning *tuning);
5320#if defined(RAPIER_DIM3)
5326R2Status
RAPIER_CALL r2DynamicRayCastVehicleController_SetAxes(
struct R2DynamicRayCastVehicleController *controller,
5331#if defined(RAPIER_DIM3)
5337R2Status
RAPIER_CALL r2DynamicRayCastVehicleController_SetWheelControls(
struct R2DynamicRayCastVehicleController *controller,
5340 R2Real engine_force,
5344#if defined(RAPIER_DIM3)
5354R2Status
RAPIER_CALL r2DynamicRayCastVehicleController_UpdateVehicle(
struct R2DynamicRayCastVehicleController *controller,
5356 const struct R2QueryOptions *options);
5359#if defined(RAPIER_DIM3)
5365R2Real
RAPIER_CALL r2DynamicRayCastVehicleController_CurrentVehicleSpeed(
const struct R2DynamicRayCastVehicleController *controller);
5368#if defined(RAPIER_DIM3)
5375size_t RAPIER_CALL r2DynamicRayCastVehicleController_Wheels(
const struct R2DynamicRayCastVehicleController *controller,
5376 struct R2WheelState *buffer,
5386R2Status
RAPIER_CALL r2RigidBodyPropagateModifiedBodyPositionsToColliders(
struct R2World *world);
5394size_t RAPIER_CALL r2ActiveRigidBodies(
const struct R2World *world,
5395 struct R2RigidBodyHandle *buffer,
5402RAPIER_API R2Status
RAPIER_CALL r2RigidBody_WakeUp(
struct R2RigidBodyHandle handle, R2Bool strong);
5411RAPIER_API
struct R2ErrorHandler
RAPIER_CALL r2SetErrorHandler(struct R2ErrorHandler handler);
5420RAPIER_API R2Status
RAPIER_CALL r2LastStatus(
void);
5426RAPIER_API
const char *
RAPIER_CALL r2LastError(
void);
5432RAPIER_API R2SharedShape *
RAPIER_CALL r2BallSharedShape(R2Real radius);
5438RAPIER_API R2SharedShape *
RAPIER_CALL r2CuboidSharedShape(
struct R2Vector half_extents);
5445R2SharedShape *
RAPIER_CALL r2RoundCuboidSharedShape(
struct R2Vector half_extents,
5446 R2Real border_radius);
5453R2SharedShape *
RAPIER_CALL r2CapsuleSharedShape(
struct R2Vector a,
5461RAPIER_API R2SharedShape *
RAPIER_CALL r2SegmentSharedShape(
struct R2Vector a,
struct R2Vector b);
5468R2SharedShape *
RAPIER_CALL r2TriangleSharedShape(
struct R2Vector a,
5476RAPIER_API R2SharedShape *
RAPIER_CALL r2HalfspaceSharedShape(
struct R2Vector normal);
5478#if defined(RAPIER_DIM3)
5483RAPIER_API R2SharedShape *
RAPIER_CALL r2CylinderSharedShape(R2Real half_height, R2Real radius);
5486#if defined(RAPIER_DIM3)
5491RAPIER_API R2SharedShape *
RAPIER_CALL r2ConeSharedShape(R2Real half_height, R2Real radius);
5499RAPIER_API R2SharedShape *
RAPIER_CALL r2CompoundSharedShape(
struct R2CompoundShapeView children);
5505RAPIER_API R2Status
RAPIER_CALL r2RemoveCollider(
struct R2ColliderHandle handle, R2Bool wake_up);
5511RAPIER_API R2Status
RAPIER_CALL r2RemoveImpulseJoint(
struct R2ImpulseJointHandle handle, R2Bool wake_up);
5519size_t RAPIER_CALL r2ImpulseJointHandles(
const struct R2World *world,
5520 struct R2ImpulseJointHandle *buffer,
5528R2Status
RAPIER_CALL r2RemoveMultibodyJoint(
struct R2MultibodyJointHandle handle,
5537size_t RAPIER_CALL r2MultibodyJointHandles(
const struct R2World *world,
5538 struct R2MultibodyJointHandle *buffer,
5545RAPIER_API
struct R2JointBodies
RAPIER_CALL r2ImpulseJoint_Bodies(struct R2ImpulseJointHandle handle);
5551RAPIER_API
struct R2InverseKinematicsOptions
RAPIER_CALL r2DefaultInverseKinematicsOptions(void);
5559RAPIER_API
size_t RAPIER_CALL r2MultibodyJoint_Ndofs(
struct R2MultibodyJointHandle handle);
5566R2Status
RAPIER_CALL r2MultibodyJoint_InverseKinematics(
struct R2MultibodyJointHandle handle,
5567 const struct R2InverseKinematicsOptions *options,
5568 struct R2Pose target,
5569 R2IkJointCanMove can_move,
5571 R2Real *displacements,
5579R2Status
RAPIER_CALL r2MultibodyJoint_ApplyDisplacements(
struct R2MultibodyJointHandle handle,
5580 const R2Real *displacements,
5587RAPIER_API R2Status
RAPIER_CALL r2FreeSharedShape(R2SharedShape *
object);
5594RAPIER_API R2SharedShape *
RAPIER_CALL r2SharedShape_Clone(
const R2SharedShape *
object);
5600RAPIER_API
size_t RAPIER_CALL r2RigidBodyCount(
const struct R2World *world);
5608size_t RAPIER_CALL r2RigidBodyHandles(
const struct R2World *world,
5609 struct R2RigidBodyHandle *buffer,
5617RAPIER_API R2Bool
RAPIER_CALL r2RigidBody_Contains(
struct R2RigidBodyHandle handle);
5623RAPIER_API
size_t RAPIER_CALL r2ColliderCount(
const struct R2World *world);
5631size_t RAPIER_CALL r2ColliderHandles(
const struct R2World *world,
5632 struct R2ColliderHandle *buffer,
5639RAPIER_API R2Bool
RAPIER_CALL r2Collider_Contains(
struct R2ColliderHandle handle);
5645RAPIER_API
size_t RAPIER_CALL r2SoftBodyCount(
const struct R2World *world);
5653size_t RAPIER_CALL r2SoftBodyHandles(
const struct R2World *world,
5654 struct R2SoftBodyHandle *buffer,
5662RAPIER_API R2Bool
RAPIER_CALL r2SoftBody_Contains(
struct R2SoftBodyHandle handle);
5672R2Status
RAPIER_CALL r2RemoveRigidBody(
struct R2RigidBodyHandle handle,
5673 R2Bool remove_attached_colliders);
5679RAPIER_API R2Real
RAPIER_CALL r2TimeStep(
const struct R2World *world);
5685RAPIER_API R2Status
RAPIER_CALL r2SetTimeStep(
struct R2World *world, R2Real value);
5691RAPIER_API R2Real
RAPIER_CALL r2MinCcdDt(
const struct R2World *world);
5697RAPIER_API R2Status
RAPIER_CALL r2SetMinCcdDt(
struct R2World *world, R2Real value);
5703RAPIER_API R2Real
RAPIER_CALL r2LengthUnit(
const struct R2World *world);
5709RAPIER_API R2Status
RAPIER_CALL r2SetLengthUnit(
struct R2World *world, R2Real value);
5715RAPIER_API R2Real
RAPIER_CALL r2WarmstartCoefficient(
const struct R2World *world);
5721RAPIER_API R2Status
RAPIER_CALL r2SetWarmstartCoefficient(
struct R2World *world, R2Real value);
5727RAPIER_API R2Real
RAPIER_CALL r2NormalizedAllowedLinearError(
const struct R2World *world);
5733RAPIER_API R2Status
RAPIER_CALL r2SetNormalizedAllowedLinearError(
struct R2World *world, R2Real value);
5740RAPIER_API R2Real
RAPIER_CALL r2NormalizedMaxCorrectiveVelocity(
const struct R2World *world);
5747R2Status
RAPIER_CALL r2SetNormalizedMaxCorrectiveVelocity(
struct R2World *world,
5754RAPIER_API R2Real
RAPIER_CALL r2NormalizedPredictionDistance(
const struct R2World *world);
5760RAPIER_API R2Status
RAPIER_CALL r2SetNormalizedPredictionDistance(
struct R2World *world, R2Real value);
5766RAPIER_API R2Real
RAPIER_CALL r2NormalizedMaxLinearVelocity(
const struct R2World *world);
5772RAPIER_API R2Status
RAPIER_CALL r2SetNormalizedMaxLinearVelocity(
struct R2World *world, R2Real value);
5779RAPIER_API R2Real
RAPIER_CALL r2NormalizedContactRecycleDistance(
const struct R2World *world);
5786R2Status
RAPIER_CALL r2SetNormalizedContactRecycleDistance(
struct R2World *world,
5793RAPIER_API
size_t RAPIER_CALL r2NumSolverIterations(
const struct R2World *world);
5799RAPIER_API R2Status
RAPIER_CALL r2SetNumSolverIterations(
struct R2World *world,
size_t value);
5805RAPIER_API
size_t RAPIER_CALL r2NumInternalPgsIterations(
const struct R2World *world);
5811RAPIER_API R2Status
RAPIER_CALL r2SetNumInternalPgsIterations(
struct R2World *world,
size_t value);
5818RAPIER_API
size_t RAPIER_CALL r2NumInternalStabilizationIterations(
const struct R2World *world);
5826R2Status
RAPIER_CALL r2SetNumInternalStabilizationIterations(
struct R2World *world,
5833RAPIER_API
size_t RAPIER_CALL r2MaxCcdSubsteps(
const struct R2World *world);
5839RAPIER_API R2Status
RAPIER_CALL r2SetMaxCcdSubsteps(
struct R2World *world,
size_t value);
5845RAPIER_API R2Bool
RAPIER_CALL r2ContactClustering(
const struct R2World *world);
5851RAPIER_API R2Status
RAPIER_CALL r2SetContactClustering(
struct R2World *world, R2Bool value);
5857RAPIER_API R2Bool
RAPIER_CALL r2ContactRecycling(
const struct R2World *world);
5863RAPIER_API R2Status
RAPIER_CALL r2SetContactRecycling(
struct R2World *world, R2Bool value);
5869RAPIER_API R2Bool
RAPIER_CALL r2FrictionInBiasPass(
const struct R2World *world);
5875RAPIER_API R2Status
RAPIER_CALL r2SetFrictionInBiasPass(
struct R2World *world, R2Bool value);
5881RAPIER_API R2Bool
RAPIER_CALL r2WarmstartJoints(
const struct R2World *world);
5887RAPIER_API R2Status
RAPIER_CALL r2SetWarmstartJoints(
struct R2World *world, R2Bool value);
5893RAPIER_API
struct R2SpringCoefficients
RAPIER_CALL r2ContactSoftness(const struct R2World *world);
5900R2Status
RAPIER_CALL r2SetContactSoftness(
struct R2World *world,
5901 struct R2SpringCoefficients value);
5907RAPIER_API
struct R2SpringCoefficients
RAPIER_CALL r2StaticContactSoftness(const struct R2World *world);
5914R2Status
RAPIER_CALL r2SetStaticContactSoftness(
struct R2World *world,
5915 struct R2SpringCoefficients value);
5922R2Status
RAPIER_CALL r2ContactModificationContext_UpdateAsOnewayPlatform(
struct R2ContactModificationContext *context,
5923 struct R2Vector allowed_local_n1,
5924 R2Real allowed_angle);
5931R2Status
RAPIER_CALL r2ContactModificationContext_SetTangentVelocity(
struct R2ContactModificationContext *context,
5932 struct R2Vector velocity);
5938RAPIER_API
struct R2EventCollector *
RAPIER_CALL r2NewEventCollector(
void);
5945RAPIER_API R2Status
RAPIER_CALL r2FreeEventCollector(
struct R2EventCollector *events);
5951RAPIER_API R2Status
RAPIER_CALL r2EventCollector_Clear(
struct R2EventCollector *events);
5959size_t RAPIER_CALL r2EventCollector_CollisionEvents(
const struct R2EventCollector *events,
5960 struct R2CollisionEvent *buffer,
5969size_t RAPIER_CALL r2EventCollector_ContactForceEvents(
const struct R2EventCollector *events,
5970 struct R2ContactForceEvent *buffer,
5977RAPIER_API
size_t RAPIER_CALL r2EventCollector_TearEventCount(
const struct R2EventCollector *events);
5985struct R2SoftBodyTearEvent *
RAPIER_CALL r2EventCollector_TearEvent(
const struct R2EventCollector *events,
5992RAPIER_API
struct R2Vector
RAPIER_CALL r2Gravity(const struct R2World *world);
5998RAPIER_API R2Status
RAPIER_CALL r2SetGravity(
struct R2World *world,
struct R2Vector value);
6008 const struct R2PhysicsHooks *hooks,
6009 const struct R2EventCollector *events);
6017R2Status
RAPIER_CALL r2DetectCollisions(
struct R2World *world,
6018 const struct R2PhysicsHooks *hooks,
6019 const struct R2EventCollector *events);
6026RAPIER_API
struct R2ByteView
RAPIER_CALL r2Bytes_Data(const struct R2Bytes *bytes);
6033RAPIER_API R2Status
RAPIER_CALL r2FreeBytes(
struct R2Bytes *bytes);
6040RAPIER_API
struct R2Bytes *
RAPIER_CALL r2SerializeWorld(
const struct R2World *world);
6047RAPIER_API
struct R2World *
RAPIER_CALL r2DeserializeWorld(
const uint8_t *data,
size_t count);
6056size_t RAPIER_CALL r2DebugRender(
const struct R2World *world,
6058 struct R2DebugLine *buffer,
6065RAPIER_API R2Status
RAPIER_CALL r2SoftBodiesSetResweepStrain(
struct R2World *world, R2Real value);
6071RAPIER_API R2Real
RAPIER_CALL r2SoftBodiesResweepStrain(
const struct R2World *world);
6077RAPIER_API R2Status
RAPIER_CALL r2SoftBodiesSetContactStiffening(
struct R2World *world, R2Real value);
6083RAPIER_API R2Real
RAPIER_CALL r2SoftBodiesContactStiffening(
const struct R2World *world);
6089RAPIER_API R2Status
RAPIER_CALL r2SoftBodiesSetMaxExtraSubsteps(
struct R2World *world,
size_t value);
6095RAPIER_API
size_t RAPIER_CALL r2SoftBodiesMaxExtraSubsteps(
const struct R2World *world);
6102R2Status
RAPIER_CALL r2RecoverySetAuthoredVelocityMargin(
struct R2World *world,
6109RAPIER_API R2Status
RAPIER_CALL r2RecoverySetEdgeSpeculation(
struct R2World *world, R2Bool value);
6116R2Status
RAPIER_CALL r2RecoverySetInvertedCellDetection(
struct R2World *world,
6124R2Status
RAPIER_CALL r2RecoverySetSelfCrossingDetection(
struct R2World *world,
6132R2Status
RAPIER_CALL r2RecoverySetDetectionMotionGating(
struct R2World *world,
6139RAPIER_API R2Status
RAPIER_CALL r2RecoverySetCrossBodyDetection(
struct R2World *world, R2Bool value);
6145RAPIER_API R2Status
RAPIER_CALL r2RecoverySetSelfStandDown(
struct R2World *world, R2Bool value);
6151RAPIER_API R2Status
RAPIER_CALL r2RecoverySetCrossBodyExpelGate(
struct R2World *world, R2Bool value);
6157RAPIER_API R2Status
RAPIER_CALL r2RecoverySetEdgeStandDown(
struct R2World *world, R2Bool value);
6163RAPIER_API R2Status
RAPIER_CALL r2RecoverySetCrossingRepulsion(
struct R2World *world, R2Bool value);
6170R2Status
RAPIER_CALL r2RecoverySetCrossingRepulsionGuide(
struct R2World *world,
6178R2Status
RAPIER_CALL r2RecoverySetCrossingRepulsionSelfGuide(
struct R2World *world,
6185RAPIER_API R2Status
RAPIER_CALL r2RecoverySetRecoveryPace(
struct R2World *world, R2Real value);
6191RAPIER_API R2Status
RAPIER_CALL r2RecoverySetOverlapConstraints(
struct R2World *world, R2Bool value);
6197RAPIER_API R2Status
RAPIER_CALL r2RecoverySetOverlapRigid(
struct R2World *world, R2Bool value);
6204R2Status
RAPIER_CALL r2RecoverySetOverlapSkipSelfTangled(
struct R2World *world,
6212R2Status
RAPIER_CALL r2RecoverySetOverlapEdgeStandDown(
struct R2World *world,
6220R2Status
RAPIER_CALL r2RecoverySetOverlapConstraintPace(
struct R2World *world,
6227RAPIER_API R2Status
RAPIER_CALL r2RecoverySetOverlapSkinVolume(
struct R2World *world, R2Bool value);
6233RAPIER_API R2Status
RAPIER_CALL r2RecoverySetOverlapKeptDepth(
struct R2World *world, R2Real value);
6239RAPIER_API R2Status
RAPIER_CALL r2RecoverySetOverlapSelfRegions(
struct R2World *world, R2Bool value);
6245RAPIER_API R2Status
RAPIER_CALL r2RecoverySetOverlapNormalPush(
struct R2World *world, R2Bool value);
6251RAPIER_API R2Status
RAPIER_CALL r2RecoverySetOverlapMultiVolume(
struct R2World *world, R2Bool value);
6258R2Status
RAPIER_CALL r2RecoverySetOverlapProgressMargin(
struct R2World *world,
6261#if defined(RAPIER_FEM)
6266RAPIER_API R2Status
RAPIER_CALL r2FemSetLinearTolerance(
struct R2World *world, R2Real value);
6269#if defined(RAPIER_FEM)
6274RAPIER_API R2Status
RAPIER_CALL r2FemSetMaxLinearIterations(
struct R2World *world,
size_t value);
6277#if defined(RAPIER_FEM)
6282RAPIER_API R2Status
RAPIER_CALL r2FemSetMaxDenseDofs(
struct R2World *world,
size_t value);
6292RAPIER_API R2Status
RAPIER_CALL r2SetNumThreads(
struct R2World *world,
size_t num_threads);
6300RAPIER_API R2Status
RAPIER_CALL r2ClearThreadPool(
struct R2World *world);
6307RAPIER_API
size_t RAPIER_CALL r2NumThreads(
const struct R2World *world);
6314RAPIER_API R2Status
RAPIER_CALL r2SetCountersEnabled(
struct R2World *world, R2Bool enabled);
6322RAPIER_API
double RAPIER_CALL r2StepTimeMs(
const struct R2World *world);
6332RAPIER_API
struct R2World *
RAPIER_CALL r2DeserializeRigidState(
const uint8_t *data,
size_t count);
6338RAPIER_API
struct R2QueryFilter
RAPIER_CALL r2DefaultQueryFilter(void);
6344RAPIER_API
struct R2ShapeCastOptions
RAPIER_CALL r2DefaultShapeCastOptions(void);
6350RAPIER_API R2Status
RAPIER_CALL r2RemoveSoftBody(
struct R2SoftBodyHandle handle);
6356RAPIER_API R2Status
RAPIER_CALL r2SoftBody_WakeUp(
struct R2SoftBodyHandle handle);
6363RAPIER_API R2Status
RAPIER_CALL r2FreeSoftBodyTearEvent(
struct R2SoftBodyTearEvent *event);
6370struct R2SoftBodyHandle
RAPIER_CALL r2SoftBodyTearEvent_SoftBody(const struct R2SoftBodyTearEvent *event);
6380size_t RAPIER_CALL r2SoftBodyTearEvent_Bodies(
const struct R2SoftBodyTearEvent *event,
6381 struct R2SoftBodyHandle *buffer,
6389struct R2ParticleDestination
RAPIER_CALL r2SoftBodyTearEvent_ParticleDestination(const struct R2SoftBodyTearEvent *event,
6398size_t RAPIER_CALL r2SoftBodyTearEvent_TornEdges(
const struct R2SoftBodyTearEvent *event,
6408size_t RAPIER_CALL r2SoftBodyTearEvent_TornCells(
const struct R2SoftBodyTearEvent *event,
6418size_t RAPIER_CALL r2SoftBodyTearEvent_RemovedEdges(
const struct R2SoftBodyTearEvent *event,
6428size_t RAPIER_CALL r2SoftBodyTearEvent_SplitParticles(
const struct R2SoftBodyTearEvent *event,
6438size_t RAPIER_CALL r2SoftBodyTearEvent_InsertedParticles(
const struct R2SoftBodyTearEvent *event,
6450size_t RAPIER_CALL r2SoftBodyTearEvent_PieceParticles(
const struct R2SoftBodyTearEvent *event,
6461size_t RAPIER_CALL r2SoftBodyTearEvent_Clusters(
const struct R2SoftBodyTearEvent *event,
6462 struct R2SoftClusterSplit *buffer,
6471size_t RAPIER_CALL r2SoftBodyTearEvent_MovedJoints(
const struct R2SoftBodyTearEvent *event,
6472 struct R2SoftJointMove *buffer,
6481struct R2SoftBodyTearEvent *
RAPIER_CALL r2SoftBody_Tear(
struct R2SoftBodyHandle handle,
6482 const uint32_t *edges,
6484 const uint32_t *cells,
6492uint32_t
RAPIER_CALL r2SoftBody_AddCluster(
struct R2SoftBodyHandle handle,
6493 const uint32_t *particles,
6501R2Status
RAPIER_CALL r2SoftBody_RemoveCluster(
struct R2SoftBodyHandle handle,
6510struct R2OptionalParticleDestination
RAPIER_CALL r2SoftBodyTearEvent_TryParticleDestination(const struct R2SoftBodyTearEvent *event,
6519struct R2SoftBodyTearEvent *
RAPIER_CALL r2CutSoftBody(
struct R2SoftBodyHandle handle,
6520 const struct R2Vector *blade);
6527RAPIER_API
struct R2VolumeMeshParameters
RAPIER_CALL r2NewVolumeMeshParameters(R2Real cell_size);
6533RAPIER_API
struct R2BuildInfo
RAPIER_CALL r2BuildInfo(void);
6542RAPIER_API
const char *
RAPIER_CALL r2Version(
void);
6551RAPIER_API
const char *
RAPIER_CALL r2BuildProfile(
void);
6557RAPIER_API
struct R2BuildFeatures
RAPIER_CALL r2BuildFeatures(void);
6565R2SharedShape *
RAPIER_CALL r2HeightfieldSharedShape(
struct R2RealView heights,
6568 struct R2Vector scale);
6575struct R2Aabb
RAPIER_CALL r2SharedShape_ComputeAabb(const R2SharedShape *shape,
6576 struct R2Pose pose);
6583struct R2MassProperties
RAPIER_CALL r2SharedShape_MassProperties(const R2SharedShape *shape,
6591R2Bool
RAPIER_CALL r2SharedShape_ContainsPoint(
const R2SharedShape *shape,
6593 struct R2Vector point);
6601size_t RAPIER_CALL r2ContactPairs(
const struct R2World *world,
6602 struct R2ContactPair *buffer,
6611struct R2ContactPair
RAPIER_CALL r2ContactPair(struct R2ColliderHandle collider1,
6612 struct R2ColliderHandle collider2);
6620size_t RAPIER_CALL r2IntersectionPairs(
const struct R2World *world,
6621 struct R2IntersectionPair *buffer,
6634size_t RAPIER_CALL r2ContactPoints(
struct R2ColliderHandle collider1,
6635 struct R2ColliderHandle collider2,
6636 struct R2ContactPoint *buffer,
6645size_t RAPIER_CALL r2MultibodyJoint_GeneralizedVelocity(
struct R2MultibodyJointHandle handle,
6654R2Status
RAPIER_CALL r2MultibodyJoint_SetGeneralizedVelocity(
struct R2MultibodyJointHandle handle,
6655 const R2Real *values,
6683size_t RAPIER_CALL r2QuarantinedRigidBodies(
const struct R2World *world,
6684 struct R2RigidBodyHandle *buffer,
6696size_t RAPIER_CALL r2QuarantinedColliders(
const struct R2World *world,
6697 struct R2ColliderHandle *buffer,
6709size_t RAPIER_CALL r2QuarantinedSoftBodies(
const struct R2World *world,
6710 struct R2SoftBodyHandle *buffer,
6713#if defined(RAPIER_DIM3)
6718RAPIER_API uint32_t
RAPIER_CALL r2FrictionModel(
const struct R2World *world);
6721#if defined(RAPIER_DIM3)
6726RAPIER_API R2Status
RAPIER_CALL r2SetFrictionModel(
struct R2World *world, uint32_t value);
6765RAPIER_API R2Real
RAPIER_CALL r2Atan2(R2Real y, R2Real x);
6783RAPIER_API R2Real
RAPIER_CALL r2Powf(R2Real base, R2Real exponent);
6791struct R2ShapeMesh *
RAPIER_CALL r2SharedShape_Tessellate(
const R2SharedShape *shape,
6792 uint32_t subdivisions);
6800size_t RAPIER_CALL r2ShapeMesh_Triangles(
const struct R2ShapeMesh *mesh,
6801 struct R2Vector *buffer,
6810size_t RAPIER_CALL r2ShapeMesh_Lines(
const struct R2ShapeMesh *mesh,
6811 struct R2Vector *buffer,
6819RAPIER_API R2Status
RAPIER_CALL r2FreeShapeMesh(
struct R2ShapeMesh *mesh);
6821#if defined(RAPIER_DIM3)
6827R2SharedShape *
RAPIER_CALL r2RoundCylinderSharedShape(R2Real half_height,
6829 R2Real border_radius);
6832#if defined(RAPIER_DIM3)
6838R2SharedShape *
RAPIER_CALL r2RoundConeSharedShape(R2Real half_height,
6840 R2Real border_radius);
6843#if defined(RAPIER_DIM3)
6852struct R2TriMeshData *
RAPIER_CALL r2SharedShape_ToTrimesh(
const R2SharedShape *shape,
6857#if defined(RAPIER_DIM3)
6864size_t RAPIER_CALL r2TriMeshData_Vertices(
const struct R2TriMeshData *mesh,
6865 struct R2Vector *buffer,
6869#if defined(RAPIER_DIM3)
6876size_t RAPIER_CALL r2TriMeshData_Indices(
const struct R2TriMeshData *mesh,
6881#if defined(RAPIER_DIM3)
6887RAPIER_API R2Status
RAPIER_CALL r2FreeTriMeshData(
struct R2TriMeshData *mesh);
6890#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6895RAPIER_API
struct R2UrdfLoaderOptions
RAPIER_CALL r2DefaultUrdfLoaderOptions(void);
6898#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6904RAPIER_API R2Status
RAPIER_CALL r2FreeUrdfRobot(
struct R2UrdfRobot *
object);
6907#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6914struct R2UrdfRobot *
RAPIER_CALL r2UrdfRobotFromFile(
const char *path,
6915 const struct R2UrdfLoaderOptions *options);
6918#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6924R2Status
RAPIER_CALL r2UrdfRobot_AppendTransform(
struct R2UrdfRobot *robot,
6925 struct R2Pose transform);
6928#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6934RAPIER_API R2Status
RAPIER_CALL r2FreeUrdfRobotHandles(
struct R2UrdfRobotHandles *handles);
6937#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6943struct R2UrdfRobotHandles *
RAPIER_CALL r2UrdfRobot_InsertUsingImpulseJoints(
struct R2World *world,
6944 const struct R2UrdfRobot *robot);
6947#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6953struct R2UrdfRobotHandles *
RAPIER_CALL r2UrdfRobot_InsertUsingMultibodyJoints(
struct R2World *world,
6954 const struct R2UrdfRobot *robot,
6958#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6966size_t RAPIER_CALL r2UrdfRobotHandles_Bodies(
const struct R2UrdfRobotHandles *handles,
6967 struct R2RigidBodyHandle *buffer,
6971#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6976RAPIER_API
struct R2MjcfLoaderOptions
RAPIER_CALL r2DefaultMjcfLoaderOptions(void);
6979#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6985RAPIER_API R2Status
RAPIER_CALL r2FreeMjcfRobot(
struct R2MjcfRobot *
object);
6988#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6995struct R2MjcfRobot *
RAPIER_CALL r2MjcfRobotFromFile(
const char *path,
6996 const struct R2MjcfLoaderOptions *options);
6999#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7005R2Status
RAPIER_CALL r2MjcfRobot_AppendTransform(
struct R2MjcfRobot *robot,
7006 struct R2Pose transform);
7009#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7015RAPIER_API R2Status
RAPIER_CALL r2FreeMjcfRobotHandles(
struct R2MjcfRobotHandles *handles);
7018#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7024struct R2MjcfRobotHandles *
RAPIER_CALL r2MjcfRobot_InsertUsingImpulseJoints(
struct R2World *world,
7025 const struct R2MjcfRobot *robot);
7028#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7034struct R2MjcfRobotHandles *
RAPIER_CALL r2MjcfRobot_InsertUsingMultibodyJoints(
struct R2World *world,
7035 const struct R2MjcfRobot *robot,
7039#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7046size_t RAPIER_CALL r2MjcfRobotHandles_Bodies(
const struct R2MjcfRobotHandles *handles,
7047 struct R2RigidBodyHandle *buffer,
7051#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7056RAPIER_API
struct R2Vector
RAPIER_CALL r2MjcfRobot_Gravity(const struct R2MjcfRobot *robot);
7059#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7064RAPIER_API
size_t RAPIER_CALL r2MjcfRobot_BodyCount(
const struct R2MjcfRobot *robot);
7067#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7072RAPIER_API
size_t RAPIER_CALL r2MjcfRobot_BodyColliderCount(
const struct R2MjcfRobot *robot,
size_t body);
7075#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7081R2Status
RAPIER_CALL r2MjcfRobot_SetBodyColliderCollisionGroups(
struct R2MjcfRobot *robot,
7084 struct R2InteractionGroups groups);
7087#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7092RAPIER_API
size_t RAPIER_CALL r2MjcfRobot_KeyframeCount(
const struct R2MjcfRobot *robot);
7095#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7102size_t RAPIER_CALL r2MjcfRobot_KeyframeName(
const struct R2MjcfRobot *robot,
7108#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7114R2Status
RAPIER_CALL r2MjcfRobot_AppendKeyframe(
struct R2MjcfRobot *robot,
7115 const struct R2MjcfRobot *source,
7119#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7126size_t RAPIER_CALL r2MjcfRobot_KeyframeControls(
const struct R2MjcfRobot *robot,
7132#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7137RAPIER_API
size_t RAPIER_CALL r2MjcfRobotHandles_ActuatorCount(
const struct R2MjcfRobotHandles *handles);
7140#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7146R2Status
RAPIER_CALL r2MjcfRobotHandles_ApplyKeyframe(
const struct R2MjcfRobotHandles *handles,
7147 const struct R2MjcfRobot *robot,
7151#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7157R2Status
RAPIER_CALL r2MjcfRobotHandles_ApplyControlsScaled(
const struct R2MjcfRobotHandles *handles,
7158 const R2Real *controls,
7163#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7168RAPIER_API
size_t RAPIER_CALL r2MjcfRobot_BodyVisualCount(
const struct R2MjcfRobot *robot,
size_t body);
7171#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7178const R2MjcfVisualMesh *
RAPIER_CALL r2MjcfRobot_BodyVisual(
const struct R2MjcfRobot *robot,
7183#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7188RAPIER_API
struct R2MjcfVisualMeshInfo
RAPIER_CALL r2MjcfVisualMesh_Info(const R2MjcfVisualMesh *visual);
7191#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7197RAPIER_API R2SharedShape *
RAPIER_CALL r2MjcfVisualMesh_CloneShape(
const R2MjcfVisualMesh *visual);
7200#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7207size_t RAPIER_CALL r2MjcfVisualMesh_Uvs(
const R2MjcfVisualMesh *visual,
7212#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7219size_t RAPIER_CALL r2MjcfVisualMesh_Normals(
const R2MjcfVisualMesh *visual,
7224#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7231size_t RAPIER_CALL r2MjcfVisualMesh_Texture(
const R2MjcfVisualMesh *visual,
7236#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7244struct R2UrdfRobot *
RAPIER_CALL r2UrdfRobotFromString(
const char *urdf,
7245 const char *mesh_dir,
7246 const struct R2UrdfLoaderOptions *options);
7249#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7255RAPIER_API R2Status
RAPIER_CALL r2FreeMjcfContactHooks(
struct R2MjcfContactHooks *hooks);
7258#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7265struct R2MjcfContactHooks *
RAPIER_CALL r2MjcfRobotHandles_ContactHooks(
const struct R2MjcfRobotHandles *handles,
7266 const struct R2MjcfRobot *robot);
7269#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7277struct R2PhysicsHooks
RAPIER_CALL r2MjcfContactHooks_PhysicsHooks(const struct R2MjcfContactHooks *hooks);
7280#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7286RAPIER_API R2Status
RAPIER_CALL r2FreeLoadedMeshes(
struct R2LoadedMeshes *meshes);
7289#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7298struct R2LoadedMeshes *
RAPIER_CALL r2LoadedMeshesFromFile(
const char *path,
7300 uint32_t trimesh_flags,
7301 struct R2Vector scale);
7304#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7309RAPIER_API
size_t RAPIER_CALL r2LoadedMeshes_Count(
const struct R2LoadedMeshes *meshes);
7312#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7320R2SharedShape *
RAPIER_CALL r2LoadedMeshes_CloneShape(
const struct R2LoadedMeshes *meshes,
7324#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7331struct R2Pose
RAPIER_CALL r2LoadedMeshes_Pose(const struct R2LoadedMeshes *meshes,
7339RAPIER_API
struct R2Pose
RAPIER_CALL r2RigidBody_Position(struct R2RigidBodyHandle handle);
7345RAPIER_API
struct R2Vector
RAPIER_CALL r2RigidBody_Translation(struct R2RigidBodyHandle handle);
7351RAPIER_API
struct R2Vector
RAPIER_CALL r2RigidBody_Linvel(struct R2RigidBodyHandle handle);
7357RAPIER_API R2AngVector
RAPIER_CALL r2RigidBody_Angvel(
struct R2RigidBodyHandle handle);
7363RAPIER_API R2Bool
RAPIER_CALL r2RigidBody_IsSleeping(
struct R2RigidBodyHandle handle);
7369RAPIER_API R2Bool
RAPIER_CALL r2RigidBody_IsEnabled(
struct R2RigidBodyHandle handle);
7375RAPIER_API
struct R2UserData
RAPIER_CALL r2RigidBody_UserData(struct R2RigidBodyHandle handle);
7383R2Status
RAPIER_CALL r2RigidBody_SetPosition(
struct R2RigidBodyHandle handle,
7384 struct R2Pose value,
7393R2Status
RAPIER_CALL r2RigidBody_SetTranslation(
struct R2RigidBodyHandle handle,
7394 struct R2Vector value,
7403R2Status
RAPIER_CALL r2RigidBody_SetLinvel(
struct R2RigidBodyHandle handle,
7404 struct R2Vector value,
7413R2Status
RAPIER_CALL r2RigidBody_SetAngvel(
struct R2RigidBodyHandle handle,
7422R2Status
RAPIER_CALL r2RigidBody_SetNextKinematicPosition(
struct R2RigidBodyHandle handle,
7423 struct R2Pose value);
7430R2Status
RAPIER_CALL r2RigidBody_SetNextKinematicTranslation(
struct R2RigidBodyHandle handle,
7431 struct R2Vector value);
7439R2Status
RAPIER_CALL r2RigidBody_SetGravityScale(
struct R2RigidBodyHandle handle,
7448R2Status
RAPIER_CALL r2RigidBody_SetLinearDamping(
struct R2RigidBodyHandle handle,
7456R2Status
RAPIER_CALL r2RigidBody_SetAngularDamping(
struct R2RigidBodyHandle handle,
7463RAPIER_API R2Status
RAPIER_CALL r2RigidBody_SetEnabled(
struct R2RigidBodyHandle handle, R2Bool value);
7470R2Status
RAPIER_CALL r2RigidBody_SetUserData(
struct R2RigidBodyHandle handle,
7471 struct R2UserData value);
7479R2Status
RAPIER_CALL r2RigidBody_ApplyImpulse(
struct R2RigidBodyHandle handle,
7480 struct R2Vector value,
7489R2Status
RAPIER_CALL r2RigidBody_ApplyImpulseAtPoint(
struct R2RigidBodyHandle handle,
7490 struct R2Vector value,
7491 struct R2Vector point,
7500R2Status
RAPIER_CALL r2RigidBody_AddForce(
struct R2RigidBodyHandle handle,
7501 struct R2Vector value,
7509RAPIER_API R2Status
RAPIER_CALL r2RigidBody_ResetForces(
struct R2RigidBodyHandle handle, R2Bool wake_up);
7515RAPIER_API R2Status
RAPIER_CALL r2RigidBody_Sleep(
struct R2RigidBodyHandle handle);
7521RAPIER_API
struct R2Pose
RAPIER_CALL r2Collider_Position(struct R2ColliderHandle handle);
7527RAPIER_API
struct R2Vector
RAPIER_CALL r2Collider_Translation(struct R2ColliderHandle handle);
7533RAPIER_API R2Real
RAPIER_CALL r2Collider_Friction(
struct R2ColliderHandle handle);
7539RAPIER_API R2Real
RAPIER_CALL r2Collider_Restitution(
struct R2ColliderHandle handle);
7545RAPIER_API R2Bool
RAPIER_CALL r2Collider_IsSensor(
struct R2ColliderHandle handle);
7551RAPIER_API
struct R2RigidBodyHandle
RAPIER_CALL r2Collider_Parent(struct R2ColliderHandle handle);
7559R2Status
RAPIER_CALL r2Collider_SetPosition(
struct R2ColliderHandle handle,
7560 struct R2Pose value);
7568R2Status
RAPIER_CALL r2Collider_SetTranslation(
struct R2ColliderHandle handle,
7569 struct R2Vector value);
7575RAPIER_API R2Status
RAPIER_CALL r2Collider_SetFriction(
struct R2ColliderHandle handle, R2Real value);
7581RAPIER_API R2Status
RAPIER_CALL r2Collider_SetRestitution(
struct R2ColliderHandle handle, R2Real value);
7587RAPIER_API R2Status
RAPIER_CALL r2Collider_SetSensor(
struct R2ColliderHandle handle, R2Bool value);
7594R2Status
RAPIER_CALL r2Collider_SetCollisionGroups(
struct R2ColliderHandle handle,
7595 struct R2InteractionGroups value);
7602R2Status
RAPIER_CALL r2Collider_SetUserData(
struct R2ColliderHandle handle,
7603 struct R2UserData value);
7610struct R2Vector
RAPIER_CALL r2SoftBody_ParticlePosition(struct R2SoftBodyHandle handle,
7619size_t RAPIER_CALL r2SoftBody_ParticlePositions(
struct R2SoftBodyHandle handle,
7620 struct R2Vector *buffer,
7627RAPIER_API
struct R2SoftBodyMaterial
RAPIER_CALL r2SoftBody_Material(struct R2SoftBodyHandle handle);
7634R2Status
RAPIER_CALL r2SoftBody_SetParticlePosition(
struct R2SoftBodyHandle handle,
7636 struct R2Vector value);
7643R2Status
RAPIER_CALL r2SoftBody_SetMaterial(
struct R2SoftBodyHandle handle,
7644 const struct R2SoftBodyMaterial *data);
7652R2Status
RAPIER_CALL r2SoftBody_AddParticleForce(
struct R2SoftBodyHandle handle,
7654 struct R2Vector value,
7664size_t RAPIER_CALL r2RigidBodyReadStates(
const struct R2World *world,
7665 const struct R2RigidBodyHandle *handles,
7666 size_t handle_count,
7667 struct R2RigidBodyState *states,
7674RAPIER_API
struct R2JointDesc
RAPIER_CALL r2ImpulseJoint_Desc(struct R2ImpulseJointHandle handle);
7682R2Status
RAPIER_CALL r2ImpulseJoint_SetDesc(
struct R2ImpulseJointHandle handle,
7683 const struct R2JointDesc *desc,
7690RAPIER_API uint16_t
RAPIER_CALL r2Collider_ActiveCollisionTypes(
struct R2ColliderHandle handle);
7696RAPIER_API uint32_t
RAPIER_CALL r2Collider_ActiveHooks(
struct R2ColliderHandle handle);
7702RAPIER_API uint32_t
RAPIER_CALL r2Collider_FrictionCombineRule(
struct R2ColliderHandle handle);
7708RAPIER_API uint32_t
RAPIER_CALL r2Collider_RestitutionCombineRule(
struct R2ColliderHandle handle);
7715RAPIER_API
struct R2Pose
RAPIER_CALL r2Collider_PositionWrtParent(struct R2ColliderHandle handle);
7721RAPIER_API int8_t
RAPIER_CALL r2RigidBody_DominanceGroup(
struct R2RigidBodyHandle handle);
7727RAPIER_API
size_t RAPIER_CALL r2RigidBody_AdditionalSolverIterations(
struct R2RigidBodyHandle handle);
7733RAPIER_API
size_t RAPIER_CALL r2RigidBody_AdditionalPgsIterations(
struct R2RigidBodyHandle handle);
7739RAPIER_API R2Bool
RAPIER_CALL r2RigidBody_IsFastRotationAllowed(
struct R2RigidBodyHandle handle);
7747R2Status
RAPIER_CALL r2Collider_SetRotation(
struct R2ColliderHandle handle,
7748 struct R2Rotation value);
7756R2Status
RAPIER_CALL r2RigidBody_SetAllowFastRotation(
struct R2RigidBodyHandle handle,
7766R2Status
RAPIER_CALL r2ShapeDesc_SetTrimesh(
struct R2ShapeDesc *desc,
7767 struct R2VectorView vertices,
7768 struct R2TriangleView indices,
7778R2Status
RAPIER_CALL r2ShapeDesc_SetPolyline(
struct R2ShapeDesc *desc,
7779 struct R2VectorView vertices,
7780 struct R2EdgeView indices,
7788R2Status
RAPIER_CALL r2ShapeDesc_SetConvexHull(
struct R2ShapeDesc *desc,
7789 struct R2VectorView vertices);
7796R2Status
RAPIER_CALL r2SoftBodyDesc_SetParticles(
struct R2SoftBodyDesc *desc,
7797 struct R2VectorView positions);
7804R2Status
RAPIER_CALL r2SoftBodyDesc_SetSurfaceMesh(
struct R2SoftBodyDesc *desc,
7805 struct R2VectorView vertices,
7806 R2SurfaceElementView elements);
7808#if defined(RAPIER_DIM2)
7816R2Status
RAPIER_CALL r2SoftBodyDesc_SetTrimesh(
struct R2SoftBodyDesc *desc,
7817 struct R2VectorView vertices,
7818 struct R2TriangleView triangles);
7828R2Status
RAPIER_CALL r2SoftBodyDesc_SetAppended(
struct R2SoftBodyDesc *desc,
7829 struct R2SoftBodyDescView view);
7838R2Status
RAPIER_CALL r2SoftBodyDesc_SetAddedEdges(
struct R2SoftBodyDesc *desc,
7839 struct R2EdgeView view);
7846R2Status
RAPIER_CALL r2SoftBodyDesc_SetSkin(
struct R2SoftBodyDesc *desc,
7847 struct R2VectorView vertices,
7848 R2SurfaceElementView elements);
7858R2Status
RAPIER_CALL r2SoftBodyDesc_SetMasses(
struct R2SoftBodyDesc *desc,
7859 struct R2RealView view);
7869R2Status
RAPIER_CALL r2SoftBodyDesc_SetPinnedParticles(
struct R2SoftBodyDesc *desc,
7870 struct R2IndexView view);
7880R2Status
RAPIER_CALL r2SoftBodyDesc_SetEdges(
struct R2SoftBodyDesc *desc,
7881 struct R2EdgeView view);
7891R2Status
RAPIER_CALL r2SoftBodyDesc_SetBendEdges(
struct R2SoftBodyDesc *desc,
7892 struct R2EdgeView view);
7901RAPIER_API R2Status
RAPIER_CALL r2SoftBodyDesc_SetCells(
struct R2SoftBodyDesc *desc, R2CellView view);
7911R2Status
RAPIER_CALL r2SoftBodyDesc_SetSurface(
struct R2SoftBodyDesc *desc,
7912 R2SurfaceElementView view);
7922R2Status
RAPIER_CALL r2SoftBodyDesc_SetTensionOnlyEdges(
struct R2SoftBodyDesc *desc,
7923 struct R2IndexView view);
7925#if defined(RAPIER_DIM3)
7934R2Status
RAPIER_CALL r2SoftBodyDesc_SetDihedrals(
struct R2SoftBodyDesc *desc,
7935 struct R2DihedralView view);
7938#if defined(RAPIER_DIM3)
7947R2Status
RAPIER_CALL r2SoftBodyDesc_SetWire(
struct R2SoftBodyDesc *desc,
7948 struct R2EdgeView view);
7957struct R2ColliderDesc
RAPIER_CALL r2RoundCuboidColliderDesc(struct R2Vector half_extents,
7958 R2Real border_radius);
7966struct R2ColliderDesc
RAPIER_CALL r2CapsuleColliderDesc(struct R2Vector a,
7975RAPIER_API
struct R2ColliderDesc
RAPIER_CALL r2SegmentColliderDesc(struct R2Vector a, struct R2Vector b);
7983struct R2ColliderDesc
RAPIER_CALL r2TriangleColliderDesc(struct R2Vector a,
7992RAPIER_API
struct R2ColliderDesc
RAPIER_CALL r2HalfspaceColliderDesc(struct R2Vector normal);
7994#if defined(RAPIER_DIM3)
8000RAPIER_API
struct R2ColliderDesc
RAPIER_CALL r2CylinderColliderDesc(R2Real half_height, R2Real radius);
8003#if defined(RAPIER_DIM3)
8009RAPIER_API
struct R2ColliderDesc
RAPIER_CALL r2ConeColliderDesc(R2Real half_height, R2Real radius);
8012#if defined(RAPIER_DIM3)
8019struct R2ColliderDesc
RAPIER_CALL r2RoundCylinderColliderDesc(R2Real half_height,
8021 R2Real border_radius);
8024#if defined(RAPIER_DIM3)
8031struct R2ColliderDesc
RAPIER_CALL r2RoundConeColliderDesc(R2Real half_height,
8033 R2Real border_radius);
8041RAPIER_API
struct R2ColliderDesc
RAPIER_CALL r2CapsuleXColliderDesc(R2Real half_height, R2Real radius);
8048RAPIER_API
struct R2ColliderDesc
RAPIER_CALL r2CapsuleYColliderDesc(R2Real half_height, R2Real radius);
8050#if defined(RAPIER_DIM3)
8056RAPIER_API
struct R2ColliderDesc
RAPIER_CALL r2CapsuleZColliderDesc(R2Real half_height, R2Real radius);
8065struct R2SoftBodyDesc
RAPIER_CALL r2RopeSoftBodyDesc(struct R2Vector a,
8069#if defined(RAPIER_DIM2)
8076struct R2SoftBodyDesc
RAPIER_CALL r2GridSoftBodyDesc(struct R2Vector center,
8077 struct R2Vector half_extents,
8082#if defined(RAPIER_DIM3)
8089struct R2SoftBodyDesc
RAPIER_CALL r2CuboidSoftBodyDesc(struct R2Vector center,
8090 struct R2Vector half_extents,
8096#if defined(RAPIER_DIM3)
8103struct R2SoftBodyDesc
RAPIER_CALL r2ClothSoftBodyDesc(struct R2Vector origin,
8110#if defined(RAPIER_DIM3)
8119struct R2SoftBodyDesc
RAPIER_CALL r2ClothAnisotropicSoftBodyDesc(struct R2Vector origin,
8124 struct R2SpringCoefficients warp,
8125 struct R2SpringCoefficients weft,
8126 struct R2SpringCoefficients shear);
8129#if defined(RAPIER_DIM2)
8137RAPIER_API
struct R2SoftBodyDesc
RAPIER_CALL r2PolygonSoftBodyDesc(struct R2VectorView points);
8140#if defined(RAPIER_DIM2)
8148struct R2SoftBodyDesc
RAPIER_CALL r2DiskSoftBodyDesc(struct R2Vector center,
8153#if defined(RAPIER_DIM3)
8160struct R2SoftBodyDesc
RAPIER_CALL r2SphereSoftBodyDesc(struct R2Vector center,
8162 uint32_t subdivisions);
8165#if defined(RAPIER_DIM3)
8173struct R2SoftBodyDesc
RAPIER_CALL r2ClothTubeSoftBodyDesc(struct R2Vector origin,
8174 struct R2Vector axis,
8175 R2Real radius_start,
8186struct R2SoftBodyDesc
RAPIER_CALL r2VolumetricSoftBodyDesc(struct R2VectorView vertices,
8187 R2SurfaceElementView surface,
8188 struct R2VolumeMeshParameters parameters);
8195struct R2SoftBodyMaterial
RAPIER_CALL r2UniformSoftBodyMaterial(struct R2SpringCoefficients value);
8203size_t RAPIER_CALL r2SoftBodyDesc_ParticlePositions(
const struct R2SoftBodyDesc *desc,
8204 struct R2Vector *buffer,
8213size_t RAPIER_CALL r2SoftBodyDesc_CellIndices(
const struct R2SoftBodyDesc *desc,
8222struct R2Vector
RAPIER_CALL r2SoftBody_ParticleVelocity(struct R2SoftBodyHandle handle,
8230RAPIER_API uint32_t
RAPIER_CALL r2SoftBody_Solver(
struct R2SoftBodyHandle handle);
8238R2Status
RAPIER_CALL r2SoftBody_SetClusterEdgeSoftness(
struct R2SoftBodyHandle handle,
8240 const struct R2SpringCoefficients *softness);
8251R2Status
RAPIER_CALL r2SoftBody_ApplyImpulseAtPoint(
struct R2SoftBodyHandle handle,
8252 struct R2Vector impulse,
8253 struct R2Vector point,
8254 R2Real falloff_radius,
8267R2Status
RAPIER_CALL r2SoftBody_ApplyRadialImpulse(
struct R2SoftBodyHandle handle,
8268 struct R2Vector center,
8270 R2Real falloff_radius,
8279RAPIER_API R2Status
RAPIER_CALL r2SoftBody_ResetPlasticity(
struct R2SoftBodyHandle handle);
8286RAPIER_API R2Status
RAPIER_CALL r2SoftBody_TearEdge(
struct R2SoftBodyHandle handle,
size_t index);
8294RAPIER_API R2Status
RAPIER_CALL r2SoftBody_TearCell(
struct R2SoftBodyHandle handle,
size_t index);
8301RAPIER_API
struct R2SoftBodyHandle
RAPIER_CALL r2Collider_SoftBody(struct R2ColliderHandle handle);
8309struct R2SoftBodyHandle
RAPIER_CALL r2ReadCollider_SoftBody(const struct R2ReadContext *context,
8310 struct R2ColliderHandle handle);
8318RAPIER_API
size_t RAPIER_CALL r2SoftBodyTearEvent_PieceCount(
const struct R2SoftBodyTearEvent *event);
8324RAPIER_API R2Bool
RAPIER_CALL r2RecoveryAuthoredVelocityMargin(
const struct R2World *world);
8330RAPIER_API R2Bool
RAPIER_CALL r2RecoveryEdgeSpeculation(
const struct R2World *world);
8336RAPIER_API R2Bool
RAPIER_CALL r2RecoveryInvertedCellDetection(
const struct R2World *world);
8342RAPIER_API R2Bool
RAPIER_CALL r2RecoverySelfCrossingDetection(
const struct R2World *world);
8348RAPIER_API R2Bool
RAPIER_CALL r2RecoveryDetectionMotionGating(
const struct R2World *world);
8354RAPIER_API R2Bool
RAPIER_CALL r2RecoveryCrossBodyDetection(
const struct R2World *world);
8360RAPIER_API R2Bool
RAPIER_CALL r2RecoverySelfStandDown(
const struct R2World *world);
8366RAPIER_API R2Bool
RAPIER_CALL r2RecoveryCrossBodyExpelGate(
const struct R2World *world);
8372RAPIER_API R2Bool
RAPIER_CALL r2RecoveryEdgeStandDown(
const struct R2World *world);
8378RAPIER_API R2Bool
RAPIER_CALL r2RecoveryCrossingRepulsion(
const struct R2World *world);
8384RAPIER_API R2Bool
RAPIER_CALL r2RecoveryCrossingRepulsionGuide(
const struct R2World *world);
8390RAPIER_API R2Bool
RAPIER_CALL r2RecoveryCrossingRepulsionSelfGuide(
const struct R2World *world);
8396RAPIER_API R2Real
RAPIER_CALL r2RecoveryRecoveryPace(
const struct R2World *world);
8402RAPIER_API R2Bool
RAPIER_CALL r2RecoveryOverlapConstraints(
const struct R2World *world);
8408RAPIER_API R2Bool
RAPIER_CALL r2RecoveryOverlapRigid(
const struct R2World *world);
8414RAPIER_API R2Bool
RAPIER_CALL r2RecoveryOverlapSkipSelfTangled(
const struct R2World *world);
8420RAPIER_API R2Bool
RAPIER_CALL r2RecoveryOverlapEdgeStandDown(
const struct R2World *world);
8426RAPIER_API R2Real
RAPIER_CALL r2RecoveryOverlapConstraintPace(
const struct R2World *world);
8432RAPIER_API uint32_t
RAPIER_CALL r2RecoveryOverlapPatchConstraints(
const struct R2World *world);
8439R2Status
RAPIER_CALL r2RecoverySetOverlapPatchConstraints(
struct R2World *world,
8446RAPIER_API R2Bool
RAPIER_CALL r2RecoveryOverlapSkinVolume(
const struct R2World *world);
8452RAPIER_API R2Real
RAPIER_CALL r2RecoveryOverlapKeptDepth(
const struct R2World *world);
8458RAPIER_API R2Bool
RAPIER_CALL r2RecoveryOverlapSelfRegions(
const struct R2World *world);
8464RAPIER_API R2Bool
RAPIER_CALL r2RecoveryOverlapNormalPush(
const struct R2World *world);
8470RAPIER_API R2Bool
RAPIER_CALL r2RecoveryOverlapMultiVolume(
const struct R2World *world);
8476RAPIER_API uint32_t
RAPIER_CALL r2RecoveryOverlapSplit(
const struct R2World *world);
8482RAPIER_API R2Status
RAPIER_CALL r2RecoverySetOverlapSplit(
struct R2World *world, uint32_t value);
8488RAPIER_API uint32_t
RAPIER_CALL r2RecoveryOverlapPatience(
const struct R2World *world);
8494RAPIER_API R2Status
RAPIER_CALL r2RecoverySetOverlapPatience(
struct R2World *world, uint32_t value);
8500RAPIER_API R2Real
RAPIER_CALL r2RecoveryOverlapProgressMargin(
const struct R2World *world);
8502#if defined(RAPIER_FEM)
8507RAPIER_API R2Real
RAPIER_CALL r2FemLinearTolerance(
const struct R2World *world);
8510#if defined(RAPIER_FEM)
8515RAPIER_API
size_t RAPIER_CALL r2FemMaxLinearIterations(
const struct R2World *world);
8518#if defined(RAPIER_FEM)
8523RAPIER_API
size_t RAPIER_CALL r2FemMaxDenseDofs(
const struct R2World *world);
8531RAPIER_API
size_t RAPIER_CALL r2Collider_ShapeIdentity(
struct R2ColliderHandle handle);
8537RAPIER_API
size_t RAPIER_CALL r2SoftBody_NumParticles(
struct R2SoftBodyHandle handle);
8544RAPIER_API uint32_t
RAPIER_CALL r2SoftBody_TopologyVersion(
struct R2SoftBodyHandle handle);
8550RAPIER_API R2Real
RAPIER_CALL r2SoftBody_Mass(
struct R2SoftBodyHandle handle);
8556RAPIER_API R2Real
RAPIER_CALL r2SoftBody_Volume(
struct R2SoftBodyHandle handle);
8562RAPIER_API R2Real
RAPIER_CALL r2SoftBody_RestVolume(
struct R2SoftBodyHandle handle);
8568RAPIER_API R2Real
RAPIER_CALL r2SoftBody_VolumeFactor(
struct R2SoftBodyHandle handle);
8574RAPIER_API
struct R2Vector
RAPIER_CALL r2SoftBody_CenterOfMass(struct R2SoftBodyHandle handle);
8580RAPIER_API
struct R2RigidBodyHandle
RAPIER_CALL r2SoftBody_RootBody(struct R2SoftBodyHandle handle);
8586RAPIER_API R2Bool
RAPIER_CALL r2SoftBody_IsEnabled(
struct R2SoftBodyHandle handle);
8592RAPIER_API R2Bool
RAPIER_CALL r2SoftBody_IsSleeping(
struct R2SoftBodyHandle handle);
8600size_t RAPIER_CALL r2SoftBody_ParticleVelocities(
struct R2SoftBodyHandle handle,
8601 struct R2Vector *buffer,
8610size_t RAPIER_CALL r2SoftBody_Edges(
struct R2SoftBodyHandle handle,
8620size_t RAPIER_CALL r2SoftBody_Cells(
struct R2SoftBodyHandle handle,
8630size_t RAPIER_CALL r2SoftBody_Boundary(
struct R2SoftBodyHandle handle,
8640size_t RAPIER_CALL r2SoftBody_Pieces(
struct R2SoftBodyHandle handle,
8641 struct R2SoftBodyHandle *buffer,
8649R2Status
RAPIER_CALL r2SoftBody_SetParticleVelocity(
struct R2SoftBodyHandle handle,
8651 struct R2Vector value);
8658R2Status
RAPIER_CALL r2SoftBody_SetParticleKinematicTarget(
struct R2SoftBodyHandle handle,
8660 struct R2Vector value);
8667R2Status
RAPIER_CALL r2SoftBody_SetParticlePinned(
struct R2SoftBodyHandle handle,
8677R2Status
RAPIER_CALL r2SoftBody_ApplyParticleImpulse(
struct R2SoftBodyHandle handle,
8679 struct R2Vector value,
8688R2Status
RAPIER_CALL r2SoftBody_AddForce(
struct R2SoftBodyHandle handle,
8689 struct R2Vector value,
8700R2Status
RAPIER_CALL r2SoftBody_ApplyImpulse(
struct R2SoftBodyHandle handle,
8701 struct R2Vector value,
8709RAPIER_API R2Status
RAPIER_CALL r2SoftBody_ResetForces(
struct R2SoftBodyHandle handle, R2Bool wake_up);
8715RAPIER_API R2Status
RAPIER_CALL r2SoftBody_SetEnabled(
struct R2SoftBodyHandle handle, R2Bool value);
8722R2Status
RAPIER_CALL r2SoftBody_SetVolumeFactor(
struct R2SoftBodyHandle handle,
8732R2Status
RAPIER_CALL r2SoftBody_AttachParticle(
struct R2SoftBodyHandle handle,
8734 struct R2RigidBodyHandle rigid_body);
8741RAPIER_API R2Bool
RAPIER_CALL r2SoftBody_DetachParticle(
struct R2SoftBodyHandle handle,
size_t index);
8749size_t RAPIER_CALL r2SoftBody_Clusters(
struct R2SoftBodyHandle handle,
8758struct R2RigidBodyHandle
RAPIER_CALL r2SoftBody_ClusterProxy(struct R2SoftBodyHandle handle,
8767size_t RAPIER_CALL r2SoftBody_ClusterParticles(
struct R2SoftBodyHandle handle,
8777R2Status
RAPIER_CALL r2SoftBody_SetClusterPinned(
struct R2SoftBodyHandle handle,
8786R2Status
RAPIER_CALL r2SoftBody_SetClusterKinematicTarget(
struct R2SoftBodyHandle handle,
8788 struct R2Pose value);
8795R2Status
RAPIER_CALL r2SoftBody_SetClusterShapeMatchingEnabled(
struct R2SoftBodyHandle handle,
8806R2Status
RAPIER_CALL r2SoftBody_SetClusterStiffnessScale(
struct R2SoftBodyHandle handle,
8815R2Status
RAPIER_CALL r2SoftBody_SetClusterTearResistance(
struct R2SoftBodyHandle handle,
8825size_t RAPIER_CALL r2SoftBody_Meshes(
struct R2SoftBodyHandle handle,
8826 struct R2SoftMeshInfo *buffer,
8835size_t RAPIER_CALL r2SoftBody_MeshVerticesById(
struct R2SoftBodyHandle handle,
8836 struct R2SoftMeshId
id,
8837 struct R2Vector *buffer,
8846size_t RAPIER_CALL r2SoftBody_MeshIndicesById(
struct R2SoftBodyHandle handle,
8847 struct R2SoftMeshId
id,
8857size_t RAPIER_CALL r2SoftBody_MeshColliders(
struct R2SoftBodyHandle handle,
8858 struct R2ColliderHandle *buffer,
8867size_t RAPIER_CALL r2SoftBody_MeshVertices(
struct R2SoftBodyHandle handle,
8868 struct R2ColliderHandle collider,
8869 struct R2Vector *buffer,
8878size_t RAPIER_CALL r2SoftBody_MeshIndices(
struct R2SoftBodyHandle handle,
8879 struct R2ColliderHandle collider,
8888size_t RAPIER_CALL r2SoftBody_MeshArity(
struct R2SoftBodyHandle handle,
8889 struct R2ColliderHandle collider);
8896uint32_t
RAPIER_CALL r2SoftBody_MeshTopologyVersion(
struct R2SoftBodyHandle handle,
8897 struct R2ColliderHandle collider);
8899#if defined(RAPIER_FEM)
8904RAPIER_API R2Status
RAPIER_CALL r2SoftBody_SetSolver(
struct R2SoftBodyHandle handle, uint32_t solver);
8912R2Status
RAPIER_CALL r2SoftBody_SetClusterShapeMatchingTarget(
struct R2SoftBodyHandle handle,
8914 const struct R2Pose *target);
8921R2Status
RAPIER_CALL r2SoftBody_SetEdgeTearResistance(
struct R2SoftBodyHandle handle,
8930R2Bool
RAPIER_CALL r2SoftBody_MeshIsClosed(
struct R2SoftBodyHandle handle,
8931 struct R2ColliderHandle collider);
8939R2Status
RAPIER_CALL r2RigidBody_SetAdditionalMassProperties(
struct R2RigidBodyHandle handle,
8940 struct R2MassProperties properties,
8948R2Status
RAPIER_CALL r2RigidBody_RecomputeMassPropertiesFromColliders(
struct R2RigidBodyHandle handle);
8955R2Status
RAPIER_CALL r2Collider_SetMassProperties(
struct R2ColliderHandle handle,
8956 struct R2MassProperties properties);
8962RAPIER_API
struct R2MassProperties
RAPIER_CALL r2Collider_MassProperties(struct R2ColliderHandle handle);
8970R2Status
RAPIER_CALL r2RigidBody_SetLockedAxes(
struct R2RigidBodyHandle handle,
8978RAPIER_API uint8_t
RAPIER_CALL r2RigidBody_LockedAxes(
struct R2RigidBodyHandle handle);
8984RAPIER_API R2Bool
RAPIER_CALL r2Collider_IsVoxels(
struct R2ColliderHandle handle);
8991struct R2VoxelQuery
RAPIER_CALL r2Collider_VoxelAtFlatId(struct R2ColliderHandle handle,
8999R2Status
RAPIER_CALL r2Collider_SetVoxel(
struct R2ColliderHandle handle,
9000 struct R2VoxelKey key,
9007RAPIER_API
struct R2Pose
RAPIER_CALL r2RigidBody_NextPosition(struct R2RigidBodyHandle handle);
9013RAPIER_API
struct R2Rotation
RAPIER_CALL r2RigidBody_Rotation(struct R2RigidBodyHandle handle);
9019RAPIER_API
struct R2Vector
RAPIER_CALL r2RigidBody_CenterOfMass(struct R2RigidBodyHandle handle);
9025RAPIER_API
struct R2Vector
RAPIER_CALL r2RigidBody_LocalCenterOfMass(struct R2RigidBodyHandle handle);
9031RAPIER_API
struct R2Vector
RAPIER_CALL r2RigidBody_UserForce(struct R2RigidBodyHandle handle);
9037RAPIER_API R2AngVector
RAPIER_CALL r2RigidBody_UserTorque(
struct R2RigidBodyHandle handle);
9043RAPIER_API uint32_t
RAPIER_CALL r2RigidBody_BodyType(
struct R2RigidBodyHandle handle);
9049RAPIER_API R2Real
RAPIER_CALL r2RigidBody_Mass(
struct R2RigidBodyHandle handle);
9055RAPIER_API R2Real
RAPIER_CALL r2RigidBody_GravityScale(
struct R2RigidBodyHandle handle);
9061RAPIER_API R2Real
RAPIER_CALL r2RigidBody_LinearDamping(
struct R2RigidBodyHandle handle);
9067RAPIER_API R2Real
RAPIER_CALL r2RigidBody_AngularDamping(
struct R2RigidBodyHandle handle);
9073RAPIER_API R2Real
RAPIER_CALL r2RigidBody_KineticEnergy(
struct R2RigidBodyHandle handle);
9079RAPIER_API R2Real
RAPIER_CALL r2RigidBody_SoftCcdPrediction(
struct R2RigidBodyHandle handle);
9085RAPIER_API R2Bool
RAPIER_CALL r2RigidBody_IsCcdEnabled(
struct R2RigidBodyHandle handle);
9091RAPIER_API R2Bool
RAPIER_CALL r2RigidBody_IsDynamic(
struct R2RigidBodyHandle handle);
9097RAPIER_API
struct R2SoftBodyHandle
RAPIER_CALL r2RigidBody_SoftBody(struct R2RigidBodyHandle handle);
9103RAPIER_API R2Bool
RAPIER_CALL r2RigidBody_IsSoftFrame(
struct R2RigidBodyHandle handle);
9109RAPIER_API R2Bool
RAPIER_CALL r2RigidBody_IsFixed(
struct R2RigidBodyHandle handle);
9115RAPIER_API R2Bool
RAPIER_CALL r2RigidBody_IsKinematic(
struct R2RigidBodyHandle handle);
9121RAPIER_API R2Bool
RAPIER_CALL r2RigidBody_IsMoving(
struct R2RigidBodyHandle handle);
9127RAPIER_API R2Bool
RAPIER_CALL r2RigidBody_IsCcdActive(
struct R2RigidBodyHandle handle);
9135R2Status
RAPIER_CALL r2RigidBody_SetRotation(
struct R2RigidBodyHandle handle,
9136 struct R2Rotation value,
9145R2Status
RAPIER_CALL r2RigidBody_SetBodyType(
struct R2RigidBodyHandle handle,
9154R2Status
RAPIER_CALL r2RigidBody_SetNextKinematicRotation(
struct R2RigidBodyHandle handle,
9155 struct R2Rotation value);
9163R2Status
RAPIER_CALL r2RigidBody_SetAdditionalMass(
struct R2RigidBodyHandle handle,
9172R2Status
RAPIER_CALL r2RigidBody_SetSoftCcdPrediction(
struct R2RigidBodyHandle handle,
9180R2Status
RAPIER_CALL r2RigidBody_SetCcdEnabled(
struct R2RigidBodyHandle handle,
9189R2Status
RAPIER_CALL r2RigidBody_SetTranslationsLocked(
struct R2RigidBodyHandle handle,
9199R2Status
RAPIER_CALL r2RigidBody_SetRotationsLocked(
struct R2RigidBodyHandle handle,
9208R2Status
RAPIER_CALL r2RigidBody_SetDominanceGroup(
struct R2RigidBodyHandle handle,
9216R2Status
RAPIER_CALL r2RigidBody_SetAdditionalSolverIterations(
struct R2RigidBodyHandle handle,
9224R2Status
RAPIER_CALL r2RigidBody_SetAdditionalPgsIterations(
struct R2RigidBodyHandle handle,
9233R2Status
RAPIER_CALL r2RigidBody_AddTorque(
struct R2RigidBodyHandle handle,
9243R2Status
RAPIER_CALL r2RigidBody_ApplyTorqueImpulse(
struct R2RigidBodyHandle handle,
9253R2Status
RAPIER_CALL r2RigidBody_AddForceAtPoint(
struct R2RigidBodyHandle handle,
9254 struct R2Vector value,
9255 struct R2Vector point,
9264R2Status
RAPIER_CALL r2RigidBody_ResetTorques(
struct R2RigidBodyHandle handle,
9272struct R2Vector
RAPIER_CALL r2RigidBody_VelocityAtPoint(struct R2RigidBodyHandle handle,
9273 struct R2Vector point);
9281size_t RAPIER_CALL r2RigidBody_Colliders(
struct R2RigidBodyHandle handle,
9282 struct R2ColliderHandle *buffer,
9285#if defined(RAPIER_DIM3)
9290RAPIER_API R2Bool
RAPIER_CALL r2RigidBody_GyroscopicForcesEnabled(
struct R2RigidBodyHandle handle);
9293#if defined(RAPIER_DIM3)
9299R2Status
RAPIER_CALL r2RigidBody_SetGyroscopicForcesEnabled(
struct R2RigidBodyHandle handle,
9307RAPIER_API R2Status
RAPIER_CALL r2Collider_SetDensity(
struct R2ColliderHandle handle, R2Real value);
9313RAPIER_API R2Status
RAPIER_CALL r2Collider_SetMass(
struct R2ColliderHandle handle, R2Real value);
9319RAPIER_API R2Status
RAPIER_CALL r2Collider_SetEnabled(
struct R2ColliderHandle handle, R2Bool value);
9326R2Status
RAPIER_CALL r2Collider_SetSolverGroups(
struct R2ColliderHandle handle,
9327 struct R2InteractionGroups value);
9334R2Status
RAPIER_CALL r2Collider_SetFrictionCombineRule(
struct R2ColliderHandle handle,
9342R2Status
RAPIER_CALL r2Collider_SetRestitutionCombineRule(
struct R2ColliderHandle handle,
9349RAPIER_API R2Status
RAPIER_CALL r2Collider_SetContactSkin(
struct R2ColliderHandle handle, R2Real value);
9356R2Status
RAPIER_CALL r2Collider_SetContactForceEventThreshold(
struct R2ColliderHandle handle,
9364R2Status
RAPIER_CALL r2Collider_SetActiveEvents(
struct R2ColliderHandle handle,
9371RAPIER_API R2Status
RAPIER_CALL r2Collider_SetActiveHooks(
struct R2ColliderHandle handle, uint32_t value);
9378R2Status
RAPIER_CALL r2Collider_SetActiveCollisionTypes(
struct R2ColliderHandle handle,
9385RAPIER_API
struct R2Rotation
RAPIER_CALL r2Collider_Rotation(struct R2ColliderHandle handle);
9392struct R2InteractionGroups
RAPIER_CALL r2Collider_CollisionGroups(struct R2ColliderHandle handle);
9398RAPIER_API
struct R2InteractionGroups
RAPIER_CALL r2Collider_SolverGroups(struct R2ColliderHandle handle);
9404RAPIER_API
struct R2UserData
RAPIER_CALL r2Collider_UserData(struct R2ColliderHandle handle);
9411RAPIER_API uint32_t
RAPIER_CALL r2Collider_ActiveEvents(
struct R2ColliderHandle handle);
9417RAPIER_API R2Real
RAPIER_CALL r2Collider_Mass(
struct R2ColliderHandle handle);
9423RAPIER_API R2Real
RAPIER_CALL r2Collider_Density(
struct R2ColliderHandle handle);
9429RAPIER_API R2Real
RAPIER_CALL r2Collider_Volume(
struct R2ColliderHandle handle);
9435RAPIER_API R2Real
RAPIER_CALL r2Collider_ContactSkin(
struct R2ColliderHandle handle);
9441RAPIER_API R2Real
RAPIER_CALL r2Collider_ContactForceEventThreshold(
struct R2ColliderHandle handle);
9447RAPIER_API R2Bool
RAPIER_CALL r2Collider_IsEnabled(
struct R2ColliderHandle handle);
9453RAPIER_API
struct R2Aabb
RAPIER_CALL r2Collider_ComputeAabb(struct R2ColliderHandle handle);
9459RAPIER_API R2SharedShape *
RAPIER_CALL r2Collider_CloneShape(
struct R2ColliderHandle handle);
9466R2Status
RAPIER_CALL r2Collider_SetShape(
struct R2ColliderHandle handle,
9467 const R2SharedShape *shape);
9474R2Status
RAPIER_CALL r2Collider_SetPositionWrtParent(
struct R2ColliderHandle handle,
9475 struct R2Pose value);
9482RAPIER_API R2Status
RAPIER_CALL r2RigidBody_ValidateHandle(
struct R2RigidBodyHandle handle);
9489RAPIER_API R2Status
RAPIER_CALL r2Collider_ValidateHandle(
struct R2ColliderHandle handle);
9496RAPIER_API R2Status
RAPIER_CALL r2SoftBody_ValidateHandle(
struct R2SoftBodyHandle handle);
9503R2Status
RAPIER_CALL r2JointDesc_SetLocalFrame1(
struct R2JointDesc *desc,
9504 struct R2Pose value);
9512R2Status
RAPIER_CALL r2ImpulseJoint_SetLocalFrame1(
struct R2ImpulseJointHandle handle,
9513 struct R2Pose value,
9521R2Status
RAPIER_CALL r2JointDesc_SetLocalFrame2(
struct R2JointDesc *desc,
9522 struct R2Pose value);
9530R2Status
RAPIER_CALL r2ImpulseJoint_SetLocalFrame2(
struct R2ImpulseJointHandle handle,
9531 struct R2Pose value,
9539R2Status
RAPIER_CALL r2JointDesc_SetLocalAnchor1(
struct R2JointDesc *desc,
9540 struct R2Vector value);
9548R2Status
RAPIER_CALL r2ImpulseJoint_SetLocalAnchor1(
struct R2ImpulseJointHandle handle,
9549 struct R2Vector value,
9557R2Status
RAPIER_CALL r2JointDesc_SetLocalAnchor2(
struct R2JointDesc *desc,
9558 struct R2Vector value);
9566R2Status
RAPIER_CALL r2ImpulseJoint_SetLocalAnchor2(
struct R2ImpulseJointHandle handle,
9567 struct R2Vector value,
9574RAPIER_API R2Status
RAPIER_CALL r2JointDesc_SetContactsEnabled(
struct R2JointDesc *desc, R2Bool value);
9582R2Status
RAPIER_CALL r2ImpulseJoint_SetContactsEnabled(
struct R2ImpulseJointHandle handle,
9590RAPIER_API R2Status
RAPIER_CALL r2JointDesc_SetEnabled(
struct R2JointDesc *desc, R2Bool value);
9598R2Status
RAPIER_CALL r2ImpulseJoint_SetEnabled(
struct R2ImpulseJointHandle handle,
9607R2Status
RAPIER_CALL r2JointDesc_SetSoftness(
struct R2JointDesc *desc,
9608 struct R2SpringCoefficients value);
9616R2Status
RAPIER_CALL r2ImpulseJoint_SetSoftness(
struct R2ImpulseJointHandle handle,
9617 struct R2SpringCoefficients value,
9624RAPIER_API R2Status
RAPIER_CALL r2JointDesc_SetLockedAxes(
struct R2JointDesc *desc, uint8_t value);
9632R2Status
RAPIER_CALL r2ImpulseJoint_SetLockedAxes(
struct R2ImpulseJointHandle handle,
9640RAPIER_API R2Status
RAPIER_CALL r2JointDesc_SetLimitAxes(
struct R2JointDesc *desc, uint8_t value);
9648R2Status
RAPIER_CALL r2ImpulseJoint_SetLimitAxes(
struct R2ImpulseJointHandle handle,
9656RAPIER_API R2Status
RAPIER_CALL r2JointDesc_SetMotorAxes(
struct R2JointDesc *desc, uint8_t value);
9664R2Status
RAPIER_CALL r2ImpulseJoint_SetMotorAxes(
struct R2ImpulseJointHandle handle,
9672RAPIER_API R2Status
RAPIER_CALL r2JointDesc_SetCoupledAxes(
struct R2JointDesc *desc, uint8_t value);
9680R2Status
RAPIER_CALL r2ImpulseJoint_SetCoupledAxes(
struct R2ImpulseJointHandle handle,
9689R2Status
RAPIER_CALL r2JointDesc_SetLocalAxis1(
struct R2JointDesc *desc,
9690 struct R2Vector value);
9698R2Status
RAPIER_CALL r2ImpulseJoint_SetLocalAxis1(
struct R2ImpulseJointHandle handle,
9699 struct R2Vector value,
9707R2Status
RAPIER_CALL r2JointDesc_SetLocalAxis2(
struct R2JointDesc *desc,
9708 struct R2Vector value);
9716R2Status
RAPIER_CALL r2ImpulseJoint_SetLocalAxis2(
struct R2ImpulseJointHandle handle,
9717 struct R2Vector value,
9725R2Status
RAPIER_CALL r2JointDesc_SetLimits(
struct R2JointDesc *desc,
9726 uint32_t joint_axis,
9737R2Status
RAPIER_CALL r2ImpulseJoint_SetLimits(
struct R2ImpulseJointHandle handle,
9738 uint32_t joint_axis,
9748R2Status
RAPIER_CALL r2JointDesc_SetMotor(
struct R2JointDesc *desc,
9749 uint32_t joint_axis,
9750 R2Real target_position,
9751 R2Real target_velocity,
9761R2Status
RAPIER_CALL r2ImpulseJoint_SetMotor(
struct R2ImpulseJointHandle handle,
9762 uint32_t joint_axis,
9763 R2Real target_position,
9764 R2Real target_velocity,
9774R2Status
RAPIER_CALL r2JointDesc_SetMotorMaxForce(
struct R2JointDesc *desc,
9775 uint32_t joint_axis,
9784R2Status
RAPIER_CALL r2ImpulseJoint_SetMotorMaxForce(
struct R2ImpulseJointHandle handle,
9785 uint32_t joint_axis,
9794R2Status
RAPIER_CALL r2JointDesc_SetMotorModel(
struct R2JointDesc *desc,
9795 uint32_t joint_axis,
9804R2Status
RAPIER_CALL r2ImpulseJoint_SetMotorModel(
struct R2ImpulseJointHandle handle,
9805 uint32_t joint_axis,
9814R2Status
RAPIER_CALL r2JointDesc_SetUserData(
struct R2JointDesc *desc,
9815 struct R2UserData value);
9823R2Status
RAPIER_CALL r2ImpulseJoint_SetUserData(
struct R2ImpulseJointHandle handle,
9824 struct R2UserData value,
9832R2Status
RAPIER_CALL r2JointDesc_SetMotorPosition(
struct R2JointDesc *desc,
9833 uint32_t joint_axis,
9834 R2Real target_position,
9844R2Status
RAPIER_CALL r2ImpulseJoint_SetMotorPosition(
struct R2ImpulseJointHandle handle,
9845 uint32_t joint_axis,
9846 R2Real target_position,
9856R2Status
RAPIER_CALL r2JointDesc_SetMotorVelocity(
struct R2JointDesc *desc,
9857 uint32_t joint_axis,
9858 R2Real target_velocity,
9867R2Status
RAPIER_CALL r2ImpulseJoint_SetMotorVelocity(
struct R2ImpulseJointHandle handle,
9868 uint32_t joint_axis,
9869 R2Real target_velocity,
9878RAPIER_API
struct R2JointImpulses
RAPIER_CALL r2ImpulseJoint_Impulses(struct R2ImpulseJointHandle handle);
9884RAPIER_API
struct R2UserData
RAPIER_CALL r2ImpulseJoint_UserData(struct R2ImpulseJointHandle handle);
9890RAPIER_API
size_t RAPIER_CALL r2ImpulseJointCount(
const struct R2World *world);
9897RAPIER_API
size_t RAPIER_CALL r2MultibodyJointCount(
const struct R2World *world);
9903RAPIER_API
struct R2JointDesc
RAPIER_CALL r2MultibodyJoint_Desc(struct R2MultibodyJointHandle handle);
9912R2Status
RAPIER_CALL r2MultibodyJoint_SetDesc(
struct R2MultibodyJointHandle handle,
9913 const struct R2JointDesc *desc,
9920RAPIER_API
struct R2JointBodies
RAPIER_CALL r2MultibodyJoint_Bodies(struct R2MultibodyJointHandle handle);
9929R2SharedShape *
RAPIER_CALL r2ConvexDecompositionSharedShape(
struct R2VectorView vertices,
9930 R2SurfaceElementView indices);
9939R2SharedShape *
RAPIER_CALL r2VoxelsSharedShapeFromPoints(
struct R2Vector voxel_size,
9940 struct R2VectorView points);
9949R2SharedShape *
RAPIER_CALL r2VoxelizedMeshSharedShape(
struct R2VectorView vertices,
9950 R2SurfaceElementView indices,
9958RAPIER_API R2SharedShape *
RAPIER_CALL r2ConvexHullSharedShape(
struct R2VectorView vertices);
9960#if defined(RAPIER_DIM3)
9968R2SharedShape *
RAPIER_CALL r2ConvexMeshSharedShape(
struct R2VectorView vertices,
9969 struct R2TriangleView indices);
9979R2SharedShape *
RAPIER_CALL r2TrimeshSharedShape(
struct R2VectorView vertices,
9980 struct R2TriangleView indices);
9989R2SharedShape *
RAPIER_CALL r2PolylineSharedShape(
struct R2VectorView vertices,
9990 struct R2EdgeView indices);
9992#if defined(RAPIER_DIM2)
10000R2SharedShape *
RAPIER_CALL r2OrientedPolylineSharedShape(
struct R2VectorView vertices,
10001 struct R2EdgeView indices);
10004#if defined(RAPIER_DIM2)
10011RAPIER_API R2SharedShape *
RAPIER_CALL r2ConvexPolylineSharedShape(
struct R2VectorView vertices);
10020R2SharedShape *
RAPIER_CALL r2RoundConvexHullSharedShape(
struct R2VectorView vertices,
10021 R2Real border_radius);
10030R2SharedShape *
RAPIER_CALL r2TrimeshSharedShapeWithFlags(
struct R2VectorView vertices,
10031 struct R2TriangleView indices,
10038RAPIER_API
struct R2World *
RAPIER_CALL r2NewWorld(
void);
10045RAPIER_API R2Status
RAPIER_CALL r2FreeWorld(
struct R2World *world);
10053struct R2VelocityCorrection
RAPIER_CALL r2ReadPidController_RigidBodyCorrection(const struct R2ReadContext *context,
10054 struct R2PidController *controller,
10056 struct R2RigidBodyHandle body,
10057 struct R2Pose target_pose,
10058 struct R2Vector target_linvel,
10059 R2AngVector target_angvel);
10067struct R2VelocityCorrection
RAPIER_CALL r2ReadPdController_RigidBodyCorrection(const struct R2ReadContext *context,
10068 const struct R2PdController *controller,
10069 struct R2RigidBodyHandle body,
10070 struct R2Pose target_pose,
10071 struct R2Vector target_linvel,
10072 R2AngVector target_angvel);
10079RAPIER_API
size_t RAPIER_CALL r2ReadRigidBodyCount(
const struct R2ReadContext *context);
10087size_t RAPIER_CALL r2ReadRigidBodyHandles(
const struct R2ReadContext *context,
10088 struct R2RigidBodyHandle *buffer,
10097R2Bool
RAPIER_CALL r2ReadRigidBody_Contains(
const struct R2ReadContext *context,
10098 struct R2RigidBodyHandle handle);
10105RAPIER_API
size_t RAPIER_CALL r2ReadColliderCount(
const struct R2ReadContext *context);
10113size_t RAPIER_CALL r2ReadColliderHandles(
const struct R2ReadContext *context,
10114 struct R2ColliderHandle *buffer,
10123R2Bool
RAPIER_CALL r2ReadCollider_Contains(
const struct R2ReadContext *context,
10124 struct R2ColliderHandle handle);
10133size_t RAPIER_CALL r2ReadCollider_ShapeIdentity(
const struct R2ReadContext *context,
10134 struct R2ColliderHandle handle);
10142struct R2MassProperties
RAPIER_CALL r2ReadCollider_MassProperties(const struct R2ReadContext *context,
10143 struct R2ColliderHandle handle);
10151uint8_t
RAPIER_CALL r2ReadRigidBody_LockedAxes(
const struct R2ReadContext *context,
10152 struct R2RigidBodyHandle handle);
10160R2Bool
RAPIER_CALL r2ReadCollider_IsVoxels(
const struct R2ReadContext *context,
10161 struct R2ColliderHandle handle);
10169struct R2VoxelQuery
RAPIER_CALL r2ReadCollider_VoxelAtFlatId(const struct R2ReadContext *context,
10170 struct R2ColliderHandle handle,
10179struct R2Pose
RAPIER_CALL r2ReadRigidBody_NextPosition(const struct R2ReadContext *context,
10180 struct R2RigidBodyHandle handle);
10188struct R2Rotation
RAPIER_CALL r2ReadRigidBody_Rotation(const struct R2ReadContext *context,
10189 struct R2RigidBodyHandle handle);
10197struct R2Vector
RAPIER_CALL r2ReadRigidBody_CenterOfMass(const struct R2ReadContext *context,
10198 struct R2RigidBodyHandle handle);
10206struct R2Vector
RAPIER_CALL r2ReadRigidBody_LocalCenterOfMass(const struct R2ReadContext *context,
10207 struct R2RigidBodyHandle handle);
10215struct R2Vector
RAPIER_CALL r2ReadRigidBody_UserForce(const struct R2ReadContext *context,
10216 struct R2RigidBodyHandle handle);
10224R2AngVector
RAPIER_CALL r2ReadRigidBody_UserTorque(
const struct R2ReadContext *context,
10225 struct R2RigidBodyHandle handle);
10233uint32_t
RAPIER_CALL r2ReadRigidBody_BodyType(
const struct R2ReadContext *context,
10234 struct R2RigidBodyHandle handle);
10242R2Real
RAPIER_CALL r2ReadRigidBody_Mass(
const struct R2ReadContext *context,
10243 struct R2RigidBodyHandle handle);
10251R2Real
RAPIER_CALL r2ReadRigidBody_GravityScale(
const struct R2ReadContext *context,
10252 struct R2RigidBodyHandle handle);
10260R2Real
RAPIER_CALL r2ReadRigidBody_LinearDamping(
const struct R2ReadContext *context,
10261 struct R2RigidBodyHandle handle);
10269R2Real
RAPIER_CALL r2ReadRigidBody_AngularDamping(
const struct R2ReadContext *context,
10270 struct R2RigidBodyHandle handle);
10278R2Real
RAPIER_CALL r2ReadRigidBody_KineticEnergy(
const struct R2ReadContext *context,
10279 struct R2RigidBodyHandle handle);
10287R2Real
RAPIER_CALL r2ReadRigidBody_SoftCcdPrediction(
const struct R2ReadContext *context,
10288 struct R2RigidBodyHandle handle);
10296R2Bool
RAPIER_CALL r2ReadRigidBody_IsCcdEnabled(
const struct R2ReadContext *context,
10297 struct R2RigidBodyHandle handle);
10305R2Bool
RAPIER_CALL r2ReadRigidBody_IsDynamic(
const struct R2ReadContext *context,
10306 struct R2RigidBodyHandle handle);
10314struct R2SoftBodyHandle
RAPIER_CALL r2ReadRigidBody_SoftBody(const struct R2ReadContext *context,
10315 struct R2RigidBodyHandle handle);
10323R2Bool
RAPIER_CALL r2ReadRigidBody_IsSoftFrame(
const struct R2ReadContext *context,
10324 struct R2RigidBodyHandle handle);
10332R2Bool
RAPIER_CALL r2ReadRigidBody_IsFixed(
const struct R2ReadContext *context,
10333 struct R2RigidBodyHandle handle);
10341R2Bool
RAPIER_CALL r2ReadRigidBody_IsKinematic(
const struct R2ReadContext *context,
10342 struct R2RigidBodyHandle handle);
10350R2Bool
RAPIER_CALL r2ReadRigidBody_IsMoving(
const struct R2ReadContext *context,
10351 struct R2RigidBodyHandle handle);
10359R2Bool
RAPIER_CALL r2ReadRigidBody_IsCcdActive(
const struct R2ReadContext *context,
10360 struct R2RigidBodyHandle handle);
10368struct R2Vector
RAPIER_CALL r2ReadRigidBody_VelocityAtPoint(const struct R2ReadContext *context,
10369 struct R2RigidBodyHandle handle,
10370 struct R2Vector point);
10379size_t RAPIER_CALL r2ReadRigidBody_Colliders(
const struct R2ReadContext *context,
10380 struct R2RigidBodyHandle handle,
10381 struct R2ColliderHandle *buffer,
10384#if defined(RAPIER_DIM3)
10391R2Bool
RAPIER_CALL r2ReadRigidBody_GyroscopicForcesEnabled(
const struct R2ReadContext *context,
10392 struct R2RigidBodyHandle handle);
10401struct R2Rotation
RAPIER_CALL r2ReadCollider_Rotation(const struct R2ReadContext *context,
10402 struct R2ColliderHandle handle);
10410struct R2InteractionGroups
RAPIER_CALL r2ReadCollider_CollisionGroups(const struct R2ReadContext *context,
10411 struct R2ColliderHandle handle);
10419struct R2InteractionGroups
RAPIER_CALL r2ReadCollider_SolverGroups(const struct R2ReadContext *context,
10420 struct R2ColliderHandle handle);
10428struct R2UserData
RAPIER_CALL r2ReadCollider_UserData(const struct R2ReadContext *context,
10429 struct R2ColliderHandle handle);
10437uint32_t
RAPIER_CALL r2ReadCollider_ActiveEvents(
const struct R2ReadContext *context,
10438 struct R2ColliderHandle handle);
10445R2Real
RAPIER_CALL r2ReadCollider_Mass(
const struct R2ReadContext *context,
10446 struct R2ColliderHandle handle);
10454R2Real
RAPIER_CALL r2ReadCollider_Density(
const struct R2ReadContext *context,
10455 struct R2ColliderHandle handle);
10463R2Real
RAPIER_CALL r2ReadCollider_Volume(
const struct R2ReadContext *context,
10464 struct R2ColliderHandle handle);
10472R2Real
RAPIER_CALL r2ReadCollider_ContactSkin(
const struct R2ReadContext *context,
10473 struct R2ColliderHandle handle);
10481R2Real
RAPIER_CALL r2ReadCollider_ContactForceEventThreshold(
const struct R2ReadContext *context,
10482 struct R2ColliderHandle handle);
10490R2Bool
RAPIER_CALL r2ReadCollider_IsEnabled(
const struct R2ReadContext *context,
10491 struct R2ColliderHandle handle);
10499struct R2Aabb
RAPIER_CALL r2ReadCollider_ComputeAabb(const struct R2ReadContext *context,
10500 struct R2ColliderHandle handle);
10509R2SharedShape *
RAPIER_CALL r2ReadCollider_CloneShape(
const struct R2ReadContext *context,
10510 struct R2ColliderHandle handle);
10518R2Status
RAPIER_CALL r2ReadRigidBody_ValidateHandle(
const struct R2ReadContext *context,
10519 struct R2RigidBodyHandle handle);
10527R2Status
RAPIER_CALL r2ReadCollider_ValidateHandle(
const struct R2ReadContext *context,
10528 struct R2ColliderHandle handle);
10536struct R2Pose
RAPIER_CALL r2ReadRigidBody_Position(const struct R2ReadContext *context,
10537 struct R2RigidBodyHandle handle);
10545struct R2Vector
RAPIER_CALL r2ReadRigidBody_Translation(const struct R2ReadContext *context,
10546 struct R2RigidBodyHandle handle);
10554struct R2Vector
RAPIER_CALL r2ReadRigidBody_Linvel(const struct R2ReadContext *context,
10555 struct R2RigidBodyHandle handle);
10563R2AngVector
RAPIER_CALL r2ReadRigidBody_Angvel(
const struct R2ReadContext *context,
10564 struct R2RigidBodyHandle handle);
10572R2Bool
RAPIER_CALL r2ReadRigidBody_IsSleeping(
const struct R2ReadContext *context,
10573 struct R2RigidBodyHandle handle);
10581R2Bool
RAPIER_CALL r2ReadRigidBody_IsEnabled(
const struct R2ReadContext *context,
10582 struct R2RigidBodyHandle handle);
10590struct R2UserData
RAPIER_CALL r2ReadRigidBody_UserData(const struct R2ReadContext *context,
10591 struct R2RigidBodyHandle handle);
10599struct R2Pose
RAPIER_CALL r2ReadCollider_Position(const struct R2ReadContext *context,
10600 struct R2ColliderHandle handle);
10608struct R2Vector
RAPIER_CALL r2ReadCollider_Translation(const struct R2ReadContext *context,
10609 struct R2ColliderHandle handle);
10617R2Real
RAPIER_CALL r2ReadCollider_Friction(
const struct R2ReadContext *context,
10618 struct R2ColliderHandle handle);
10626R2Real
RAPIER_CALL r2ReadCollider_Restitution(
const struct R2ReadContext *context,
10627 struct R2ColliderHandle handle);
10635R2Bool
RAPIER_CALL r2ReadCollider_IsSensor(
const struct R2ReadContext *context,
10636 struct R2ColliderHandle handle);
10644struct R2RigidBodyHandle
RAPIER_CALL r2ReadCollider_Parent(const struct R2ReadContext *context,
10645 struct R2ColliderHandle handle);
10654size_t RAPIER_CALL r2ReadRigidBodyReadStates(
const struct R2ReadContext *context,
10655 const struct R2RigidBodyHandle *handles,
10656 size_t handle_count,
10657 struct R2RigidBodyState *states,
10666uint16_t
RAPIER_CALL r2ReadCollider_ActiveCollisionTypes(
const struct R2ReadContext *context,
10667 struct R2ColliderHandle handle);
10675uint32_t
RAPIER_CALL r2ReadCollider_ActiveHooks(
const struct R2ReadContext *context,
10676 struct R2ColliderHandle handle);
10684uint32_t
RAPIER_CALL r2ReadCollider_FrictionCombineRule(
const struct R2ReadContext *context,
10685 struct R2ColliderHandle handle);
10693uint32_t
RAPIER_CALL r2ReadCollider_RestitutionCombineRule(
const struct R2ReadContext *context,
10694 struct R2ColliderHandle handle);
10703struct R2Pose
RAPIER_CALL r2ReadCollider_PositionWrtParent(const struct R2ReadContext *context,
10704 struct R2ColliderHandle handle);
10712int8_t
RAPIER_CALL r2ReadRigidBody_DominanceGroup(
const struct R2ReadContext *context,
10713 struct R2RigidBodyHandle handle);
10721size_t RAPIER_CALL r2ReadRigidBody_AdditionalSolverIterations(
const struct R2ReadContext *context,
10722 struct R2RigidBodyHandle handle);
10730size_t RAPIER_CALL r2ReadRigidBody_AdditionalPgsIterations(
const struct R2ReadContext *context,
10731 struct R2RigidBodyHandle handle);
10739R2Bool
RAPIER_CALL r2ReadRigidBody_IsFastRotationAllowed(
const struct R2ReadContext *context,
10740 struct R2RigidBodyHandle handle);
10752size_t RAPIER_CALL r2IntersectRay(
const struct R2World *world,
10753 const struct R2QueryOptions *query_options,
10754 struct R2Vector origin,
10755 struct R2Vector direction,
10758 struct R2RayHit *buffer,
10769struct R2OptionalShapeCastHit
RAPIER_CALL r2TryCastShape(const struct R2World *world,
10770 const struct R2QueryOptions *query_options,
10771 struct R2Pose pose,
10772 struct R2Vector velocity,
10773 const R2SharedShape *shape,
10774 struct R2ShapeCastOptions options);
10784struct R2OptionalPointProjection
RAPIER_CALL r2TryProjectPoint(const struct R2World *world,
10785 const struct R2QueryOptions *query_options,
10786 struct R2Vector point,
10787 R2Real max_distance,
10795struct R2Pose
RAPIER_CALL r2NonlinearRigidMotion_PositionAtTime(const struct R2NonlinearRigidMotion *motion,
10809struct R2OptionalShapeCastHit
RAPIER_CALL r2TryCastShapeNonlinear(const struct R2World *world,
10810 const struct R2QueryOptions *query_options,
10811 const struct R2NonlinearRigidMotion *motion,
10812 const R2SharedShape *shape,
10815 R2Bool stop_at_penetration);
10824struct R2OptionalContactPair
RAPIER_CALL r2TryContactPair(struct R2ColliderHandle collider1,
10825 struct R2ColliderHandle collider2);
10833struct R2IntersectionPair
RAPIER_CALL r2IntersectionPair(struct R2ColliderHandle collider1,
10834 struct R2ColliderHandle collider2);
10842struct R2OptionalIntersectionPair
RAPIER_CALL r2TryIntersectionPair(struct R2ColliderHandle collider1,
10843 struct R2ColliderHandle collider2);
10852size_t RAPIER_CALL r2Collider_ContactPairs(
struct R2ColliderHandle handle,
10853 struct R2ContactPair *buffer,
10863size_t RAPIER_CALL r2Collider_IntersectionPairs(
struct R2ColliderHandle handle,
10864 struct R2IntersectionPair *buffer,
10875size_t RAPIER_CALL r2ContactManifolds(
struct R2ColliderHandle collider1,
10876 struct R2ColliderHandle collider2,
10877 struct R2ContactManifold *buffer,
10888size_t RAPIER_CALL r2SolverContacts(
struct R2ColliderHandle collider1,
10889 struct R2ColliderHandle collider2,
10890 size_t manifold_index,
10891 struct R2SolverContact *buffer,
10900R2Bool
RAPIER_CALL r2ContactModificationContext_IsSoft(
const struct R2ContactModificationContext *context);
10907size_t RAPIER_CALL r2ContactModificationContext_SolverContactCount(
const struct R2ContactModificationContext *context);
10914struct R2SolverContact
RAPIER_CALL r2ContactModificationContext_SolverContact(const struct R2ContactModificationContext *context,
10923R2Status
RAPIER_CALL r2ContactModificationContext_SetSolverContact(
struct R2ContactModificationContext *context,
10925 const struct R2SolverContact *contact);
10932R2Status
RAPIER_CALL r2ContactModificationContext_RemoveSolverContact(
struct R2ContactModificationContext *context,
10941R2Status
RAPIER_CALL r2EventCollector_SetCallbacks(
struct R2EventCollector *events,
10942 const struct R2EventCallbacks *callbacks);
10948RAPIER_API
struct R2DebugRenderStyle
RAPIER_CALL r2DefaultDebugRenderStyle(void);
10957size_t RAPIER_CALL r2DebugRenderWithStyle(
const struct R2World *world,
10959 const struct R2DebugRenderStyle *style,
10960 struct R2DebugLine *buffer,
10969#if defined(RAPIER_DIM3)
10975#define R3_FRICTION_MODEL_SIMPLIFIED 0
10978#if defined(RAPIER_DIM3)
10983#define R3_FRICTION_MODEL_COULOMB 1
10986#if defined(RAPIER_DIM2)
10991#define R3_JOINT_DOF_COUNT 3
10994#if defined(RAPIER_DIM3)
10999#define R3_JOINT_DOF_COUNT 6
11006#define R3_SOFT_DESC_PARTICLES 0
11012#define R3_SOFT_DESC_ROPE 1
11018#define R3_SOFT_DESC_GRID 2
11024#define R3_SOFT_DESC_CLOTH 3
11030#define R3_SOFT_DESC_CUBOID 4
11036#define R3_SOFT_DESC_SURFACE 5
11042#define R3_SOFT_DESC_DISK 6
11048#define R3_SOFT_DESC_SPHERE 7
11054#define R3_SOFT_DESC_CLOTH_TUBE 8
11060#define R3_SOFT_DESC_VOLUMETRIC 9
11062#if defined(RAPIER_DIM2)
11067#define R3_SOFT_DESC_POLYGON 10
11070#if defined(RAPIER_DIM2)
11075#define R3_SOFT_DESC_TRIMESH 11
11078#if defined(RAPIER_DIM3)
11083#define R3_SOFT_DESC_CLOTH_ANISOTROPIC 12
11090#define R3_SOFT_BINDING_SKINNED 0
11096#define R3_SOFT_BINDING_DIRECT 1
11102#define R3_SOFT_BINDING_DIRECT_BY_POSITION 2
11104#if defined(RAPIER_DIM2)
11109#define R3_POLYLINE_ORIENTED 1
11116#define R3_POLYLINE_DEFORMABLE 2
11122#define R3_SHAPE_DESC_BALL 0
11128#define R3_SHAPE_DESC_CUBOID 1
11134#define R3_SHAPE_DESC_ROUND_CUBOID 2
11140#define R3_SHAPE_DESC_CAPSULE 3
11146#define R3_SHAPE_DESC_SEGMENT 4
11152#define R3_SHAPE_DESC_TRIANGLE 5
11158#define R3_SHAPE_DESC_HALFSPACE 6
11164#define R3_SHAPE_DESC_CONVEX_HULL 7
11170#define R3_SHAPE_DESC_TRIMESH 8
11176#define R3_SHAPE_DESC_POLYLINE 9
11182#define R3_SHAPE_DESC_SHARED 10
11188#define R3_SHAPE_DESC_HEIGHTFIELD 11
11194#define R3_SHAPE_DESC_CYLINDER 12
11200#define R3_SHAPE_DESC_CONE 13
11206#define R3_SHAPE_DESC_COMPOUND 14
11212#define R3_SHAPE_DESC_ROUND_CYLINDER 15
11218#define R3_SHAPE_DESC_ROUND_CONE 16
11224#define R3_MASS_DENSITY 0
11230#define R3_MASS_TOTAL 1
11236#define R3_MASS_PROPERTIES 2
11242#define R3_ABI_VERSION 1
11248#define R3_DYNAMIC 0
11260#define R3_KINEMATIC_POSITION_BASED 2
11266#define R3_KINEMATIC_VELOCITY_BASED 3
11272#define R3_COLLISION_EVENTS 1
11278#define R3_CONTACT_FORCE_EVENTS 2
11284#define R3_COMBINE_AVERAGE 0
11290#define R3_COMBINE_MIN 1
11296#define R3_COMBINE_MULTIPLY 2
11302#define R3_COMBINE_MAX 3
11308#define R3_COMBINE_CLAMPED_SUM 4
11314#define R3_COMBINE_GEOMETRIC_MEAN 5
11320#define R3_COLLISION_TYPES_DYNAMIC_DYNAMIC 1
11326#define R3_COLLISION_TYPES_DYNAMIC_KINEMATIC 12
11332#define R3_COLLISION_TYPES_DYNAMIC_FIXED 2
11338#define R3_COLLISION_TYPES_KINEMATIC_KINEMATIC 52224
11344#define R3_COLLISION_TYPES_KINEMATIC_FIXED 8704
11350#define R3_COLLISION_TYPES_FIXED_FIXED 32
11356#define R3_COLLISION_TYPES_DEFAULT 15
11362#define R3_FILTER_CONTACT_PAIRS 1
11368#define R3_FILTER_INTERSECTION_PAIR 2
11374#define R3_MODIFY_SOLVER_CONTACTS 4
11380#define R3_QUERY_EXCLUDE_FIXED 1
11386#define R3_QUERY_EXCLUDE_KINEMATIC 2
11392#define R3_QUERY_EXCLUDE_DYNAMIC 4
11398#define R3_QUERY_EXCLUDE_SENSORS 8
11404#define R3_QUERY_EXCLUDE_SOLIDS 16
11410#define R3_QUERY_ONLY_DYNAMIC 3
11416#define R3_QUERY_ONLY_KINEMATIC 5
11422#define R3_QUERY_ONLY_FIXED 6
11428#define R3_DEBUG_COLLIDER_SHAPES 1
11434#define R3_DEBUG_RIGID_BODY_AXES 2
11440#define R3_DEBUG_MULTIBODY_JOINTS 4
11446#define R3_DEBUG_IMPULSE_JOINTS 8
11452#define R3_DEBUG_SOLVER_CONTACTS 16
11458#define R3_DEBUG_CONTACTS 32
11464#define R3_DEBUG_COLLIDER_AABBS 64
11470#define R3_DEBUG_SOFT_BODIES 128
11476#define R3_DEBUG_PSEUDO_NORMALS 256
11482#define R3_DEBUG_SOFT_VOLUME_CONTACTS 512
11488#define R3_DEBUG_SOFT_BODY_STRESS 1024
11494#define R3_GROUPS_AND 0
11500#define R3_GROUPS_OR 1
11506#define R3_MOTOR_ACCELERATION_BASED 0
11512#define R3_MOTOR_FORCE_BASED 1
11518#define R3_SOFT_CELL_VOLUME 0
11524#define R3_SOFT_CELL_COROTATIONAL 1
11530#define R3_SOFT_CELL_NEO_HOOKEAN 2
11536#define R3_SOFT_SOLVER_CONSTRAINTS 0
11542#define R3_SOFT_SOLVER_FEM 1
11548#define R3_SOFT_EDGE_PLASTIC_FLOW_BOTH 0
11554#define R3_SOFT_EDGE_PLASTIC_FLOW_COMPRESSION 1
11560#define R3_SOFT_EDGE_PLASTIC_FLOW_TENSION 2
11566#define R3_SOFT_PATCH_CONSTRAINTS_KEEP 0
11572#define R3_SOFT_PATCH_CONSTRAINTS_STAND_DOWN 1
11578#define R3_SOFT_PATCH_CONSTRAINTS_ALONG_NORMAL 2
11584#define R3_AXIS_LIN_X 0
11590#define R3_AXIS_LIN_Y 1
11596#define R3_LOCK_TRANSLATION_X 1
11602#define R3_LOCK_TRANSLATION_Y 2
11608#define R3_LOCK_TRANSLATION_Z 4
11614#define R3_LOCK_ROTATION_X 8
11620#define R3_LOCK_ROTATION_Y 16
11626#define R3_LOCK_ROTATION_Z 32
11628#if defined(RAPIER_DIM2)
11633#define R3_AXIS_ANG_X 2
11636#if defined(RAPIER_DIM3)
11641#define R3_AXIS_ANG_X 3
11644#if defined(RAPIER_DIM2)
11649#define R3_JOINT_FIXED_AXES 7
11652#if defined(RAPIER_DIM3)
11657#define R3_JOINT_FIXED_AXES 63
11660#if defined(RAPIER_DIM2)
11665#define R3_JOINT_REVOLUTE_AXES 3
11668#if defined(RAPIER_DIM3)
11673#define R3_JOINT_REVOLUTE_AXES 55
11676#if defined(RAPIER_DIM2)
11681#define R3_JOINT_PRISMATIC_AXES 6
11684#if defined(RAPIER_DIM3)
11689#define R3_JOINT_PRISMATIC_AXES 62
11692#if defined(RAPIER_DIM3)
11697#define R3_AXIS_LIN_Z 2
11700#if defined(RAPIER_DIM3)
11705#define R3_AXIS_ANG_Y 4
11708#if defined(RAPIER_DIM3)
11713#define R3_AXIS_ANG_Z 5
11716#if defined(RAPIER_DIM3)
11721#define R3_JOINT_SPHERICAL_AXES 7
11728#define R3_SOFT_FRAME 4
11734#define R3_SHAPE_CAST_OUT_OF_ITERATIONS 0
11740#define R3_SHAPE_CAST_CONVERGED 1
11746#define R3_SHAPE_CAST_FAILED 2
11752#define R3_SHAPE_CAST_PENETRATING 3
11758#define R3_FEATURE_UNKNOWN 0
11764#define R3_FEATURE_VERTEX 1
11770#define R3_FEATURE_EDGE 2
11776#define R3_FEATURE_FACE 3
11782#define R3_MULTIBODY_JOINTS_ARE_KINEMATIC 1
11788#define R3_MULTIBODY_DISABLE_SELF_CONTACTS 2
11795#define R3_MULTIBODY_SKIP_LOOP_CLOSURES 4
11801#define R3_MULTIBODY_SKIP_JOINT_MOTORS 8
11807#define R3_MULTIBODY_SKIP_JOINT_LIMITS 16
11813#define R3_MULTIBODY_SKIP_JOINT_SPRINGS 32
11819#define R3_TRIMESH_HALF_EDGE_TOPOLOGY 1
11825#define R3_TRIMESH_CONNECTED_COMPONENTS 2
11831#define R3_TRIMESH_DELETE_BAD_TOPOLOGY_TRIANGLES 4
11837#define R3_TRIMESH_ORIENTED 8
11843#define R3_TRIMESH_MERGE_DUPLICATE_VERTICES 16
11849#define R3_TRIMESH_DELETE_DEGENERATE_TRIANGLES 32
11855#define R3_TRIMESH_DELETE_DUPLICATE_TRIANGLES 64
11861#define R3_TRIMESH_FIX_INTERNAL_EDGES 144
11867#define R3_TRIMESH_DEFORMABLE 256
11873#define R3_TRIMESH_FIX_INTERNAL_EDGES_TWO_SIDED 656
11879#define R3_HEIGHTFIELD_FIX_INTERNAL_EDGES 1
11885#define R3_AXES_MASK_LIN_X 1
11891#define R3_AXES_MASK_LIN_Y 2
11893#if defined(RAPIER_DIM3)
11898#define R3_AXES_MASK_LIN_Z 4
11901#if defined(RAPIER_DIM3)
11906#define R3_AXES_MASK_ANG_X 8
11909#if defined(RAPIER_DIM3)
11914#define R3_AXES_MASK_ANG_Y 16
11921#define R3_AXES_MASK_ANG_Z 32
11927#define R3_ABI_FEATURE_FEM 1
11933#define R3_ABI_FEATURE_ROBOTICS 2
11935#if (defined(RAPIER_FEM) && defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
11940#define R3_ABI_FEATURES 3
11943#if (defined(RAPIER_FEM) && !(defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32)))
11948#define R3_ABI_FEATURES 1
11951#if (!defined(RAPIER_FEM) && defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
11956#define R3_ABI_FEATURES 2
11959#if (!defined(RAPIER_FEM) && !(defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32)))
11964#define R3_ABI_FEATURES 0
11967#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
11972#define R3_MESH_CONVERTER_TRIMESH 0
11975#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
11980#define R3_MESH_CONVERTER_OBB 1
11983#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
11988#define R3_MESH_CONVERTER_AABB 2
11991#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
11996#define R3_MESH_CONVERTER_CONVEX_HULL 3
11999#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
12004#define R3_MESH_CONVERTER_CONVEX_DECOMPOSITION 4
12011#define R3_COLLISION_EVENT_SENSOR 1
12017#define R3_COLLISION_EVENT_REMOVED 2
12031#if defined(RAPIER_DIM3)
12055#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
12064#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
12073#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
12081#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
12118#if defined(RAPIER_DIM3)
12126#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
12135#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
12152#if defined(RAPIER_F32)
12160#if defined(RAPIER_F64)
12426#if defined(RAPIER_FEM)
12468#if defined(RAPIER_FEM)
12561#if defined(RAPIER_DIM3)
12588#if defined(RAPIER_DIM3)
12601#if defined(RAPIER_DIM2)
12607#if defined(RAPIER_DIM3)
12613#if defined(RAPIER_DIM3)
12619#if defined(RAPIER_DIM3)
12625#if defined(RAPIER_DIM3)
12838#if defined(RAPIER_DIM2)
12844#if defined(RAPIER_DIM3)
12850#if defined(RAPIER_DIM3)
12856#if defined(RAPIER_DIM3)
12862#if defined(RAPIER_DIM3)
13095#if defined(RAPIER_DIM2)
13103#if defined(RAPIER_DIM3)
13111#if defined(RAPIER_DIM2)
13119#if defined(RAPIER_DIM3)
13317#if defined(RAPIER_DIM2)
13325#if defined(RAPIER_DIM3)
13351#if defined(RAPIER_DIM3)
13496#if defined(RAPIER_DIM3)
13502#if defined(RAPIER_DIM3)
13508#if defined(RAPIER_DIM3)
13586#if defined(RAPIER_DIM3)
13592#if defined(RAPIER_DIM3)
14311#if defined(RAPIER_DIM3)
14348#if defined(RAPIER_DIM3)
14864#if defined(RAPIER_DIM2)
14870#if defined(RAPIER_DIM3)
14878#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
14928#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
14982#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
14990#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
15015#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
15121#if defined(RAPIER_F32)
15129#if defined(RAPIER_F64)
15150#if defined(RAPIER_DIM3)
15361 size_t contact_count);
15520#define R3_NULL_POINTER 1
15526#define R3_INVALID_ARGUMENT 2
15532#define R3_INVALID_HANDLE 3
15538#define R3_BUFFER_TOO_SMALL 4
15544#define R3_UNSUPPORTED 5
15556#define R3_NOT_FOUND 7
15562#define R3_WORLD_BUSY 8
15580#if defined(RAPIER_FEM)
15626#if defined(RAPIER_DIM2)
15634#if defined(RAPIER_DIM3)
15663#if defined(RAPIER_DIM3)
15671#if defined(RAPIER_DIM2)
15991 R3Real min_slide_angle);
16002 R3Bool include_dynamic_bodies);
16065 struct
R3Vector desired_translation);
16155 struct
R3Pose target_pose,
16167 struct
R3Pose target_pose,
16178#if defined(RAPIER_DIM3)
16186#if defined(RAPIER_DIM3)
16196#if defined(RAPIER_DIM3)
16206#if defined(RAPIER_DIM3)
16222#if defined(RAPIER_DIM3)
16233#if defined(RAPIER_DIM3)
16246#if defined(RAPIER_DIM3)
16261#if defined(RAPIER_DIM3)
16270#if defined(RAPIER_DIM3)
16380#if defined(RAPIER_DIM3)
16388#if defined(RAPIER_DIM3)
16482 const R3Real *displacements,
16575 R3Bool remove_attached_colliders);
17163#if defined(RAPIER_FEM)
17171#if defined(RAPIER_FEM)
17179#if defined(RAPIER_FEM)
17292 uint32_t particle);
17353 size_t piece_index,
17384 const uint32_t *edges,
17386 const uint32_t *cells,
17387 size_t cell_count);
17395 const uint32_t *particles,
17413 uint32_t particle);
17570 uint32_t dimension,
17572 size_t vector_size,
17574 uint32_t features);
17615#if defined(RAPIER_DIM3)
17623#if defined(RAPIER_DIM3)
17694 uint32_t subdivisions);
17723#if defined(RAPIER_DIM3)
17734#if defined(RAPIER_DIM3)
17745#if defined(RAPIER_DIM3)
17759#if defined(RAPIER_DIM3)
17771#if defined(RAPIER_DIM3)
17783#if defined(RAPIER_DIM3)
17792#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17800#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17809#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17820#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17827 struct R3Pose transform);
17830#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17839#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17849#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17860#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17873#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17881#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17890#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17901#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17908 struct R3Pose transform);
17911#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17920#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17930#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17941#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17953#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17961#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17969#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17977#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17989#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17997#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18010#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18021#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18034#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18042#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18053#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18065#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18073#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18085#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18093#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18102#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18114#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18126#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18138#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18147 const char *mesh_dir,
18151#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18160#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18171#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18182#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18191#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18201 uint32_t converter,
18202 uint32_t trimesh_flags,
18206#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18214#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18226#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18568 size_t handle_count,
18710#if defined(RAPIER_DIM2)
18827#if defined(RAPIER_DIM3)
18840#if defined(RAPIER_DIM3)
18896#if defined(RAPIER_DIM3)
18905#if defined(RAPIER_DIM3)
18914#if defined(RAPIER_DIM3)
18926#if defined(RAPIER_DIM3)
18952#if defined(RAPIER_DIM3)
18971#if defined(RAPIER_DIM2)
18984#if defined(RAPIER_DIM3)
18998#if defined(RAPIER_DIM3)
19012#if defined(RAPIER_DIM3)
19031#if defined(RAPIER_DIM2)
19042#if defined(RAPIER_DIM2)
19055#if defined(RAPIER_DIM3)
19064 uint32_t subdivisions);
19067#if defined(RAPIER_DIM3)
19404#if defined(RAPIER_FEM)
19412#if defined(RAPIER_FEM)
19420#if defined(RAPIER_FEM)
19801#if defined(RAPIER_FEM)
19816 const struct R3Pose *target);
20187#if defined(RAPIER_DIM3)
20195#if defined(RAPIER_DIM3)
20628 uint32_t joint_axis,
20640 uint32_t joint_axis,
20651 uint32_t joint_axis,
20664 uint32_t joint_axis,
20677 uint32_t joint_axis,
20687 uint32_t joint_axis,
20697 uint32_t joint_axis,
20707 uint32_t joint_axis,
20735 uint32_t joint_axis,
20747 uint32_t joint_axis,
20759 uint32_t joint_axis,
20770 uint32_t joint_axis,
20862#if defined(RAPIER_DIM3)
20894#if defined(RAPIER_DIM2)
20906#if defined(RAPIER_DIM2)
20959 struct
R3Pose target_pose,
20972 struct
R3Pose target_pose,
21286#if defined(RAPIER_DIM3)
21558 size_t handle_count,
21717 R3Bool stop_at_penetration);
21792 size_t manifold_index,
R3AngVector r3ReadRigidBody_Angvel(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body world-space angular velocity (radians per second).
size_t r3ReadColliderHandles(const struct R3ReadContext *context, struct R3ColliderHandle *buffer, size_t capacity)
Copy entity handles.
R3Real r3ReadCollider_Friction(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider friction coefficient.
struct R3VelocityCorrection r3ReadPdController_RigidBodyCorrection(const struct R3ReadContext *context, const struct R3PdController *controller, struct R3RigidBodyHandle body, struct R3Pose target_pose, struct R3Vector target_linvel, R3AngVector target_angvel)
Compute a PD velocity correction from callback-visible body state.
uint32_t r3ReadRigidBody_BodyType(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body body type (R3_DYNAMIC, R3_FIXED, or a kinematic kind).
uint32_t r3ReadCollider_RestitutionCombineRule(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider restitution combination rule (R3_COMBINE_*).
R3Status r3ReadCollider_ValidateHandle(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Validate the index and generation in the live owning world.
R3Real r3ReadRigidBody_LinearDamping(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body linear damping coefficient.
R3Status r3ContactModificationContext_UpdateAsOnewayPlatform(struct R3ContactModificationContext *context, struct R3Vector allowed_local_n1, R3Real allowed_angle)
Applies Rapier's persistent one-way platform logic to the borrowed manifold.
R3Real r3ReadRigidBody_Mass(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body mass.
R3Bool r3ReadRigidBody_Contains(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Test whether the live world contains this rigid body handle.
R3Bool r3ReadRigidBody_IsEnabled(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return whether the rigid body is enabled.
size_t r3ReadRigidBodyCount(const struct R3ReadContext *context)
Return the number of rigid body objects in the world.
void(*) R3ModifyContactContext(void *user_data, const struct R3ReadContext *read, struct R3ColliderHandle collider1, struct R3ColliderHandle collider2, struct R3ContactModificationContext *context)
Modify individual solver contacts through a borrowed context, valid only during the callback.
Definition rapier.h:14583
struct R3Pose r3ReadCollider_Position(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider world-space pose.
uint32_t r3ReadCollider_FrictionCombineRule(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider friction combination rule (R3_COMBINE_*).
R3Real r3ReadCollider_Restitution(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider restitution coefficient.
R3Bool r3ReadRigidBody_IsMoving(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return whether the rigid body is moving.
struct R3Vector r3ReadRigidBody_VelocityAtPoint(const struct R3ReadContext *context, struct R3RigidBodyHandle handle, struct R3Vector point)
Return world-space velocity at a world-space point, including angular motion.
size_t r3ReadColliderCount(const struct R3ReadContext *context)
Return the number of collider objects in the world.
uint32_t r3ReadCollider_ActiveHooks(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider physics-hook activation bitmask.
R3Real r3ReadRigidBody_SoftCcdPrediction(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body soft-CCD prediction distance.
uint16_t r3ReadCollider_ActiveCollisionTypes(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider body-type collision activation bitmask (R3_COLLISION_TYPES_* bits).
struct R3Rotation r3ReadCollider_Rotation(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider world-space rotation.
struct R3VoxelQuery r3ReadCollider_VoxelAtFlatId(const struct R3ReadContext *context, struct R3ColliderHandle handle, uint32_t id)
Return voxel information at a flat index; found = 0 if absent.
struct R3Aabb r3ReadCollider_ComputeAabb(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the current world-space axis-aligned bounds.
void(*) R3ModifyContacts(void *user_data, const struct R3ReadContext *read, struct R3ColliderHandle collider1, struct R3ColliderHandle collider2, struct R3ContactModification *contact)
Modify aggregate contact properties for one pair; contact is mutable only during this callback.
Definition rapier.h:14573
struct R3Vector r3ReadRigidBody_Translation(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body world-space translation.
struct R3Vector r3ReadRigidBody_CenterOfMass(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body world-space center of mass.
struct R3RigidBodyHandle r3ReadCollider_Parent(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Read the parent body handle during a callback; a standalone collider returns an invalid handle with O...
R3Bool r3ReadCollider_IsSensor(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return whether the collider is a sensor (detects overlaps without contact forces).
struct R3MassProperties r3ReadCollider_MassProperties(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider local mass properties.
struct R3ContactModificationContext R3ContactModificationContext
Borrowed native contact context.
Definition rapier.h:12029
struct R3ReadContext R3ReadContext
Callback-scoped read access to bodies and colliders.
Definition rapier.h:12102
struct R3InteractionGroups r3ReadCollider_CollisionGroups(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider collision filtering groups.
R3Bool r3ReadCollider_IsEnabled(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return whether the collider is enabled.
R3Bool r3ReadRigidBody_IsDynamic(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return whether the rigid body is dynamic.
R3Real r3ReadRigidBody_KineticEnergy(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body kinetic energy.
size_t r3ReadCollider_ShapeIdentity(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return a process-local geometry identity for caching, not a serializable ID.
R3Bool r3ReadRigidBody_IsCcdActive(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return whether the rigid body is currently using CCD for its motion.
R3Real r3ReadCollider_Density(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider mass per unit volume.
size_t r3ReadRigidBody_AdditionalPgsIterations(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body additional PGS iterations for connected bodies.
struct R3Vector r3ReadRigidBody_Linvel(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body world-space linear velocity.
struct R3UserData r3ReadCollider_UserData(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider application-owned 128-bit user value.
struct R3Vector r3ReadRigidBody_LocalCenterOfMass(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body body-local center of mass.
struct R3SolverContact r3ContactModificationContext_SolverContact(const struct R3ContactModificationContext *context, size_t index)
Return a solver contact of the manifold.
R3Real r3ReadRigidBody_AngularDamping(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body angular damping coefficient.
R3SharedShape * r3ReadCollider_CloneShape(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return an owned wrapper sharing the collider geometry.
R3Status r3ReadRigidBody_ValidateHandle(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Validate the index and generation in the live owning world.
size_t r3ReadRigidBody_AdditionalSolverIterations(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body additional solver iterations for connected bodies.
uint8_t r3ReadRigidBody_LockedAxes(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body translation/rotation lock bitmask.
struct R3Vector r3ReadRigidBody_UserForce(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body accumulated user-applied world-space force.
struct R3VelocityCorrection r3ReadPidController_RigidBodyCorrection(const struct R3ReadContext *context, struct R3PidController *controller, R3Real dt, struct R3RigidBodyHandle body, struct R3Pose target_pose, struct R3Vector target_linvel, R3AngVector target_angvel)
Compute a velocity correction from callback-visible body state, updating the PID controller history.
R3Bool r3ReadRigidBody_IsFixed(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return whether the rigid body is fixed.
int32_t(*) R3PairFilter(void *user_data, const struct R3ReadContext *read, struct R3ColliderHandle collider1, struct R3ColliderHandle collider2, struct R3RigidBodyHandle body1, struct R3RigidBodyHandle body2)
Pair callback: -1 rejects a contact pair; 0 detects contacts without impulses; 1 computes impulses.
Definition rapier.h:14535
R3Real r3ReadCollider_Mass(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider mass.
R3Bool r3ReadRigidBody_GyroscopicForcesEnabled(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return whether the rigid body is using gyroscopic forces.
R3Status r3ContactModificationContext_SetSolverContact(struct R3ContactModificationContext *context, size_t index, const struct R3SolverContact *contact)
Replace the points, distance and tangent velocity of a solver contact of the manifold.
uint32_t r3ReadCollider_ActiveEvents(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider event-generation bitmask (R3_COLLISION_EVENTS and R3_CONTACT_FORCE_EVENTS).
size_t r3ReadRigidBody_Colliders(const struct R3ReadContext *context, struct R3RigidBodyHandle handle, struct R3ColliderHandle *buffer, size_t capacity)
Copy attached collider handles.
R3Bool r3ReadCollider_IsVoxels(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return whether the collider is a voxel shape.
R3Bool r3ReadRigidBody_IsCcdEnabled(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return whether the rigid body is using continuous collision detection.
size_t r3ContactModificationContext_SolverContactCount(const struct R3ContactModificationContext *context)
Return the number of solver contacts of the manifold; zero for a soft context.
struct R3Rotation r3ReadRigidBody_Rotation(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body world-space rotation.
R3Real r3ReadCollider_ContactSkin(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider extra separation skin around the shape.
R3Real r3ReadRigidBody_GravityScale(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body gravity multiplier.
size_t r3ReadRigidBodyHandles(const struct R3ReadContext *context, struct R3RigidBodyHandle *buffer, size_t capacity)
Copy entity handles.
struct R3SoftBodyHandle r3ReadCollider_SoftBody(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the soft body owning this deformable collider, or an invalid handle for any other collider.
struct R3InteractionGroups r3ReadCollider_SolverGroups(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider contact-force filtering groups.
struct R3Pose r3ReadCollider_PositionWrtParent(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider pose relative to its parent rigid body, or its world-space pose if it has no pare...
R3Bool r3ReadRigidBody_IsKinematic(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return whether the rigid body is kinematic.
size_t r3ReadRigidBodyReadStates(const struct R3ReadContext *context, const struct R3RigidBodyHandle *handles, size_t handle_count, struct R3RigidBodyState *states, size_t capacity)
Copy callback-visible body states in the supplied handle order.
struct R3Vector r3ReadCollider_Translation(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider world-space translation.
struct R3Pose r3ReadRigidBody_NextPosition(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body next kinematic world-space pose.
R3Bool r3ReadRigidBody_IsFastRotationAllowed(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return whether the rigid body may exceed the angular-velocity limit of its CCD.
R3Status r3ContactModificationContext_SetTangentVelocity(struct R3ContactModificationContext *context, struct R3Vector velocity)
Sets the tangent velocity of every rigid solver contact in this manifold.
R3Bool r3ReadRigidBody_IsSoftFrame(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return whether the rigid body is a soft-body proxy.
struct R3UserData r3ReadRigidBody_UserData(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body application-owned 128-bit user value.
R3Real r3ReadCollider_Volume(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider current volume.
R3Bool r3ContactModificationContext_IsSoft(const struct R3ContactModificationContext *context)
Return whether the context holds the contact candidates of two soft surfaces rather than a manifold.
struct R3SoftBodyHandle r3ReadRigidBody_SoftBody(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the associated soft-body handle, or an invalid handle if this is not a soft proxy.
R3Bool r3ReadRigidBody_IsSleeping(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return whether the rigid body is sleeping.
R3Bool r3ReadCollider_Contains(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Test whether the live world contains this collider handle.
R3Status r3ContactModificationContext_RemoveSolverContact(struct R3ContactModificationContext *context, size_t index)
Remove a solver contact of the manifold.
int8_t r3ReadRigidBody_DominanceGroup(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body signed dominance group.
R3AngVector r3ReadRigidBody_UserTorque(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body accumulated user-applied world-space torque.
struct R3Pose r3ReadRigidBody_Position(const struct R3ReadContext *context, struct R3RigidBodyHandle handle)
Return the rigid body world-space pose.
R3Real r3ReadCollider_ContactForceEventThreshold(const struct R3ReadContext *context, struct R3ColliderHandle handle)
Return the collider force threshold for contact-force events.
R3Real r3Collider_Mass(struct R3ColliderHandle handle)
Return the collider mass.
uint32_t r3Collider_ActiveEvents(struct R3ColliderHandle handle)
Return the collider event-generation bitmask (R3_COLLISION_EVENTS and R3_CONTACT_FORCE_EVENTS).
struct R3ColliderDesc r3SegmentColliderDesc(struct R3Vector a, struct R3Vector b)
Return a segment description with endpoints a and b.
struct R3Pose r3Collider_Position(struct R3ColliderHandle handle)
Return the collider world-space pose.
struct R3ColliderDesc r3CapsuleYColliderDesc(R3Real half_height, R3Real radius)
Return a Y-aligned capsule description; half_height is half the segment length, excluding caps.
R3Real r3Collider_Volume(struct R3ColliderHandle handle)
Return the collider current volume.
struct R3ColliderDesc r3HalfspaceColliderDesc(struct R3Vector normal)
Return a half-space description bounded by a plane through the origin; normal points outward.
R3Real r3Collider_Friction(struct R3ColliderHandle handle)
Return the collider friction coefficient.
R3Real r3Collider_Restitution(struct R3ColliderHandle handle)
Return the collider restitution coefficient.
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.
struct R3UserData r3Collider_UserData(struct R3ColliderHandle handle)
Return the collider application-owned 128-bit user value.
struct R3ColliderDesc r3RoundCylinderColliderDesc(R3Real half_height, R3Real radius, R3Real border_radius)
Return a rounded Y-aligned cylinder description; dimensions exclude border_radius.
R3Status r3Collider_SetEnabled(struct R3ColliderHandle handle, R3Bool value)
Enable or disable the collider.
R3Status r3Collider_SetContactSkin(struct R3ColliderHandle handle, R3Real value)
Set the collider extra separation skin around the shape.
R3Status r3Collider_SetCollisionGroups(struct R3ColliderHandle handle, struct R3InteractionGroups value)
Set the collider collision filtering groups.
struct R3Vector r3Collider_Translation(struct R3ColliderHandle handle)
Return the collider world-space translation.
struct R3ColliderDesc r3CapsuleZColliderDesc(R3Real half_height, R3Real radius)
Return a Z-aligned capsule description; half_height is half the segment length, excluding caps.
uint16_t r3Collider_ActiveCollisionTypes(struct R3ColliderHandle handle)
Return the collider body-type collision activation bitmask (R3_COLLISION_TYPES_* bits).
struct R3ColliderDesc r3CapsuleColliderDesc(struct R3Vector a, struct R3Vector b, R3Real radius)
Return a capsule description with segment endpoints a/b and the supplied radius.
R3Bool r3Collider_IsSensor(struct R3ColliderHandle handle)
Return whether the collider is a sensor (detects overlaps without contact forces).
uint32_t r3Collider_ActiveHooks(struct R3ColliderHandle handle)
Return the collider physics-hook activation bitmask.
struct R3ColliderDesc r3TriangleColliderDesc(struct R3Vector a, struct R3Vector b, struct R3Vector c)
Return a triangle description with vertices a, b, and c.
R3Status r3Collider_SetActiveCollisionTypes(struct R3ColliderHandle handle, uint16_t value)
Set the collider body-type collision activation bitmask.
R3Status r3Collider_ValidateHandle(struct R3ColliderHandle handle)
Validate the index and generation in the live owning world.
struct R3ColliderDesc r3DefaultColliderDesc(void)
Return native default collider desc.
R3Status r3Collider_SetTranslation(struct R3ColliderHandle handle, struct R3Vector value)
Set the collider world-space translation.
struct R3MassProperties r3Collider_MassProperties(struct R3ColliderHandle handle)
Return the collider local mass properties.
R3Bool r3Collider_IsEnabled(struct R3ColliderHandle handle)
Return whether the collider is enabled.
R3Real r3Collider_ContactForceEventThreshold(struct R3ColliderHandle handle)
Return the collider force threshold for contact-force events.
struct R3VoxelQuery r3Collider_VoxelAtFlatId(struct R3ColliderHandle handle, uint32_t id)
Return voxel information at a flat index; found = 0 if absent.
R3Bool r3Collider_IsVoxels(struct R3ColliderHandle handle)
Return whether the collider is a voxel shape.
struct R3SoftBodyHandle r3Collider_SoftBody(struct R3ColliderHandle handle)
Return the soft body owning this deformable collider (a soft-body collision mesh),...
struct R3ColliderDesc r3RoundConeColliderDesc(R3Real half_height, R3Real radius, R3Real border_radius)
Return a rounded Y-aligned cone description; dimensions exclude border_radius.
struct R3InteractionGroups r3Collider_SolverGroups(struct R3ColliderHandle handle)
Return the collider contact-force filtering groups.
R3Status r3Collider_SetFrictionCombineRule(struct R3ColliderHandle handle, uint32_t value)
Set the collider friction combination rule (R3_COMBINE_*).
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 R3ColliderHandle r3InsertCollider(struct R3RigidBodyHandle parent, const struct R3ColliderDesc *desc)
Insert a collider attached to a rigid body, using the world stored in its handle.
R3Bool r3Collider_Contains(struct R3ColliderHandle handle)
Test whether the live world contains this collider handle.
struct R3Aabb r3Collider_ComputeAabb(struct R3ColliderHandle handle)
Return the current world-space axis-aligned bounds.
struct R3ColliderDesc r3CylinderColliderDesc(R3Real half_height, R3Real radius)
Return a Y-aligned cylinder description with the supplied half-height and radius.
R3Real r3Collider_ContactSkin(struct R3ColliderHandle handle)
Return the collider extra separation skin around the shape.
struct R3ColliderDesc r3CapsuleXColliderDesc(R3Real half_height, R3Real radius)
Return a X-aligned capsule description; half_height is half the segment length, excluding caps.
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_SetActiveEvents(struct R3ColliderHandle handle, uint32_t value)
Set the collider event-generation bitmask (R3_COLLISION_EVENTS and R3_CONTACT_FORCE_EVENTS).
R3Status r3RemoveCollider(struct R3ColliderHandle handle, R3Bool wake_up)
Remove the collider and update its parent body mass properties.
struct R3ColliderDesc r3CuboidColliderDesc(struct R3Vector half_extents)
Return an axis-aligned box description with the supplied half-extents.
R3Status r3Collider_SetRestitution(struct R3ColliderHandle handle, R3Real value)
Set the collider restitution coefficient.
struct R3ColliderDesc r3ConeColliderDesc(R3Real half_height, R3Real radius)
Return a Y-aligned cone description with the supplied half-height and base radius.
size_t r3ColliderHandles(const struct R3World *world, struct R3ColliderHandle *buffer, size_t capacity)
Copy entity handles.
R3Status r3Collider_SetContactForceEventThreshold(struct R3ColliderHandle handle, R3Real value)
Set the collider force threshold for contact-force events.
R3Status r3Collider_SetRestitutionCombineRule(struct R3ColliderHandle handle, uint32_t value)
Set the collider restitution combination rule (R3_COMBINE_*).
uint32_t r3Collider_RestitutionCombineRule(struct R3ColliderHandle handle)
Return the collider restitution combination rule (R3_COMBINE_*).
R3Status r3Collider_SetDensity(struct R3ColliderHandle handle, R3Real value)
Set the collider mass per unit volume.
size_t r3ColliderCount(const struct R3World *world)
Return the number of collider objects in the world.
R3Status r3Collider_SetRotation(struct R3ColliderHandle handle, struct R3Rotation value)
Set the collider world-space rotation.
R3Status r3Collider_SetPositionWrtParent(struct R3ColliderHandle handle, struct R3Pose value)
Set the collider pose relative to the parent rigid body.
struct R3Rotation r3Collider_Rotation(struct R3ColliderHandle handle)
Return the collider world-space rotation.
R3Status r3Collider_SetMass(struct R3ColliderHandle handle, R3Real value)
Set the collider mass.
struct R3InteractionGroups r3Collider_CollisionGroups(struct R3ColliderHandle handle)
Return the collider collision filtering groups.
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 pare...
R3Real r3Collider_Density(struct R3ColliderHandle handle)
Return the collider mass per unit volume.
uint32_t r3Collider_FrictionCombineRule(struct R3ColliderHandle handle)
Return the collider friction combination rule (R3_COMBINE_*).
R3Status r3Collider_SetSolverGroups(struct R3ColliderHandle handle, struct R3InteractionGroups value)
Set the collider contact-force filtering groups.
struct R3ColliderDesc r3RoundCuboidColliderDesc(struct R3Vector half_extents, R3Real border_radius)
Return a rounded box description; half_extents exclude the added border_radius.
R3Status r3Collider_SetUserData(struct R3ColliderHandle handle, struct R3UserData value)
Set the collider application-owned 128-bit user value.
R3Status r3Collider_SetFriction(struct R3ColliderHandle handle, R3Real value)
Set the collider friction coefficient.
struct R3ColliderHandle r3InsertColliderWithoutParent(struct R3World *world, const struct R3ColliderDesc *desc)
Insert a collider without a rigid-body parent.
struct R3ColliderDesc r3BallColliderDesc(R3Real radius)
Return a ball description with the supplied radius.
R3Status r3Collider_SetSensor(struct R3ColliderHandle handle, R3Bool value)
Enable or disable a sensor (detects overlaps without contact forces) for the collider.
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_SetActiveHooks(struct R3ColliderHandle handle, uint32_t value)
Set the collider physics-hook activation bitmask.
R3Status r3FreeDynamicRayCastVehicleController(struct R3DynamicRayCastVehicleController *controller)
Release an owned dynamic ray cast vehicle controller.
struct R3Vector r3KinematicCharacterController_Up(const struct R3KinematicCharacterController *controller)
Return the normalized up direction.
struct R3CharacterAutostep r3KinematicCharacterController_Autostep(const struct R3KinematicCharacterController *controller)
Return the automatic stepping settings.
struct R3CharacterControllerSettings r3KinematicCharacterController_Settings(const struct R3KinematicCharacterController *controller)
Return a copy of slide, slope, and ground-snap settings.
R3Status r3KinematicCharacterController_SetSlopes(struct R3KinematicCharacterController *controller, R3Real max_climb_angle, R3Real min_slide_angle)
Set the maximum climb angle and minimum slide angle, in radians.
struct R3KinematicCharacterController * r3NewKinematicCharacterController(void)
Allocate a character controller with native defaults; release it with r3FreeKinematicCharacterControl...
R3Real r3KinematicCharacterController_NormalNudgeFactor(const struct R3KinematicCharacterController *controller)
Return the normal nudge factor set by SetNormalNudgeFactor.
struct R3KinematicCharacterController R3KinematicCharacterController
Controller plus reusable collision output from the last move_shape call.
Definition rapier.h:12053
R3Status r3PidController_SetGains(struct R3PidController *controller, struct R3PidGains gains)
Replace the proportional, integral, and derivative gains.
R3Status r3KinematicCharacterController_SetSlide(struct R3KinematicCharacterController *controller, R3Bool enabled)
Enable or disable sliding along obstacles.
R3Status r3DynamicRayCastVehicleController_SetWheelControls(struct R3DynamicRayCastVehicleController *controller, size_t index, R3Real steering, R3Real engine_force, R3Real brake)
Set a wheel engine force, brake force, and steering angle in radians.
struct R3DynamicRayCastVehicleController R3DynamicRayCastVehicleController
Vehicle controller borrowing its chassis world.
Definition rapier.h:12036
size_t r3DynamicRayCastVehicleController_Wheels(const struct R3DynamicRayCastVehicleController *controller, struct R3WheelState *buffer, size_t capacity)
Copy current wheel state in wheel insertion order.
struct R3PidController * r3NewPidController(void)
Allocate a PID controller with Rapier's defaults: kp = 60, ki = 1 and kd = 0.8 on every axis,...
size_t r3DynamicRayCastVehicleController_AddWheel(struct R3DynamicRayCastVehicleController *controller, struct R3Vector connection, struct R3Vector direction, struct R3Vector axle, R3Real rest_length, R3Real radius, const struct R3WheelTuning *tuning)
Append a wheel and return its zero-based index.
R3Status r3KinematicCharacterController_SetUp(struct R3KinematicCharacterController *controller, struct R3Vector up)
Set the up direction; it must be finite and nonzero and is normalized on input.
struct R3PidController R3PidController
PID controller with persistent integral state.
Definition rapier.h:12095
R3Status r3KinematicCharacterController_SetSnapToGround(struct R3KinematicCharacterController *controller, R3Bool enabled, struct R3CharacterLength distance)
Configure downward ground snapping.
struct R3PidGains r3PidController_Gains(const struct R3PidController *controller)
Return a copy of the proportional, integral, and derivative gains.
struct R3PdController r3DefaultPdController(void)
Return Rapier's default PD controller: kp = 60 and kd = 0.8 on every axis, all axes controlled.
R3Status r3PidController_SetAxes(struct R3PidController *controller, uint32_t axes)
Set the controlled axes, a combination of R3_AXES_MASK_* bits.
R3Status r3KinematicCharacterController_SetOffset(struct R3KinematicCharacterController *controller, struct R3CharacterLength offset)
Set the collision separation margin; use a positive absolute or relative character length.
R3Status r3KinematicCharacterController_SetNormalNudgeFactor(struct R3KinematicCharacterController *controller, R3Real value)
Set the small distance by which sliding motion is pushed along hit normals to avoid getting stuck; it...
struct R3WheelTuning r3DefaultWheelTuning(void)
Return native default wheel tuning.
R3Status r3DynamicRayCastVehicleController_SetAxes(struct R3DynamicRayCastVehicleController *controller, size_t up, size_t forward)
Set the chassis up/forward axis indices (0 = X, 1 = Y, 2 = Z).
struct R3CharacterLength r3KinematicCharacterController_Offset(const struct R3KinematicCharacterController *controller)
Return the collision separation margin.
R3Status r3KinematicCharacterController_SolveCharacterCollisionImpulses(const struct R3KinematicCharacterController *controller, const R3SharedShape *shape, R3Real dt, R3Real mass, const struct R3QueryOptions *options)
Applies impulses to the dynamic bodies hit by the most recent MoveShape call.
struct R3CharacterMovement r3KinematicCharacterController_MoveShape(const struct R3World *world, const struct R3QueryOptions *options, struct R3KinematicCharacterController *controller, R3Real dt, const R3SharedShape *shape, struct R3Pose pose, struct R3Vector desired_translation)
Computes movement without moving any collider.
struct R3VelocityCorrection r3PidController_RigidBodyCorrection(struct R3PidController *controller, R3Real dt, struct R3RigidBodyHandle body, struct R3Pose target_pose, struct R3Vector target_linvel, R3AngVector target_angvel)
Compute a velocity correction, preserving the body's state and updating PID integrals.
R3Status r3FreePidController(struct R3PidController *controller)
Release an owned pid controller.
uint32_t r3PidController_Axes(const struct R3PidController *controller)
Return the controlled axes as R3_AXES_MASK_* bits.
R3Status r3KinematicCharacterController_SetAutostep(struct R3KinematicCharacterController *controller, R3Bool enabled, struct R3CharacterLength max_height, struct R3CharacterLength min_width, R3Bool include_dynamic_bodies)
Configure automatic stepping over obstacles.
R3Status r3PidController_ResetIntegrals(struct R3PidController *controller)
Reset to zero the linear and angular errors accumulated by the integral term.
struct R3VelocityCorrection r3PdController_RigidBodyCorrection(const struct R3PdController *controller, struct R3RigidBodyHandle body, struct R3Pose target_pose, struct R3Vector target_linvel, R3AngVector target_angvel)
Compute the velocity change bringing the body toward the target pose and velocities.
R3Status r3FreeKinematicCharacterController(struct R3KinematicCharacterController *controller)
Release an owned kinematic character controller.
struct R3DynamicRayCastVehicleController * r3NewDynamicRayCastVehicleController(struct R3RigidBodyHandle chassis)
Allocate a vehicle controller bound to its chassis body.
R3Status r3DynamicRayCastVehicleController_UpdateVehicle(struct R3DynamicRayCastVehicleController *controller, R3Real dt, const struct R3QueryOptions *options)
Ray-cast wheel contacts and apply vehicle forces for dt seconds.
size_t r3KinematicCharacterController_Collisions(const struct R3KinematicCharacterController *controller, struct R3CharacterCollision *buffer, size_t capacity)
Copy collisions recorded by the most recent MoveShape call.
R3Real r3DynamicRayCastVehicleController_CurrentVehicleSpeed(const struct R3DynamicRayCastVehicleController *controller)
Return signed chassis speed along its forward direction.
void(*) R3ErrorCallback(R3Status, const char *, void *)
Called synchronously on the calling thread when an operation reports an error.
Definition rapier.h:14404
R3Status r3CheckAbi(uint32_t version, uint32_t dimension, size_t real_size, size_t vector_size, size_t pose_size, uint32_t features)
Check that the header matches the linked library before passing any structure across the ABI.
struct R3ErrorHandler r3SetErrorHandler(struct R3ErrorHandler handler)
Replace this thread's error handler and return the previous handler so it can be restored at the end ...
struct R3BuildInfo r3BuildInfo(void)
Return ABI version, dimension, scalar size, and pointer size of the linked library.
R3Status r3LastStatus(void)
Status of the most recent fallible operation on this thread.
const char * r3LastError(void)
Thread-local UTF-8 diagnostic, valid until the next fallible call on this thread.
const char * r3BuildProfile(void)
Cargo profile of the loaded physics library: "debug" or "release".
struct R3PodLayout r3PodLayout(void)
Return POD structure sizes for checking foreign-language layouts against this library.
uint32_t R3Status
Status-returning operations use these integer codes.
Definition rapier.h:12573
struct R3BuildFeatures r3BuildFeatures(void)
Return profiling, SIMD width, parallelism, and determinism of the linked library.
const char * r3Version(void)
Release version of the loaded C bindings, e.g.
size_t r3EventCollector_CollisionEvents(const struct R3EventCollector *events, struct R3CollisionEvent *buffer, size_t capacity)
Copy the collision start/stop events collected since the last clear, without removing them.
size_t r3EventCollector_ContactForceEvents(const struct R3EventCollector *events, struct R3ContactForceEvent *buffer, size_t capacity)
Copy the contact-force events collected since the last clear, without removing them.
struct R3SoftBodyTearEvent R3SoftBodyTearEvent
Owned copy of a tear event.
Definition rapier.h:12116
size_t r3ContactPairs(const struct R3World *world, struct R3ContactPair *buffer, size_t capacity)
Copy current narrow-phase contact pairs, including pairs without active solver contacts.
R3Status r3EventCollector_Clear(struct R3EventCollector *events)
Discard all collected events.
size_t r3Collider_ContactPairs(struct R3ColliderHandle handle, struct R3ContactPair *buffer, size_t capacity)
Copy the narrow-phase contact pairs involving the collider, including pairs without active solver con...
size_t r3DebugRender(const struct R3World *world, uint32_t mode, struct R3DebugLine *buffer, size_t capacity)
Copy the debug-render lines of the world with the default style.
struct R3EventCollector * r3NewEventCollector(void)
Allocate an empty event collector; release it with r3FreeEventCollector.
void(*) R3CollisionEventCallback(void *user_data, const struct R3ReadContext *read, const struct R3CollisionEvent *event, const struct R3ContactPoint *contacts, size_t contact_count)
Called during the step for each collision event, after it was added to the collector.
Definition rapier.h:15357
struct R3IntersectionPair r3IntersectionPair(struct R3ColliderHandle collider1, struct R3ColliderHandle collider2)
Return the intersection state of two colliders involving a sensor, or report R3_NOT_FOUND if the broa...
size_t r3EventCollector_TearEventCount(const struct R3EventCollector *events)
Return the number of soft-body tear events collected since the last clear.
size_t r3DebugRenderWithStyle(const struct R3World *world, uint32_t mode, const struct R3DebugRenderStyle *style, struct R3DebugLine *buffer, size_t capacity)
Copy the debug-render lines of the world drawn with the given style.
struct R3OptionalIntersectionPair r3TryIntersectionPair(struct R3ColliderHandle collider1, struct R3ColliderHandle collider2)
Return the intersection state of two colliders involving a sensor, with found = 0 if the broad phase ...
size_t r3SolverContacts(struct R3ColliderHandle collider1, struct R3ColliderHandle collider2, size_t manifold_index, struct R3SolverContact *buffer, size_t capacity)
Copy the solver contacts of one manifold of a contact pair, or report R3_NOT_FOUND without a pair.
R3Status r3EventCollector_SetCallbacks(struct R3EventCollector *events, const struct R3EventCallbacks *callbacks)
Replace the callbacks invoked while stepping with this collector; NULL removes them.
R3Status r3FreeEventCollector(struct R3EventCollector *events)
Release an owned event collector.
struct R3EventCollector R3EventCollector
Events accumulate across steps until r3EventCollector_Clear: reading them never drains the collector,...
Definition rapier.h:12045
struct R3ContactPair r3ContactPair(struct R3ColliderHandle collider1, struct R3ColliderHandle collider2)
Return the narrow-phase contact pair for two colliders, or report R3_NOT_FOUND.
size_t r3Collider_IntersectionPairs(struct R3ColliderHandle handle, struct R3IntersectionPair *buffer, size_t capacity)
Copy the intersection pairs involving the collider, in the narrow-phase order.
struct R3OptionalContactPair r3TryContactPair(struct R3ColliderHandle collider1, struct R3ColliderHandle collider2)
Return the narrow-phase contact pair for two colliders, with found = 0 if the broad phase found no po...
struct R3SoftBodyTearEvent * r3EventCollector_TearEvent(const struct R3EventCollector *events, size_t index)
Return an owned copy of a queued tear event; release with r3FreeSoftBodyTearEvent.
struct R3DebugRenderStyle r3DefaultDebugRenderStyle(void)
Return native default debug-render style.
size_t r3ContactManifolds(struct R3ColliderHandle collider1, struct R3ColliderHandle collider2, struct R3ContactManifold *buffer, size_t capacity)
Copy the geometric contact manifolds of a contact pair, or report R3_NOT_FOUND without a pair.
size_t r3ContactPoints(struct R3ColliderHandle collider1, struct R3ColliderHandle collider2, struct R3ContactPoint *buffer, size_t capacity)
Contact points in collider-local space; normal in world space.
void(*) R3ContactForceEventCallback(void *user_data, const struct R3ReadContext *read, const struct R3ContactForceEvent *event)
Called during the step for each contact-force event, after it was added to the collector.
Definition rapier.h:15367
size_t r3IntersectionPairs(const struct R3World *world, struct R3IntersectionPair *buffer, size_t capacity)
Copy current sensor intersection pairs from the narrow phase.
R3Status r3ImpulseJoint_SetCoupledAxes(struct R3ImpulseJointHandle handle, uint8_t value, R3Bool wake_up)
Set the impulse joint coupled joint axis mask.
struct R3InverseKinematicsOptions r3DefaultInverseKinematicsOptions(void)
Return native default inverse kinematics options.
R3Status r3JointDesc_SetLocalAnchor1(struct R3JointDesc *desc, struct R3Vector value)
Set the joint desc joint anchor relative to body 1.
R3Status r3ImpulseJoint_SetUserData(struct R3ImpulseJointHandle handle, struct R3UserData value, R3Bool wake_up)
Set the impulse joint application-owned 128-bit user value.
R3Status r3JointDesc_SetSoftness(struct R3JointDesc *desc, struct R3SpringCoefficients value)
Set the joint desc joint spring coefficients.
R3Status r3JointDesc_SetMotorAxes(struct R3JointDesc *desc, uint8_t value)
Set the joint desc joint axis mask with motors enabled.
R3Status r3MultibodyJoint_InverseKinematics(struct R3MultibodyJointHandle handle, const struct R3InverseKinematicsOptions *options, struct R3Pose target, R3IkJointCanMove can_move, void *user_data, R3Real *displacements, size_t count)
Read/write displacement buffer must contain exactly ndofs entries; zero it for a fresh solve.
R3Status r3ImpulseJoint_SetLocalFrame1(struct R3ImpulseJointHandle handle, struct R3Pose value, R3Bool wake_up)
Set the impulse joint joint frame relative to body 1.
R3Status r3JointDesc_SetLocalAxis1(struct R3JointDesc *desc, struct R3Vector value)
Set the joint desc joint principal axis in body 1 local coordinates.
R3Status r3ImpulseJoint_SetLockedAxes(struct R3ImpulseJointHandle handle, uint8_t value, R3Bool wake_up)
Set the impulse joint translation/rotation lock bitmask.
R3Status r3ImpulseJoint_SetLocalAxis1(struct R3ImpulseJointHandle handle, struct R3Vector value, R3Bool wake_up)
Set the impulse joint joint principal axis in body 1 local coordinates.
R3Status r3MultibodyJoint_SetGeneralizedVelocity(struct R3MultibodyJointHandle handle, const R3Real *values, size_t count)
Replace articulation generalized velocities; the array length must match its degrees of freedom.
size_t r3MultibodyJointCount(const struct R3World *world)
Return the number of multibody joints in the world, which is the number of handles copied by r3Multib...
R3Status r3JointDesc_SetMotor(struct R3JointDesc *desc, uint32_t joint_axis, R3Real target_position, R3Real target_velocity, R3Real stiffness, R3Real damping)
Set the joint desc motor position/velocity targets and spring coefficients on an axis.
struct R3ImpulseJointHandle r3InsertImpulseJoint(struct R3RigidBodyHandle body1, struct R3RigidBodyHandle body2, const struct R3JointDesc *joint)
Create an impulse joint connecting two bodies in the same world.
R3Status r3ImpulseJoint_SetEnabled(struct R3ImpulseJointHandle handle, R3Bool value, R3Bool wake_up)
Enable or disable the impulse joint.
R3Status r3ImpulseJoint_SetLocalAnchor2(struct R3ImpulseJointHandle handle, struct R3Vector value, R3Bool wake_up)
Set the impulse joint joint anchor relative to body 2.
struct R3JointDesc r3ImpulseJoint_Desc(struct R3ImpulseJointHandle handle)
Copies joint configuration without returning a borrowed joint pointer.
R3Status r3MultibodyJoint_ApplyDisplacements(struct R3MultibodyJointHandle handle, const R3Real *displacements, size_t count)
Apply generalized articulation displacements in native degree-of-freedom order.
R3Status r3JointDesc_SetLimits(struct R3JointDesc *desc, uint32_t joint_axis, R3Real min, R3Real max)
Set the joint desc minimum and maximum limits on an axis (linear distance or angular radians).
R3Status r3ImpulseJoint_SetMotor(struct R3ImpulseJointHandle handle, uint32_t joint_axis, R3Real target_position, R3Real target_velocity, R3Real stiffness, R3Real damping, R3Bool wake_up)
Set the impulse joint motor position/velocity targets and spring coefficients on an axis.
struct R3JointDesc r3FixedJointDesc(void)
Return a fixed joint description with native defaults; no allocation.
R3Status r3JointDesc_SetEnabled(struct R3JointDesc *desc, R3Bool value)
Enable or disable the joint desc.
R3Status r3JointDesc_SetCoupledAxes(struct R3JointDesc *desc, uint8_t value)
Set the joint desc coupled joint axis mask.
R3Status r3JointDesc_SetContactsEnabled(struct R3JointDesc *desc, R3Bool value)
Enable or disable allowing contacts between connected bodies for the joint desc.
R3Bool(*) R3IkJointCanMove(void *, struct R3RigidBodyHandle)
Optional per-link filter, called synchronously.
Definition rapier.h:14468
R3Status r3JointDesc_SetLockedAxes(struct R3JointDesc *desc, uint8_t value)
Set the joint desc translation/rotation lock bitmask.
R3Status r3JointDesc_SetLocalFrame2(struct R3JointDesc *desc, struct R3Pose value)
Set the joint desc joint frame relative to body 2.
R3Status r3ImpulseJoint_SetMotorAxes(struct R3ImpulseJointHandle handle, uint8_t value, R3Bool wake_up)
Set the impulse joint joint axis mask with motors enabled.
struct R3JointBodies r3ImpulseJoint_Bodies(struct R3ImpulseJointHandle handle)
Return the two bodies connected by an impulse joint.
R3Status r3MultibodyJoint_SetDesc(struct R3MultibodyJointHandle handle, const struct R3JointDesc *desc, R3Bool wake_up)
Replaces the multibody joint configuration after validation.
struct R3JointDesc r3SphericalJointDesc(void)
Return a spherical joint description with native defaults; no allocation.
R3Status r3JointDesc_SetLimitAxes(struct R3JointDesc *desc, uint8_t value)
Set the joint desc joint axis mask with limits enabled.
R3Status r3RemoveMultibodyJoint(struct R3MultibodyJointHandle handle, R3Bool wake_up)
Remove an articulation joint.
R3Status r3JointDesc_SetUserData(struct R3JointDesc *desc, struct R3UserData value)
Set the joint desc application-owned 128-bit user value.
R3Status r3JointDesc_SetLocalAnchor2(struct R3JointDesc *desc, struct R3Vector value)
Set the joint desc joint anchor relative to body 2.
size_t r3ImpulseJointCount(const struct R3World *world)
Return the number of impulse joints in the world.
R3Status r3JointDesc_SetMotorVelocity(struct R3JointDesc *desc, uint32_t joint_axis, R3Real target_velocity, R3Real factor)
Set the joint desc motor velocity target and damping factor on an axis.
R3Status r3ImpulseJoint_SetLocalAnchor1(struct R3ImpulseJointHandle handle, struct R3Vector value, R3Bool wake_up)
Set the impulse joint joint anchor relative to body 1.
struct R3JointBodies r3MultibodyJoint_Bodies(struct R3MultibodyJointHandle handle)
Return the two bodies connected by a multibody joint: its parent link, then its own link.
R3Status r3ImpulseJoint_SetSoftness(struct R3ImpulseJointHandle handle, struct R3SpringCoefficients value, R3Bool wake_up)
Set the impulse joint joint spring coefficients.
R3Status r3JointDesc_SetMotorPosition(struct R3JointDesc *desc, uint32_t joint_axis, R3Real target_position, R3Real stiffness, R3Real damping)
Set the joint desc motor position target and spring coefficients on an axis.
struct R3UserData r3ImpulseJoint_UserData(struct R3ImpulseJointHandle handle)
Return the impulse joint application-owned 128-bit user value.
R3Status r3JointDesc_SetMotorModel(struct R3JointDesc *desc, uint32_t joint_axis, uint32_t model)
Set the joint desc motor model on an axis (0 = acceleration-based, 1 = force-based).
size_t r3ImpulseJointHandles(const struct R3World *world, struct R3ImpulseJointHandle *buffer, size_t capacity)
Copy entity handles.
R3Status r3ImpulseJoint_SetLocalFrame2(struct R3ImpulseJointHandle handle, struct R3Pose value, R3Bool wake_up)
Set the impulse joint joint frame relative to body 2.
size_t r3MultibodyJointHandles(const struct R3World *world, struct R3MultibodyJointHandle *buffer, size_t capacity)
Copy entity handles.
R3Status r3ImpulseJoint_SetLimits(struct R3ImpulseJointHandle handle, uint32_t joint_axis, R3Real min, R3Real max, R3Bool wake_up)
Set the impulse joint minimum and maximum limits on an axis (linear distance or angular radians).
struct R3MultibodyJointHandle r3InsertMultibodyJoint(struct R3RigidBodyHandle body1, struct R3RigidBodyHandle body2, const struct R3JointDesc *joint)
Create an articulation joint between bodies in the same world.
struct R3JointDesc r3PrismaticJointDesc(struct R3Vector axis_vector)
Returns a joint description.
struct R3JointDesc r3MultibodyJoint_Desc(struct R3MultibodyJointHandle handle)
Copies the multibody joint configuration without returning a borrowed joint pointer.
R3Status r3JointDesc_SetMotorMaxForce(struct R3JointDesc *desc, uint32_t joint_axis, R3Real max_force)
Set the joint desc maximum motor force or torque on an axis.
R3Status r3ImpulseJoint_SetLocalAxis2(struct R3ImpulseJointHandle handle, struct R3Vector value, R3Bool wake_up)
Set the impulse joint joint principal axis in body 2 local coordinates.
struct R3JointDesc r3RevoluteJointDesc(struct R3Vector axis_vector)
Returns a joint description.
struct R3JointDesc r3RopeJointDesc(R3Real length)
Return a rope joint description with native defaults; no allocation.
R3Status r3ImpulseJoint_SetLimitAxes(struct R3ImpulseJointHandle handle, uint8_t value, R3Bool wake_up)
Set the impulse joint joint axis mask with limits enabled.
R3Status r3ImpulseJoint_SetMotorVelocity(struct R3ImpulseJointHandle handle, uint32_t joint_axis, R3Real target_velocity, R3Real factor, R3Bool wake_up)
Set the impulse joint motor velocity target and damping factor on an axis.
struct R3JointDesc r3SpringJointDesc(R3Real length, R3Real stiffness, R3Real damping)
Return a spring joint description with native defaults; no allocation.
R3Status r3ImpulseJoint_SetMotorModel(struct R3ImpulseJointHandle handle, uint32_t joint_axis, uint32_t model, R3Bool wake_up)
Set the impulse joint motor model on an axis (0 = acceleration-based, 1 = force-based).
R3Status r3JointDesc_SetLocalAxis2(struct R3JointDesc *desc, struct R3Vector value)
Set the joint desc joint principal axis in body 2 local coordinates.
R3Status r3ImpulseJoint_SetContactsEnabled(struct R3ImpulseJointHandle handle, R3Bool value, R3Bool wake_up)
Enable or disable allowing contacts between connected bodies for the impulse joint.
R3Status r3JointDesc_SetLocalFrame1(struct R3JointDesc *desc, struct R3Pose value)
Set the joint desc joint frame relative to body 1.
size_t r3MultibodyJoint_Ndofs(struct R3MultibodyJointHandle handle)
Return the degrees of freedom of the whole multibody containing the joint (not of the joint alone),...
R3Status r3ImpulseJoint_SetMotorMaxForce(struct R3ImpulseJointHandle handle, uint32_t joint_axis, R3Real max_force, R3Bool wake_up)
Set the impulse joint maximum motor force or torque on an axis.
#define R3_JOINT_DOF_COUNT
Number of translational and angular joint axes in this dimension.
Definition rapier.h:10999
R3Status r3RemoveImpulseJoint(struct R3ImpulseJointHandle handle, R3Bool wake_up)
Remove an impulse joint.
struct R3JointImpulses r3ImpulseJoint_Impulses(struct R3ImpulseJointHandle handle)
Return the impulses applied by the impulse joint during the last step.
size_t r3MultibodyJoint_GeneralizedVelocity(struct R3MultibodyJointHandle handle, R3Real *buffer, size_t capacity)
Copy the articulation generalized velocities in native degree-of-freedom order.
R3Status r3ImpulseJoint_SetMotorPosition(struct R3ImpulseJointHandle handle, uint32_t joint_axis, R3Real target_position, R3Real stiffness, R3Real damping, R3Bool wake_up)
Set the impulse joint motor position target and spring coefficients on an axis.
struct R3JointDesc r3DefaultJointDesc(void)
Return native default joint desc.
R3Status r3ImpulseJoint_SetDesc(struct R3ImpulseJointHandle handle, const struct R3JointDesc *desc, R3Bool wake_up)
Replaces configuration after validation, resetting cached limit/motor impulses.
R3Real r3Asin(R3Real x)
Arcsine in radians, computed by Rapier's math backend.
R3Real r3Ln(R3Real x)
Natural logarithm, computed by Rapier's math backend.
R3Real r3Acos(R3Real x)
Arccosine in radians, computed by Rapier's math backend.
R3Real r3Powf(R3Real base, R3Real exponent)
base raised to the power exponent, computed by Rapier's math backend.
uint32_t R3Bool
ABI booleans are uint32_t: zero is false, one is true.
Definition rapier.h:12187
R3Real r3Sin(R3Real x)
Sine of an angle in radians, computed by Rapier's math backend.
struct R3TriangleView R3SurfaceElementView
Borrowed surface array: edges in 2D, triangles in 3D.
Definition rapier.h:13124
struct R3Vector R3AngVector
Angular scalar in 2D or vector in 3D, in radians for angular displacement.
Definition rapier.h:13330
int32_t R3VoxelCoord
Voxel coordinates have DIM signed integer components.
Definition rapier.h:15126
float R3Real
Floating-point scalar: float for f32, double for f64.
Definition rapier.h:12157
R3Real r3Tan(R3Real x)
Tangent of an angle in radians, computed by Rapier's math backend.
R3Real r3Atan2(R3Real y, R3Real x)
Angle in radians of the point (x, y), in [-pi, pi], computed by Rapier's math backend.
R3Real r3Exp(R3Real x)
Exponential e^x, computed by Rapier's math backend.
R3Real r3Cos(R3Real x)
Cosine of an angle in radians, computed by Rapier's math backend.
struct R3TetrahedronView R3CellView
Borrowed cell array: triangles in 2D, tetrahedra in 3D.
Definition rapier.h:13108
struct R3QueryOptions r3DefaultQueryOptions(void)
Return native default query options.
struct R3OptionalShapeCastHit r3TryCastShapeNonlinear(const struct R3World *world, const struct R3QueryOptions *query_options, const struct R3NonlinearRigidMotion *motion, const R3SharedShape *shape, R3Real start_time, R3Real end_time, R3Bool stop_at_penetration)
Sweep shape along a rotating motion and return the first hit between start_time and end_time,...
struct R3OptionalPointProjection r3TryProjectPoint(const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Vector point, R3Real max_distance, R3Bool solid)
Return the closest surface projection within max_distance, with found = 0 if there is none (R3_OK).
struct R3ShapeCastOptions r3DefaultShapeCastOptions(void)
Return native default shape cast options.
struct R3QueryFilter r3DefaultQueryFilter(void)
Return native default query filter.
size_t r3IntersectAabbConservative(const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Aabb aabb, struct R3ColliderHandle *buffer, size_t capacity)
Copy broad-phase candidates whose bounding boxes overlap the world-space AABB.
size_t r3IntersectRay(const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Vector origin, struct R3Vector direction, R3Real max_toi, R3Bool solid, struct R3RayHit *buffer, size_t capacity)
Copy the hits of every collider intersected by the ray, in no particular order.
struct R3OptionalRayHit r3TryCastRay(const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Vector origin, struct R3Vector direction, R3Real max_toi, R3Bool solid)
Return the closest ray hit with found = 0 on a miss (R3_OK).
struct R3RayToi r3CastRayToi(const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Vector origin, struct R3Vector direction, R3Real max_toi, R3Bool solid)
Return the closest ray collider and time, with found = 0 on a miss (R3_OK).
struct R3Pose r3NonlinearRigidMotion_PositionAtTime(const struct R3NonlinearRigidMotion *motion, R3Real time)
Return the world-space pose of the motion at the given time.
R3Bool(*) R3QueryPredicate(void *user_data, const struct R3ReadContext *read, struct R3ColliderHandle handle)
Called with scoped read access and a collider handle.
Definition rapier.h:13798
struct R3OptionalShapeCastHit r3TryCastShape(const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Pose pose, struct R3Vector velocity, const R3SharedShape *shape, struct R3ShapeCastOptions options)
Sweep shape from pose along velocity and return the first hit, with found = 0 on a miss (R3_OK).
struct R3RayHit r3CastRay(const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Vector origin, struct R3Vector direction, R3Real max_toi, R3Bool solid)
Return the closest ray hit, or report R3_NOT_FOUND on a miss.
struct R3PointProjection r3ProjectPoint(const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Vector point, R3Real max_distance, R3Bool solid)
Return the closest surface projection within max_distance, or report R3_NOT_FOUND.
size_t r3IntersectPoint(const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Vector point, struct R3ColliderHandle *buffer, size_t capacity)
Copy handles of colliders containing the world-space point.
R3Bool r3RigidBody_GyroscopicForcesEnabled(struct R3RigidBodyHandle handle)
Return whether the rigid body is using gyroscopic forces.
R3Bool r3RigidBody_IsFastRotationAllowed(struct R3RigidBodyHandle handle)
Return whether the rigid body may exceed the angular-velocity limit of its CCD.
R3Status r3RigidBody_RecomputeMassPropertiesFromColliders(struct R3RigidBodyHandle handle)
Recompute body mass and inertia from attached colliders and additional mass properties.
size_t r3RigidBodyReadStates(const struct R3World *world, const struct R3RigidBodyHandle *handles, size_t handle_count, struct R3RigidBodyState *states, size_t capacity)
Copies states in the same order as handles, without allocating temporary storage.
R3Status r3RigidBody_SetLinvel(struct R3RigidBodyHandle handle, struct R3Vector value, R3Bool wake_up)
Set the rigid body world-space linear velocity.
uint8_t r3RigidBody_LockedAxes(struct R3RigidBodyHandle handle)
Return the rigid body translation/rotation lock bitmask.
R3Status r3RigidBody_SetLockedAxes(struct R3RigidBodyHandle handle, uint8_t axes, R3Bool wake_up)
Set the rigid body translation/rotation lock bitmask.
R3Status r3RigidBody_SetAngularDamping(struct R3RigidBodyHandle handle, R3Real value)
Set the rigid body angular damping coefficient.
int8_t r3RigidBody_DominanceGroup(struct R3RigidBodyHandle handle)
Return the rigid body signed dominance group.
struct R3Vector r3RigidBody_CenterOfMass(struct R3RigidBodyHandle handle)
Return the rigid body world-space center of mass.
R3Status r3RigidBody_SetEnabled(struct R3RigidBodyHandle handle, R3Bool value)
Enable or disable the rigid body.
R3Status r3RigidBody_SetAdditionalMass(struct R3RigidBodyHandle handle, R3Real value, R3Bool wake_up)
Set the rigid body mass added to collider contributions.
struct R3Vector r3RigidBody_LocalCenterOfMass(struct R3RigidBodyHandle handle)
Return the rigid body body-local center of mass.
R3Real r3RigidBody_LinearDamping(struct R3RigidBodyHandle handle)
Return the rigid body linear damping coefficient.
R3AngVector r3RigidBody_Angvel(struct R3RigidBodyHandle handle)
Return the rigid body world-space angular velocity (radians per second).
struct R3RigidBodyDesc r3FixedRigidBodyDesc(void)
Return a fixed rigid-body description with native defaults; no allocation.
R3Status r3RigidBody_SetLinearDamping(struct R3RigidBodyHandle handle, R3Real value)
Set the rigid body linear damping coefficient.
R3Bool r3RigidBody_IsSleeping(struct R3RigidBodyHandle handle)
Return whether the rigid body is sleeping.
R3Status r3RigidBody_SetNextKinematicRotation(struct R3RigidBodyHandle handle, struct R3Rotation value)
Set the rigid body next kinematic world-space rotation.
struct R3Vector r3RigidBody_Translation(struct R3RigidBodyHandle handle)
Return the rigid body world-space translation.
struct R3Vector r3RigidBody_VelocityAtPoint(struct R3RigidBodyHandle handle, struct R3Vector point)
Return world-space velocity at a world-space point, including angular motion.
struct R3RigidBodyHandle r3InsertRigidBody(struct R3World *world, const struct R3RigidBodyDesc *desc)
Create a body from the description and return its world-bound handle.
R3Real r3RigidBody_Mass(struct R3RigidBodyHandle handle)
Return the rigid body mass.
R3Status r3RigidBody_ApplyTorqueImpulse(struct R3RigidBodyHandle handle, R3AngVector value, R3Bool wake_up)
Apply a world-space angular impulse.
R3Status r3RigidBody_SetTranslationsLocked(struct R3RigidBodyHandle handle, R3Bool value, R3Bool wake_up)
Enable or disable locking translation for the rigid body.
R3Status r3RigidBodyPropagateModifiedBodyPositionsToColliders(struct R3World *world)
Propagate all modified body poses to attached colliders.
R3Real r3RigidBody_KineticEnergy(struct R3RigidBodyHandle handle)
Return the rigid body kinetic energy.
R3Bool r3RigidBody_IsKinematic(struct R3RigidBodyHandle handle)
Return whether the rigid body is kinematic.
R3Status r3RigidBody_SetGyroscopicForcesEnabled(struct R3RigidBodyHandle handle, R3Bool enabled)
Enable or disable using gyroscopic forces for the rigid body.
R3Status r3RemoveRigidBody(struct R3RigidBodyHandle handle, R3Bool remove_attached_colliders)
Remove a body and its joints, optionally keeping colliders as standalone objects.
R3Status r3RigidBody_SetAdditionalMassProperties(struct R3RigidBodyHandle handle, struct R3MassProperties properties, R3Bool wake_up)
Set the rigid body local mass properties added to collider contributions.
R3Real r3RigidBody_AngularDamping(struct R3RigidBodyHandle handle)
Return the rigid body angular damping coefficient.
R3Status r3RigidBody_SetAngvel(struct R3RigidBodyHandle handle, R3AngVector value, R3Bool wake_up)
Set the rigid body world-space angular velocity (radians per second).
R3Status r3RigidBody_WakeUp(struct R3RigidBodyHandle handle, R3Bool strong)
Wake a body by handle, including a soft-body cluster proxy.
R3Bool r3RigidBody_IsMoving(struct R3RigidBodyHandle handle)
Return whether the rigid body is moving.
R3Status r3RigidBody_ApplyImpulse(struct R3RigidBodyHandle handle, struct R3Vector value, R3Bool wake_up)
Apply a world-space linear impulse.
struct R3Rotation r3RigidBody_Rotation(struct R3RigidBodyHandle handle)
Return the rigid body world-space rotation.
size_t r3RigidBody_Colliders(struct R3RigidBodyHandle handle, struct R3ColliderHandle *buffer, size_t capacity)
Copy attached collider handles.
R3Bool r3RigidBody_IsFixed(struct R3RigidBodyHandle handle)
Return whether the rigid body is fixed.
R3Bool r3RigidBody_Contains(struct R3RigidBodyHandle handle)
Test whether the live world contains this rigid body handle.
R3Status r3RigidBody_SetAdditionalPgsIterations(struct R3RigidBodyHandle handle, size_t value)
Set the rigid body additional PGS iterations.
R3Real r3RigidBody_SoftCcdPrediction(struct R3RigidBodyHandle handle)
Return the rigid body soft-CCD prediction distance.
R3Bool r3RigidBody_IsEnabled(struct R3RigidBodyHandle handle)
Return whether the rigid body is enabled.
struct R3Pose r3RigidBody_Position(struct R3RigidBodyHandle handle)
Return the rigid body world-space pose.
R3Status r3RigidBody_SetGravityScale(struct R3RigidBodyHandle handle, R3Real value, R3Bool wake_up)
Set the rigid body gravity multiplier.
size_t r3RigidBody_AdditionalSolverIterations(struct R3RigidBodyHandle handle)
Return the rigid body additional solver iterations for connected bodies.
R3AngVector r3RigidBody_UserTorque(struct R3RigidBodyHandle handle)
Return the rigid body accumulated user-applied world-space torque.
struct R3Vector r3RigidBody_UserForce(struct R3RigidBodyHandle handle)
Return the rigid body accumulated user-applied world-space force.
R3Status r3RigidBody_AddForce(struct R3RigidBodyHandle handle, struct R3Vector value, R3Bool wake_up)
Accumulate a world-space force; it persists until reset.
R3Bool r3RigidBody_IsCcdEnabled(struct R3RigidBodyHandle handle)
Return whether the rigid body is using continuous collision detection.
R3Status r3RigidBody_SetRotation(struct R3RigidBodyHandle handle, struct R3Rotation value, R3Bool wake_up)
Set the rigid body world-space rotation.
R3Status r3RigidBody_SetAdditionalSolverIterations(struct R3RigidBodyHandle handle, size_t value)
Set the rigid body additional solver iterations for connected bodies.
R3Status r3RigidBody_SetUserData(struct R3RigidBodyHandle handle, struct R3UserData value)
Set the rigid body application-owned 128-bit user value.
R3Status r3RigidBody_SetPosition(struct R3RigidBodyHandle handle, struct R3Pose value, R3Bool wake_up)
Set the rigid body world-space pose.
R3Status r3RigidBody_SetDominanceGroup(struct R3RigidBodyHandle handle, int8_t value)
Set the rigid body signed dominance group.
R3Status r3RigidBody_Sleep(struct R3RigidBodyHandle handle)
Put the body to sleep.
R3Status r3RigidBody_ResetForces(struct R3RigidBodyHandle handle, R3Bool wake_up)
Clear accumulated user forces.
struct R3UserData r3RigidBody_UserData(struct R3RigidBodyHandle handle)
Return the rigid body application-owned 128-bit user value.
R3Status r3RigidBody_SetRotationsLocked(struct R3RigidBodyHandle handle, R3Bool value, R3Bool wake_up)
Enable or disable locking rotation for the rigid body.
R3Bool r3RigidBody_IsCcdActive(struct R3RigidBodyHandle handle)
Return whether the rigid body is currently using CCD for its motion.
struct R3Vector r3RigidBody_Linvel(struct R3RigidBodyHandle handle)
Return the rigid body world-space linear velocity.
size_t r3RigidBodyCount(const struct R3World *world)
Return the number of rigid body objects in the world.
R3Status r3RigidBody_ApplyImpulseAtPoint(struct R3RigidBodyHandle handle, struct R3Vector value, struct R3Vector point, R3Bool wake_up)
Apply a world-space impulse at a world-space point.
struct R3RigidBodyDesc r3DynamicRigidBodyDesc(void)
Return a dynamic rigid-body description with native defaults; no allocation.
R3Bool r3RigidBody_IsDynamic(struct R3RigidBodyHandle handle)
Return whether the rigid body is dynamic.
R3Status r3RigidBody_ResetTorques(struct R3RigidBodyHandle handle, R3Bool wake_up)
Clear accumulated user torques.
R3Status r3RigidBody_AddForceAtPoint(struct R3RigidBodyHandle handle, struct R3Vector value, struct R3Vector point, R3Bool wake_up)
Accumulate a world-space force applied at a world-space point.
R3Status r3RigidBody_ValidateHandle(struct R3RigidBodyHandle handle)
Validate the index and generation in the live owning world.
R3Real r3RigidBody_GravityScale(struct R3RigidBodyHandle handle)
Return the rigid body gravity multiplier.
size_t r3RigidBody_AdditionalPgsIterations(struct R3RigidBodyHandle handle)
Return the rigid body additional PGS iterations for connected bodies.
struct R3RigidBodyDesc r3KinematicVelocityBasedRigidBodyDesc(void)
Return a kinematic velocity based rigid-body description with native defaults; no allocation.
R3Status r3RigidBody_SetBodyType(struct R3RigidBodyHandle handle, uint32_t value, R3Bool wake_up)
Set the rigid body body type (R3_DYNAMIC, R3_FIXED, or a kinematic kind).
struct R3RigidBodyDesc r3KinematicPositionBasedRigidBodyDesc(void)
Return a kinematic position based rigid-body description with native defaults; no allocation.
size_t r3RigidBodyHandles(const struct R3World *world, struct R3RigidBodyHandle *buffer, size_t capacity)
Copy entity handles.
R3Status r3RigidBody_AddTorque(struct R3RigidBodyHandle handle, R3AngVector value, R3Bool wake_up)
Accumulate a world-space torque; it persists until reset.
uint32_t r3RigidBody_BodyType(struct R3RigidBodyHandle handle)
Return the rigid body body type (R3_DYNAMIC, R3_FIXED, or a kinematic kind).
R3Status r3RigidBody_SetNextKinematicPosition(struct R3RigidBodyHandle handle, struct R3Pose value)
Set the rigid body next kinematic world-space pose.
R3Status r3RigidBody_SetAllowFastRotation(struct R3RigidBodyHandle handle, R3Bool value)
Allow or disallow the rigid body to exceed the angular-velocity limit of its CCD (e....
struct R3Pose r3RigidBody_NextPosition(struct R3RigidBodyHandle handle)
Return the rigid body next kinematic world-space pose.
R3Status r3RigidBody_SetSoftCcdPrediction(struct R3RigidBodyHandle handle, R3Real value)
Set the rigid body soft-CCD prediction distance.
R3Status r3RigidBody_SetNextKinematicTranslation(struct R3RigidBodyHandle handle, struct R3Vector value)
Set the rigid body next kinematic world-space translation.
R3Status r3RigidBody_SetTranslation(struct R3RigidBodyHandle handle, struct R3Vector value, R3Bool wake_up)
Set the rigid body world-space translation.
R3Status r3RigidBody_SetCcdEnabled(struct R3RigidBodyHandle handle, R3Bool value)
Enable or disable using continuous collision detection for the rigid body.
R3SharedShape * r3MjcfVisualMesh_CloneShape(const R3MjcfVisualMesh *visual)
Returns an owned shared shape reference.
size_t r3MjcfRobot_KeyframeControls(const struct R3MjcfRobot *robot, size_t key, R3Real *buffer, size_t capacity)
Copy actuator controls for the selected keyframe.
size_t r3MjcfRobot_KeyframeCount(const struct R3MjcfRobot *robot)
Return the number of imported keyframes.
struct R3Pose r3LoadedMeshes_Pose(const struct R3LoadedMeshes *meshes, size_t index)
Return the pose to give the shape of a loaded mesh (for example the center of its bounding box).
struct R3MjcfContactHooks R3MjcfContactHooks
Owned physics hooks applying the <contact> rules (excluded pairs, pair friction) of an inserted MJCF ...
Definition rapier.h:12070
struct R3UrdfRobotHandles R3UrdfRobotHandles
Owned container of borrowed handles to an inserted URDF robot.
Definition rapier.h:12141
size_t r3MjcfVisualMesh_Texture(const R3MjcfVisualMesh *visual, char *buffer, size_t capacity)
Copies a NUL-terminated texture path, or an empty string for untextured meshes.
struct R3MjcfRobotHandles * r3MjcfRobot_InsertUsingMultibodyJoints(struct R3World *world, const struct R3MjcfRobot *robot, uint8_t options)
Inserts a clone; the source robot remains owned by the caller.
struct R3MjcfVisualMesh R3MjcfVisualMesh
A borrowed visual declaration, valid until its robot is freed or its body storage changes.
Definition rapier.h:14987
struct R3Vector r3MjcfRobot_Gravity(const struct R3MjcfRobot *robot)
Resolved model gravity before the caller chooses a world convention.
size_t r3MjcfRobotHandles_ActuatorCount(const struct R3MjcfRobotHandles *handles)
Return the number of imported actuators.
R3Status r3FreeMjcfRobot(struct R3MjcfRobot *object)
Release an owned mjcf robot.
const R3MjcfVisualMesh * r3MjcfRobot_BodyVisual(const struct R3MjcfRobot *robot, size_t body, size_t visual)
Borrow a visual mesh by body/visual index.
R3Status r3FreeLoadedMeshes(struct R3LoadedMeshes *meshes)
Release owned loaded meshes.
R3SharedShape * r3LoadedMeshes_CloneShape(const struct R3LoadedMeshes *meshes, size_t index)
Return an owned shape wrapper sharing the geometry of a loaded mesh.
struct R3PhysicsHooks r3MjcfContactHooks_PhysicsHooks(const struct R3MjcfContactHooks *hooks)
Return physics hooks forwarding to these contact rules, with hooks as their user_data.
struct R3UrdfRobotHandles * r3UrdfRobot_InsertUsingMultibodyJoints(struct R3World *world, const struct R3UrdfRobot *robot, uint8_t options)
Inserts a clone; the source robot remains owned by the caller.
R3Status r3MjcfRobotHandles_ApplyKeyframe(const struct R3MjcfRobotHandles *handles, const struct R3MjcfRobot *robot, size_t key)
Apply the selected keyframe to the inserted robot.
struct R3MjcfRobotHandles * r3MjcfRobot_InsertUsingImpulseJoints(struct R3World *world, const struct R3MjcfRobot *robot)
Inserts a clone; the source robot remains owned by the caller.
R3Status r3MjcfRobot_AppendTransform(struct R3MjcfRobot *robot, struct R3Pose transform)
Apply an additional transform to the loaded robot before insertion.
struct R3UrdfRobot R3UrdfRobot
Loaded URDF robot; insertion clones its simulation objects.
Definition rapier.h:12132
R3Status r3FreeUrdfRobot(struct R3UrdfRobot *object)
Release an owned urdf robot.
struct R3LoadedMeshes R3LoadedMeshes
Shapes loaded from a mesh file (STL, COLLADA or Wavefront OBJ), one per mesh of the file.
Definition rapier.h:12061
R3Status r3MjcfRobot_AppendKeyframe(struct R3MjcfRobot *robot, const struct R3MjcfRobot *source, size_t key)
Append a keyframe from the source MJCF model to the loaded robot.
struct R3UrdfLoaderOptions r3DefaultUrdfLoaderOptions(void)
Return native default urdf loader options.
struct R3MjcfRobotHandles R3MjcfRobotHandles
Owned container of borrowed handles and actuators of an inserted MJCF robot.
Definition rapier.h:12087
size_t r3MjcfVisualMesh_Uvs(const R3MjcfVisualMesh *visual, float *buffer, size_t capacity)
Copies flattened pairs of per-vertex UV coordinates.
R3Status r3MjcfRobot_SetBodyColliderCollisionGroups(struct R3MjcfRobot *robot, size_t body, size_t collider, struct R3InteractionGroups groups)
Set collision groups on a collider in the loaded robot, before insertion.
size_t r3MjcfRobot_KeyframeName(const struct R3MjcfRobot *robot, size_t key, char *buffer, size_t capacity)
Copies a NUL-terminated UTF-8 name.
size_t r3MjcfRobot_BodyCount(const struct R3MjcfRobot *robot)
Return the number of source MJCF bodies.
R3Status r3FreeMjcfContactHooks(struct R3MjcfContactHooks *hooks)
Release owned MJCF contact hooks.
R3Status r3MjcfRobotHandles_ApplyControlsScaled(const struct R3MjcfRobotHandles *handles, const R3Real *controls, size_t count, R3Real gain)
Apply actuator controls with per-actuator scaling to the inserted robot.
struct R3MjcfLoaderOptions r3DefaultMjcfLoaderOptions(void)
Return native default mjcf loader options.
size_t r3LoadedMeshes_Count(const struct R3LoadedMeshes *meshes)
Return the number of meshes read from the file, including those that failed to convert.
R3Status r3UrdfRobot_AppendTransform(struct R3UrdfRobot *robot, struct R3Pose transform)
Apply an additional transform to the loaded robot before insertion.
struct R3MjcfContactHooks * r3MjcfRobotHandles_ContactHooks(const struct R3MjcfRobotHandles *handles, const struct R3MjcfRobot *robot)
Build the contact rules of an inserted MJCF robot.
struct R3UrdfRobot * r3UrdfRobotFromFile(const char *path, const struct R3UrdfLoaderOptions *options)
Load from a UTF-8 path.
struct R3UrdfRobotHandles * r3UrdfRobot_InsertUsingImpulseJoints(struct R3World *world, const struct R3UrdfRobot *robot)
Inserts a clone; the source robot remains owned by the caller.
size_t r3MjcfRobot_BodyVisualCount(const struct R3MjcfRobot *robot, size_t body)
Return the number of visual meshes for a source body.
size_t r3MjcfVisualMesh_Normals(const R3MjcfVisualMesh *visual, float *buffer, size_t capacity)
Copies flattened triples of per-vertex normals.
size_t r3UrdfRobotHandles_Bodies(const struct R3UrdfRobotHandles *handles, struct R3RigidBodyHandle *buffer, size_t capacity)
One body handle per imported URDF link, in source order.
size_t r3MjcfRobotHandles_Bodies(const struct R3MjcfRobotHandles *handles, struct R3RigidBodyHandle *buffer, size_t capacity)
Body handles in source order; absent MJCF bodies have invalid handles.
struct R3MjcfVisualMeshInfo r3MjcfVisualMesh_Info(const R3MjcfVisualMesh *visual)
Return a copy of visual pose, color, material, and geometry-kind flags.
struct R3MjcfRobot R3MjcfRobot
Loaded MJCF robot and its visual/keyframe data.
Definition rapier.h:12078
size_t r3MjcfRobot_BodyColliderCount(const struct R3MjcfRobot *robot, size_t body)
Return the collider count for a source body index.
struct R3MjcfRobot * r3MjcfRobotFromFile(const char *path, const struct R3MjcfLoaderOptions *options)
Load from a UTF-8 path.
R3Status r3FreeUrdfRobotHandles(struct R3UrdfRobotHandles *handles)
Release an owned urdf robot handles.
struct R3UrdfRobot * r3UrdfRobotFromString(const char *urdf, const char *mesh_dir, const struct R3UrdfLoaderOptions *options)
Load a URDF robot from a NUL-terminated UTF-8 string.
R3Status r3FreeMjcfRobotHandles(struct R3MjcfRobotHandles *handles)
Release an owned mjcf robot handles.
struct R3LoadedMeshes * r3LoadedMeshesFromFile(const char *path, uint32_t converter, uint32_t trimesh_flags, struct R3Vector scale)
Load every mesh of a file from a UTF-8 path and convert it into a shape with converter (an R3_MESH_CO...
R3SharedShape * r3ConvexMeshSharedShape(struct R3VectorView vertices, struct R3TriangleView indices)
Create an owned convex polyhedron from vertices and triangle indices assumed to form a convex mesh (n...
size_t r3IntersectShape(const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Pose pose, const R3SharedShape *shape, struct R3ColliderHandle *buffer, size_t capacity)
Copy handles of colliders intersecting the shape at its world-space pose.
R3Status r3Collider_SetShape(struct R3ColliderHandle handle, const R3SharedShape *shape)
Replace collider geometry by sharing shape; the supplied wrapper is not consumed.
R3SharedShape * r3VoxelizedMeshSharedShape(struct R3VectorView vertices, R3SurfaceElementView indices, R3Real voxel_size)
Create an owned voxel shape from a surface mesh with the supplied uniform voxel size.
R3SharedShape * r3CuboidSharedShape(struct R3Vector half_extents)
Create an owned cuboid shape.
R3Status r3ShapeDesc_SetPolyline(struct R3ShapeDesc *desc, struct R3VectorView vertices, struct R3EdgeView indices, uint32_t flags)
Replace the shape geometry with a borrowed polyline.
R3SharedShape * r3VoxelsSharedShapeFromPoints(struct R3Vector voxel_size, struct R3VectorView points)
Create an owned voxel shape by quantizing points with the supplied per-axis voxel size.
R3SharedShape * r3PolylineSharedShape(struct R3VectorView vertices, struct R3EdgeView indices)
Create an owned polyline from vertices and edge indices.
size_t r3TriMeshData_Indices(const struct R3TriMeshData *mesh, uint32_t *buffer, size_t capacity)
Flat triangle indices; count and capacity are numbers of u32 entries.
R3SharedShape * r3BallSharedShape(R3Real radius)
Create an owned ball shape.
R3SharedShape * r3TriangleSharedShape(struct R3Vector a, struct R3Vector b, struct R3Vector c)
Create an owned triangle shape.
size_t r3TriMeshData_Vertices(const struct R3TriMeshData *mesh, struct R3Vector *buffer, size_t capacity)
Copy vertices.
R3SharedShape * r3RoundConvexHullSharedShape(struct R3VectorView vertices, R3Real border_radius)
Create an owned round convex hull shape.
struct R3Aabb r3SharedShape_ComputeAabb(const R3SharedShape *shape, struct R3Pose pose)
Compute the shape axis-aligned bounds at the supplied world-space pose.
R3SharedShape * r3SegmentSharedShape(struct R3Vector a, struct R3Vector b)
Create an owned segment shape.
struct R3MassProperties r3SharedShape_MassProperties(const R3SharedShape *shape, R3Real density)
Compute local mass properties for the supplied nonnegative density.
R3SharedShape * r3ConeSharedShape(R3Real half_height, R3Real radius)
Create an owned cone shape.
R3SharedShape * r3CompoundSharedShape(struct R3CompoundShapeView children)
Create an owned compound shape; each child pose is relative to the compound.
R3Bool r3SharedShape_ContainsPoint(const R3SharedShape *shape, struct R3Pose pose, struct R3Vector point)
Test whether the world-space point lies inside the shape at pose.
R3SharedShape * r3SharedShape_Clone(const R3SharedShape *object)
Create an owned wrapper sharing the same immutable geometry.
size_t r3Collider_ShapeIdentity(struct R3ColliderHandle handle)
Return a process-local geometry identity for caching, not a serializable ID.
R3Status r3ShapeDesc_SetTrimesh(struct R3ShapeDesc *desc, struct R3VectorView vertices, struct R3TriangleView indices, uint32_t flags)
Replace the shape geometry with a borrowed tri mesh.
R3Status r3FreeShapeMesh(struct R3ShapeMesh *mesh)
Release an owned shape mesh.
R3SharedShape * r3ConvexHullSharedShape(struct R3VectorView vertices)
Create an owned convex hull of the supplied vertices.
R3SharedShape * r3ConvexDecompositionSharedShape(struct R3VectorView vertices, R3SurfaceElementView indices)
Create an owned compound shape by convex decomposition of the input surface.
struct R3TriMeshData * r3SharedShape_ToTrimesh(const R3SharedShape *shape, uint32_t ntheta, uint32_t nphi)
Tessellate a ball or capsule with independent longitude/latitude subdivision counts.
R3SharedShape * r3CapsuleSharedShape(struct R3Vector a, struct R3Vector b, R3Real radius)
Create an owned capsule shape.
R3Status r3FreeTriMeshData(struct R3TriMeshData *mesh)
Release an owned tri mesh data.
struct R3TriMeshData R3TriMeshData
Owned indexed geometry from Parry's shape tessellation, preserving its vertex order.
Definition rapier.h:12123
struct R3ShapeCastHit r3CastShape(const struct R3World *world, const struct R3QueryOptions *query_options, struct R3Pose pose, struct R3Vector velocity, const R3SharedShape *shape, struct R3ShapeCastOptions options)
Sweep shape from pose along velocity and return the first hit; report R3_NOT_FOUND on a miss.
R3SharedShape * r3TrimeshSharedShapeWithFlags(struct R3VectorView vertices, struct R3TriangleView indices, uint32_t flags)
Create an owned triangle mesh with the supplied TRIMESH_* processing flags.
R3SharedShape * r3RoundConeSharedShape(R3Real half_height, R3Real radius, R3Real border_radius)
Create an owned round cone shape.
size_t r3ShapeMesh_Triangles(const struct R3ShapeMesh *mesh, struct R3Vector *buffer, size_t capacity)
Flat groups of three vertices.
R3SharedShape * r3TrimeshSharedShape(struct R3VectorView vertices, struct R3TriangleView indices)
Create an owned triangle mesh from vertices and triangle indices.
R3SharedShape * r3Collider_CloneShape(struct R3ColliderHandle handle)
Return an owned wrapper sharing the collider geometry.
R3SharedShape * r3HeightfieldSharedShape(struct R3RealView heights, size_t rows, size_t columns, struct R3Vector scale)
Create an owned heightfield shape from copied samples.
R3SharedShape * r3CylinderSharedShape(R3Real half_height, R3Real radius)
Create an owned cylinder shape.
R3SharedShape * r3RoundCylinderSharedShape(R3Real half_height, R3Real radius, R3Real border_radius)
Create an owned round cylinder shape.
R3Status r3ShapeDesc_SetConvexHull(struct R3ShapeDesc *desc, struct R3VectorView vertices)
Replace the shape geometry with a borrowed convex hull point cloud.
size_t r3ShapeMesh_Lines(const struct R3ShapeMesh *mesh, struct R3Vector *buffer, size_t capacity)
Flat groups of two vertices.
struct R3SharedShape R3SharedShape
Opaque SharedShape.
Definition rapier.h:13204
R3SharedShape * r3HalfspaceSharedShape(struct R3Vector normal)
Create an owned halfspace shape.
struct R3ShapeMesh R3ShapeMesh
Owned tessellated shape: flat triangle vertices and independent line segments, in local space.
Definition rapier.h:12110
R3Status r3FreeSharedShape(R3SharedShape *object)
Frees an owned object; NULL is allowed.
R3SharedShape * r3ShapeDesc_Build(const struct R3ShapeDesc *desc)
Build an owned shared shape from a description; release it with r3FreeSharedShape.
struct R3ShapeDesc r3DefaultShapeDesc(void)
Return native default shape desc.
R3SharedShape * r3RoundCuboidSharedShape(struct R3Vector half_extents, R3Real border_radius)
Create an owned round cuboid shape.
struct R3ShapeMesh * r3SharedShape_Tessellate(const R3SharedShape *shape, uint32_t subdivisions)
Return owned local-space rendering geometry; release it with r3FreeShapeMesh.
R3Status r3SoftBody_ResetForces(struct R3SoftBodyHandle handle, R3Bool wake_up)
Clear accumulated user forces.
uint32_t r3SoftBody_MeshTopologyVersion(struct R3SoftBodyHandle handle, struct R3ColliderHandle collider)
Return the selected collision mesh topology revision for cache invalidation.
R3Bool r3RecoverySelfCrossingDetection(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::selfCrossingDetection.
R3Status r3FemSetMaxLinearIterations(struct R3World *world, size_t value)
Set the world setting documented by R3SoftFemParameters::maxLinearIterations.
uint32_t r3RecoveryOverlapPatience(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::overlapPatience.
R3Bool r3RecoveryOverlapSelfRegions(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::overlapSelfRegions.
R3Status r3RecoverySetSelfStandDown(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::selfStandDown.
R3Status r3RecoverySetOverlapSplit(struct R3World *world, uint32_t value)
Set the world setting documented by R3SoftRecoverySettings::overlapSplit.
R3Real r3SoftBody_RestVolume(struct R3SoftBodyHandle handle)
Return the soft body undeformed volume.
R3Status r3SoftBodiesSetMaxExtraSubsteps(struct R3World *world, size_t value)
Set the world setting documented by R3SoftBodiesSettings::maxExtraSubsteps.
R3Status r3FemSetLinearTolerance(struct R3World *world, R3Real value)
Set the world setting documented by R3SoftFemParameters::linearTolerance.
R3Status r3SoftBody_SetParticleVelocity(struct R3SoftBodyHandle handle, size_t index, struct R3Vector value)
Set the soft body particle world-space velocity.
R3Real r3SoftBodiesResweepStrain(const struct R3World *world)
Return the world setting documented by R3SoftBodiesSettings::resweepStrain.
R3Status r3RecoverySetOverlapRigid(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::overlapRigid.
size_t r3SoftBodyTearEvent_PieceCount(const struct R3SoftBodyTearEvent *event)
Return the number of soft bodies the torn body is in after the tear: the length of r3SoftBodyTearEven...
R3Real r3FemLinearTolerance(const struct R3World *world)
Return the world setting documented by R3SoftFemParameters::linearTolerance.
R3Status r3SoftBody_SetParticlePosition(struct R3SoftBodyHandle handle, size_t index, struct R3Vector value)
Set the world-space position of the indexed particle.
size_t r3SoftBody_NumParticles(struct R3SoftBodyHandle handle)
Return the soft body particle count.
R3Status r3RemoveSoftBody(struct R3SoftBodyHandle handle)
Remove a soft body and its associated simulation objects.
struct R3SoftBodyDesc r3CuboidSoftBodyDesc(struct R3Vector center, struct R3Vector half_extents, size_t nx, size_t ny, size_t nz)
Return a solid box recipe on an nx by ny by nz particle grid, subdivided into tetrahedra.
R3Status r3SoftBody_SetClusterKinematicTarget(struct R3SoftBodyHandle handle, uint32_t cluster, struct R3Pose value)
Set the next world-space target pose of a pinned cluster.
R3Status r3SoftBody_AttachParticle(struct R3SoftBodyHandle handle, size_t index, struct R3RigidBodyHandle rigid_body)
Attach a particle to a rigid body by a two-way point-to-point constraint (unlike pinning).
struct R3SoftFemParameters r3DefaultSoftFemParameters(void)
Return native default soft fem parameters.
R3Status r3SoftBodyDesc_SetWire(struct R3SoftBodyDesc *desc, struct R3EdgeView view)
Borrow wire; preserve all other fields.
struct R3ParticleDestination r3SoftBodyTearEvent_ParticleDestination(const struct R3SoftBodyTearEvent *event, uint32_t particle)
Return the destination body and particle index for an original particle.
size_t r3SoftBody_Meshes(struct R3SoftBodyHandle handle, struct R3SoftMeshInfo *buffer, size_t capacity)
Copy collision mesh metadata.
size_t r3SoftBody_Edges(struct R3SoftBodyHandle handle, uint32_t *buffer, size_t capacity)
Copy flattened edge vertex indices.
uint32_t r3SoftBody_TopologyVersion(struct R3SoftBodyHandle handle)
Return a counter that changes when particle connectivity changes; use it to invalidate mesh caches.
R3Bool r3RecoveryCrossingRepulsion(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::crossingRepulsion.
R3Status r3RecoverySetOverlapEdgeStandDown(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::overlapEdgeStandDown.
size_t r3SoftBody_Clusters(struct R3SoftBodyHandle handle, uint32_t *buffer, size_t capacity)
Copy cluster indices.
R3Bool r3RecoveryOverlapSkipSelfTangled(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::overlapSkipSelfTangled.
size_t r3SoftBodyDesc_CellIndices(const struct R3SoftBodyDesc *desc, uint32_t *buffer, size_t capacity)
Copies generated cell indices into caller-owned storage.
R3Bool r3RecoverySelfStandDown(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::selfStandDown.
R3Status r3SoftBodyDesc_SetBendEdges(struct R3SoftBodyDesc *desc, struct R3EdgeView view)
Borrow bend edges; preserve all other fields.
R3Bool r3RecoveryOverlapRigid(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::overlapRigid.
R3Status r3RecoverySetEdgeStandDown(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::edgeStandDown.
R3Status r3SoftBody_ApplyImpulseAtPoint(struct R3SoftBodyHandle handle, struct R3Vector impulse, struct R3Vector point, R3Real falloff_radius, R3Bool wake_up)
Apply a world-space impulse to every free particle within falloff_radius of the world-space point,...
size_t r3SoftBodyTearEvent_TornCells(const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity)
Flat indices; element arity follows the corresponding Rust event field.
size_t r3SoftBody_Cells(struct R3SoftBodyHandle handle, uint32_t *buffer, size_t capacity)
Copy flattened cell vertex indices.
struct R3Vector r3SoftBody_ParticleVelocity(struct R3SoftBodyHandle handle, size_t index)
Return the world-space velocity of the indexed particle.
struct R3SoftBodyMaterial r3UniformSoftBodyMaterial(struct R3SpringCoefficients value)
Returns a material with the same softness for each constraint family.
R3Status r3RecoverySetInvertedCellDetection(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::invertedCellDetection.
struct R3SoftBodyDesc r3SphereSoftBodyDesc(struct R3Vector center, R3Real radius, uint32_t subdivisions)
Return a hollow icosphere recipe with the specified refinement levels and volume preservation.
R3Bool r3SoftBody_IsEnabled(struct R3SoftBodyHandle handle)
Return whether the soft body is enabled.
R3Bool r3SoftBody_MeshIsClosed(struct R3SoftBodyHandle handle, struct R3ColliderHandle collider)
Return whether the selected collision mesh is closed.
size_t r3FemMaxDenseDofs(const struct R3World *world)
Return the world setting documented by R3SoftFemParameters::maxDenseDofs.
size_t r3SoftBodyDesc_ParticlePositions(const struct R3SoftBodyDesc *desc, struct R3Vector *buffer, size_t capacity)
Copies generated particle positions into caller-owned storage; no persistent builder.
size_t r3SoftBodyTearEvent_RemovedEdges(const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity)
Flat indices; element arity follows the corresponding Rust event field.
R3Bool r3RecoveryCrossingRepulsionGuide(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::crossingRepulsionGuide.
R3Status r3RecoverySetCrossingRepulsionSelfGuide(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::crossingRepulsionSelfGuide.
R3Status r3RecoverySetOverlapConstraintPace(struct R3World *world, R3Real value)
Set the world setting documented by R3SoftRecoverySettings::overlapConstraintPace.
R3Status r3SoftBodyDesc_SetSurfaceMesh(struct R3SoftBodyDesc *desc, struct R3VectorView vertices, R3SurfaceElementView elements)
Select a surface recipe and borrow its vertices and elements.
struct R3SoftBodyDesc r3VolumetricSoftBodyDesc(struct R3VectorView vertices, R3SurfaceElementView surface, struct R3VolumeMeshParameters parameters)
Initializes a borrowed meshing recipe.
R3Real r3SoftBodiesContactStiffening(const struct R3World *world)
Return the world setting documented by R3SoftBodiesSettings::contactStiffening.
R3Status r3SoftBody_WakeUp(struct R3SoftBodyHandle handle)
Wake the soft body and its rigid proxies.
R3Status r3SoftBody_SetParticlePinned(struct R3SoftBodyHandle handle, size_t index, R3Bool value)
Enable or disable pinning the particle for the soft body.
R3Status r3SoftBody_ApplyImpulse(struct R3SoftBodyHandle handle, struct R3Vector value, R3Bool wake_up)
Add the same world-space velocity change to every free particle: the whole body is kicked at the same...
struct R3SoftRecoverySettings r3DefaultSoftRecoverySettings(void)
Return native default soft recovery settings.
R3Bool r3RecoveryCrossBodyDetection(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::crossBodyDetection.
R3Status r3RecoverySetOverlapProgressMargin(struct R3World *world, R3Real value)
Set the world setting documented by R3SoftRecoverySettings::overlapProgressMargin.
R3Status r3SoftBody_SetParticleKinematicTarget(struct R3SoftBodyHandle handle, size_t index, struct R3Vector value)
Set the next world-space target position of a pinned particle.
R3Status r3SoftBody_SetMaterial(struct R3SoftBodyHandle handle, const struct R3SoftBodyMaterial *data)
Copy material parameters into the soft body.
R3Status r3SoftBody_SetVolumeFactor(struct R3SoftBodyHandle handle, R3Real value)
Set the soft body target volume multiplier.
R3Status r3RecoverySetDetectionMotionGating(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::detectionMotionGating.
R3Status r3SoftBodyDesc_SetCells(struct R3SoftBodyDesc *desc, R3CellView view)
Borrow cells; preserve all other fields.
R3Status r3RecoverySetSelfCrossingDetection(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::selfCrossingDetection.
size_t r3SoftBody_MeshColliders(struct R3SoftBodyHandle handle, struct R3ColliderHandle *buffer, size_t capacity)
Copy collision mesh collider handles.
size_t r3SoftBodyTearEvent_SplitParticles(const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity)
Flat indices; element arity follows the corresponding Rust event field.
size_t r3SoftBody_MeshArity(struct R3SoftBodyHandle handle, struct R3ColliderHandle collider)
Return indices per collision-mesh element (2 for segments, 3 for triangles).
struct R3Vector r3SoftBody_ParticlePosition(struct R3SoftBodyHandle handle, size_t index)
Return the world-space position of the indexed particle.
struct R3SoftBodyDesc r3RopeSoftBodyDesc(struct R3Vector a, struct R3Vector b, size_t particles)
Return a rope recipe with particles evenly spaced from a to b, including both endpoints.
struct R3RigidBodyHandle r3SoftBody_RootBody(struct R3SoftBodyHandle handle)
Return the soft body root rigid-proxy handle.
R3Bool r3SoftBody_DetachParticle(struct R3SoftBodyHandle handle, size_t index)
Detach a particle from every rigid body it was attached to with r3SoftBody_AttachParticle.
R3Status r3SoftBody_SetEnabled(struct R3SoftBodyHandle handle, R3Bool value)
Enable or disable the soft body.
R3Status r3RecoverySetCrossBodyDetection(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::crossBodyDetection.
uint32_t r3RecoveryOverlapSplit(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::overlapSplit.
uint32_t r3RecoveryOverlapPatchConstraints(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::overlapPatchConstraints.
R3Bool r3SoftBody_Contains(struct R3SoftBodyHandle handle)
Test whether the live world contains this soft body handle.
size_t r3SoftBodyTearEvent_MovedJoints(const struct R3SoftBodyTearEvent *event, struct R3SoftJointMove *buffer, size_t capacity)
Copy impulse-joint remapping records produced by the tear.
R3Status r3SoftBody_RemoveCluster(struct R3SoftBodyHandle handle, uint32_t cluster)
Remove the selected cluster and its rigid proxy.
size_t r3SoftBody_MeshVerticesById(struct R3SoftBodyHandle handle, struct R3SoftMeshId id, struct R3Vector *buffer, size_t capacity)
Copy world-space vertices for a mesh ID.
R3Status r3SoftBody_SetClusterEdgeSoftness(struct R3SoftBodyHandle handle, uint32_t cluster, const struct R3SpringCoefficients *softness)
Override the softness of every structural or bending edge fully contained in a live cluster: regional...
R3Status r3SoftBody_ApplyParticleImpulse(struct R3SoftBodyHandle handle, size_t index, struct R3Vector value, R3Bool wake_up)
Apply a world-space impulse to one particle.
R3Status r3SoftBody_SetSolver(struct R3SoftBodyHandle handle, uint32_t solver)
Set the soft body soft solver kind (R3_SOFT_SOLVER_*).
struct R3SoftBodyTearEvent * r3CutSoftBody(struct R3SoftBodyHandle handle, const struct R3Vector *blade)
Cut using DIM points (a segment in 2D, triangle in 3D).
struct R3SoftBodyMaterial r3DefaultSoftBodyMaterial(void)
Return native default soft body material.
R3Bool r3RecoveryOverlapEdgeStandDown(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::overlapEdgeStandDown.
R3Status r3FemSetMaxDenseDofs(struct R3World *world, size_t value)
Set the world setting documented by R3SoftFemParameters::maxDenseDofs.
R3Status r3SoftBody_SetClusterPinned(struct R3SoftBodyHandle handle, uint32_t cluster, R3Bool value)
Enable or disable pinning the cluster for the soft body.
R3Bool r3RecoveryOverlapConstraints(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::overlapConstraints.
R3Bool r3RecoveryEdgeSpeculation(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::edgeSpeculation.
R3Bool r3RecoveryAuthoredVelocityMargin(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::authoredVelocityMargin.
struct R3SoftMeshBindingDesc r3DefaultSoftMeshBindingDesc(void)
Return native default soft mesh binding desc.
struct R3SoftBodyDesc r3ClothTubeSoftBodyDesc(struct R3Vector origin, struct R3Vector axis, R3Real radius_start, R3Real radius_end, size_t num_around, size_t num_along)
Return a cloth tube recipe from origin to origin + axis with num_along rings of num_around particles;...
struct R3RigidBodyHandle r3SoftBody_ClusterProxy(struct R3SoftBodyHandle handle, uint32_t cluster)
Return the rigid proxy for the selected cluster.
size_t r3SoftBody_ParticlePositions(struct R3SoftBodyHandle handle, struct R3Vector *buffer, size_t capacity)
Copy world-space particle positions.
R3Status r3RecoverySetOverlapSelfRegions(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::overlapSelfRegions.
R3Bool r3RecoveryEdgeStandDown(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::edgeStandDown.
struct R3SoftBodyHandle r3RigidBody_SoftBody(struct R3RigidBodyHandle handle)
Return the associated soft-body handle, or an invalid handle if this is not a soft proxy.
struct R3SoftBodyDesc r3DefaultSoftBodyDesc(void)
Return native default soft body desc.
size_t r3SoftBodyTearEvent_Bodies(const struct R3SoftBodyTearEvent *event, struct R3SoftBodyHandle *buffer, size_t capacity)
Copy the soft bodies the torn body is in after the tear, the one keeping the handle first: the torn b...
struct R3SoftBodiesSettings r3DefaultSoftBodiesSettings(void)
Return native default soft bodies settings.
R3Status r3RecoverySetOverlapPatchConstraints(struct R3World *world, uint32_t value)
Set the world setting documented by R3SoftRecoverySettings::overlapPatchConstraints.
R3Real r3RecoveryOverlapKeptDepth(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::overlapKeptDepth.
R3Status r3RecoverySetOverlapSkinVolume(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::overlapSkinVolume.
R3Bool r3RecoveryInvertedCellDetection(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::invertedCellDetection.
R3Status r3SoftBody_SetClusterTearResistance(struct R3SoftBodyHandle handle, uint32_t cluster, R3Real value)
Set the soft body cluster tear-resistance multiplier.
size_t r3SoftBodyHandles(const struct R3World *world, struct R3SoftBodyHandle *buffer, size_t capacity)
Copy entity handles.
R3Status r3SoftBody_TearEdge(struct R3SoftBodyHandle handle, size_t index)
Mark the indexed edge as torn.
R3Status r3RecoverySetCrossBodyExpelGate(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::crossBodyExpelGate.
struct R3SoftBodyDesc r3ClothSoftBodyDesc(struct R3Vector origin, struct R3Vector du, struct R3Vector dv, size_t nu, size_t nv)
Return a cloth recipe with nu by nv particles at origin + i * du + j * dv.
size_t r3SoftBodyCount(const struct R3World *world)
Return the number of soft body objects in the world.
size_t r3SoftBodyTearEvent_InsertedParticles(const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity)
Flat indices; element arity follows the corresponding Rust event field.
R3Status r3SoftBody_AddParticleForce(struct R3SoftBodyHandle handle, size_t index, struct R3Vector value, R3Bool wake_up)
Add a world-space force to the indexed particle.
R3Status r3SoftBody_SetClusterStiffnessScale(struct R3SoftBodyHandle handle, uint32_t cluster, R3Real value)
Scale the material stiffness (Young modulus) of every cell fully contained in a live cluster: regiona...
R3Status r3RecoverySetCrossingRepulsion(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::crossingRepulsion.
R3Status r3SoftBodyDesc_SetSurface(struct R3SoftBodyDesc *desc, R3SurfaceElementView view)
Borrow surface; preserve all other fields.
R3Bool r3RecoveryOverlapMultiVolume(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::overlapMultiVolume.
struct R3SoftBodyTearEvent * r3SoftBody_Tear(struct R3SoftBodyHandle handle, const uint32_t *edges, size_t edge_count, const uint32_t *cells, size_t cell_count)
Tear the selected edges and return an owned remapping event.
size_t r3SoftBody_MeshIndices(struct R3SoftBodyHandle handle, struct R3ColliderHandle collider, uint32_t *buffer, size_t capacity)
Copy flattened collision mesh indices.
R3Bool r3RecoveryOverlapSkinVolume(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::overlapSkinVolume.
R3Status r3SoftBodyDesc_SetAppended(struct R3SoftBodyDesc *desc, struct R3SoftBodyDescView view)
Borrow descriptions to merge into this body (see R3SoftBodyDesc::appended); preserve all other fields...
R3Real r3RecoveryRecoveryPace(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::recoveryPace.
R3Bool r3RigidBody_IsSoftFrame(struct R3RigidBodyHandle handle)
Return whether the rigid body is a soft-body proxy.
size_t r3SoftBody_ClusterParticles(struct R3SoftBodyHandle handle, uint32_t cluster, uint32_t *buffer, size_t capacity)
Copy particle indices for a cluster.
R3Real r3RecoveryOverlapConstraintPace(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::overlapConstraintPace.
R3Bool r3SoftBody_IsSleeping(struct R3SoftBodyHandle handle)
Return whether the soft body is sleeping.
R3Bool r3RecoveryCrossBodyExpelGate(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::crossBodyExpelGate.
struct R3OptionalParticleDestination r3SoftBodyTearEvent_TryParticleDestination(const struct R3SoftBodyTearEvent *event, uint32_t particle)
Optional particle destination after a tear.
struct R3Vector r3SoftBody_CenterOfMass(struct R3SoftBodyHandle handle)
Return the soft body world-space center of mass.
size_t r3FemMaxLinearIterations(const struct R3World *world)
Return the world setting documented by R3SoftFemParameters::maxLinearIterations.
uint32_t r3SoftBody_Solver(struct R3SoftBodyHandle handle)
Return the solver simulating the soft body's elasticity (R3_SOFT_SOLVER_*).
R3Status r3SoftBody_SetClusterShapeMatchingEnabled(struct R3SoftBodyHandle handle, uint32_t cluster, R3Bool value)
Enable or disable using cluster shape matching for the soft body.
R3Status r3RecoverySetEdgeSpeculation(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::edgeSpeculation.
R3Status r3SoftBodiesSetResweepStrain(struct R3World *world, R3Real value)
Set the world setting documented by R3SoftBodiesSettings::resweepStrain.
R3Real r3SoftBody_VolumeFactor(struct R3SoftBodyHandle handle)
Return the soft body target volume multiplier.
R3Status r3SoftBodyDesc_SetEdges(struct R3SoftBodyDesc *desc, struct R3EdgeView view)
Borrow edges; preserve all other fields.
size_t r3SoftBodyTearEvent_Clusters(const struct R3SoftBodyTearEvent *event, struct R3SoftClusterSplit *buffer, size_t capacity)
Copy cluster-to-piece and rigid-proxy remapping records.
R3Status r3SoftBody_SetEdgeTearResistance(struct R3SoftBodyHandle handle, size_t index, R3Real resistance)
Set the soft body edge tear-resistance multiplier.
struct R3SoftBodyMaterial r3SoftBody_Material(struct R3SoftBodyHandle handle)
Return a copy of the soft body material parameters.
R3Status r3RecoverySetOverlapKeptDepth(struct R3World *world, R3Real value)
Set the world setting documented by R3SoftRecoverySettings::overlapKeptDepth.
R3Status r3FreeSoftBodyTearEvent(struct R3SoftBodyTearEvent *event)
Release an owned soft body tear event.
R3Status r3SoftBodyDesc_SetAddedEdges(struct R3SoftBodyDesc *desc, struct R3EdgeView view)
Borrow structural edges added after appending (see R3SoftBodyDesc::addedEdges); preserve all other fi...
R3Status r3SoftBodiesSetContactStiffening(struct R3World *world, R3Real value)
Set the world setting documented by R3SoftBodiesSettings::contactStiffening.
R3Status r3SoftBodyDesc_SetParticles(struct R3SoftBodyDesc *desc, struct R3VectorView positions)
Select an explicit particle recipe and borrow its positions.
R3Status r3SoftBodyDesc_SetMasses(struct R3SoftBodyDesc *desc, struct R3RealView view)
Borrow masses; preserve all other fields.
R3Status r3RecoverySetOverlapMultiVolume(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::overlapMultiVolume.
size_t r3SoftBody_Pieces(struct R3SoftBodyHandle handle, struct R3SoftBodyHandle *buffer, size_t capacity)
Copy piece identifiers.
R3Real r3SoftBody_Volume(struct R3SoftBodyHandle handle)
Return the soft body current volume.
R3Status r3SoftBodyDesc_SetPinnedParticles(struct R3SoftBodyDesc *desc, struct R3IndexView view)
Borrow pinned particles; preserve all other fields.
struct R3SoftBodyHandle r3InsertSoftBody(struct R3World *world, const struct R3SoftBodyDesc *desc)
Consumes no caller-owned resources.
struct R3SoftBodyHandle r3SoftBodyTearEvent_SoftBody(const struct R3SoftBodyTearEvent *event)
Return the source soft-body handle for this tear event.
size_t r3SoftBody_MeshVertices(struct R3SoftBodyHandle handle, struct R3ColliderHandle collider, struct R3Vector *buffer, size_t capacity)
Copy world-space collision mesh vertices.
R3Real r3SoftBody_Mass(struct R3SoftBodyHandle handle)
Return the soft body mass.
R3Status r3SoftBodyDesc_SetSkin(struct R3SoftBodyDesc *desc, struct R3VectorView vertices, R3SurfaceElementView elements)
Borrow skin geometry.
R3Status r3SoftBody_ValidateHandle(struct R3SoftBodyHandle handle)
Validate the index and generation in the live owning world.
R3Status r3RecoverySetCrossingRepulsionGuide(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::crossingRepulsionGuide.
R3Status r3RecoverySetOverlapSkipSelfTangled(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::overlapSkipSelfTangled.
size_t r3SoftBodyTearEvent_TornEdges(const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity)
Flat indices; element arity follows the corresponding Rust event field.
R3Status r3RecoverySetOverlapPatience(struct R3World *world, uint32_t value)
Set the world setting documented by R3SoftRecoverySettings::overlapPatience.
R3Status r3RecoverySetOverlapNormalPush(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::overlapNormalPush.
size_t r3SoftBodyTearEvent_PieceParticles(const struct R3SoftBodyTearEvent *event, size_t piece_index, uint32_t *buffer, size_t capacity)
Copy the particles of the piece_index-th body of r3SoftBodyTearEvent_Bodies, as indices in the torn b...
R3Status r3SoftBody_AddForce(struct R3SoftBodyHandle handle, struct R3Vector value, R3Bool wake_up)
Accumulate a world-space force; it persists until reset.
R3Status r3RecoverySetAuthoredVelocityMargin(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::authoredVelocityMargin.
size_t r3SoftBody_ParticleVelocities(struct R3SoftBodyHandle handle, struct R3Vector *buffer, size_t capacity)
Copy world-space particle velocities.
R3Status r3SoftBody_SetClusterShapeMatchingTarget(struct R3SoftBodyHandle handle, uint32_t cluster, const struct R3Pose *target)
Set the soft body cluster shape-matching target pose.
R3Status r3RecoverySetRecoveryPace(struct R3World *world, R3Real value)
Set the world setting documented by R3SoftRecoverySettings::recoveryPace.
R3Status r3SoftBody_TearCell(struct R3SoftBodyHandle handle, size_t index)
Mark the indexed cell as torn.
uint32_t r3SoftBody_AddCluster(struct R3SoftBodyHandle handle, const uint32_t *particles, size_t count)
Create a rigid proxy cluster from the supplied particle indices and return its cluster index.
size_t r3SoftBodiesMaxExtraSubsteps(const struct R3World *world)
Return the world setting documented by R3SoftBodiesSettings::maxExtraSubsteps.
R3Status r3RecoverySetOverlapConstraints(struct R3World *world, R3Bool value)
Set the world setting documented by R3SoftRecoverySettings::overlapConstraints.
size_t r3SoftBody_Boundary(struct R3SoftBodyHandle handle, uint32_t *buffer, size_t capacity)
Copy flattened boundary element indices.
R3Status r3SoftBodyDesc_SetTensionOnlyEdges(struct R3SoftBodyDesc *desc, struct R3IndexView view)
Borrow tension only edges; preserve all other fields.
R3Status r3SoftBodyDesc_SetDihedrals(struct R3SoftBodyDesc *desc, struct R3DihedralView view)
Borrow dihedrals; preserve all other fields.
R3Status r3SoftBody_ApplyRadialImpulse(struct R3SoftBodyHandle handle, struct R3Vector center, R3Real magnitude, R3Real falloff_radius, R3Bool wake_up)
Apply an impulse of the given magnitude pointing away from the world-space center to every free parti...
R3Bool r3RecoveryOverlapNormalPush(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::overlapNormalPush.
struct R3SoftBodyDesc r3ClothAnisotropicSoftBodyDesc(struct R3Vector origin, struct R3Vector du, struct R3Vector dv, size_t nu, size_t nv, struct R3SpringCoefficients warp, struct R3SpringCoefficients weft, struct R3SpringCoefficients shear)
Return a cloth recipe like r3ClothSoftBodyDesc whose edges along du (warp), along dv (weft) and diago...
R3Bool r3RecoveryDetectionMotionGating(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::detectionMotionGating.
R3Status r3SoftBody_ResetPlasticity(struct R3SoftBodyHandle handle)
Undo every permanent (plastic) deformation: edge rest lengths, dihedral rest angles,...
R3Real r3RecoveryOverlapProgressMargin(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::overlapProgressMargin.
size_t r3SoftBody_MeshIndicesById(struct R3SoftBodyHandle handle, struct R3SoftMeshId id, uint32_t *buffer, size_t capacity)
Copy flattened indices for a mesh ID.
R3Bool r3RecoveryCrossingRepulsionSelfGuide(const struct R3World *world)
Return the world setting documented by R3SoftRecoverySettings::crossingRepulsionSelfGuide.
R3Status r3SetNormalizedPredictionDistance(struct R3World *world, R3Real value)
Set the world setting documented by R3IntegrationParameters::normalizedPredictionDistance.
struct R3SpringCoefficients r3ContactSoftness(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::contactSoftness.
R3Status r3SetContactSoftness(struct R3World *world, struct R3SpringCoefficients value)
Set the world setting documented by R3IntegrationParameters::contactSoftness.
R3Status r3SetMaxCcdSubsteps(struct R3World *world, size_t value)
Set the world setting documented by R3IntegrationParameters::maxCcdSubsteps.
R3Real r3NormalizedMaxLinearVelocity(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::normalizedMaxLinearVelocity.
struct R3IntegrationParameters r3IntegrationParameters(const struct R3World *world)
Return a copy of all world integration settings.
double r3StepTimeMs(const struct R3World *world)
Native engine time of the most recent step, in milliseconds, as in the Rust testbed.
R3Status r3SetIntegrationParameters(struct R3World *world, const struct R3IntegrationParameters *data)
Copies validated values; does not expose a writable alias to Rust memory.
R3Status r3SetContactClustering(struct R3World *world, R3Bool value)
Set the world setting documented by R3IntegrationParameters::contactClustering.
struct R3VolumeMeshParameters r3NewVolumeMeshParameters(R3Real cell_size)
Return volume-meshing settings for the supplied cell size; this POD value requires no destructor.
struct R3World * r3DeserializeRigidState(const uint8_t *data, size_t count)
Read ONLY trusted legacy rigid-world snapshots from debug_deserialize3.rs, produced by the identical ...
R3Status r3SetGravity(struct R3World *world, struct R3Vector value)
Set the world-space gravitational acceleration.
R3Status r3SetTimeStep(struct R3World *world, R3Real value)
Set the world setting documented by R3IntegrationParameters::dt.
R3Status r3SetNumInternalPgsIterations(struct R3World *world, size_t value)
Set the world setting documented by R3IntegrationParameters::numInternalPgsIterations.
size_t r3NumThreads(const struct R3World *world)
Size of the world's dedicated pool, or zero if a parallel build has no dedicated pool configured.
struct R3ByteView r3Bytes_Data(const struct R3Bytes *bytes)
Borrow snapshot bytes without copying; valid until r3FreeBytes.
R3Status r3SetStaticContactSoftness(struct R3World *world, struct R3SpringCoefficients value)
Set the world setting documented by R3IntegrationParameters::staticContactSoftness.
size_t r3NumInternalStabilizationIterations(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::numInternalStabilizationIterations.
R3Status r3SetNormalizedMaxCorrectiveVelocity(struct R3World *world, R3Real value)
Set the world setting documented by R3IntegrationParameters::normalizedMaxCorrectiveVelocity.
R3Real r3NormalizedAllowedLinearError(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::normalizedAllowedLinearError.
R3Status r3FreeBytes(struct R3Bytes *bytes)
Release an owned snapshot byte buffer.
R3Status r3SetNumSolverIterations(struct R3World *world, size_t value)
Set the world setting documented by R3IntegrationParameters::numSolverIterations.
size_t r3QuarantinedSoftBodies(const struct R3World *world, struct R3SoftBodyHandle *buffer, size_t capacity)
Copy the soft bodies quarantined by the most recent Step because a particle position or velocity beca...
struct R3World * r3NewWorld(void)
Create an owned world.
struct R3Bytes * r3SerializeWorld(const struct R3World *world)
Return owned snapshot bytes; release them with r3FreeBytes.
size_t r3NumInternalPgsIterations(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::numInternalPgsIterations.
R3Bool r3ContactRecycling(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::contactRecycling.
R3Status r3SetLengthUnit(struct R3World *world, R3Real value)
Set the world setting documented by R3IntegrationParameters::lengthUnit.
R3Status r3ClearThreadPool(struct R3World *world)
Removes the world's dedicated pool.
R3Bool r3WarmstartJoints(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::warmstartJoints.
size_t r3QuarantinedColliders(const struct R3World *world, struct R3ColliderHandle *buffer, size_t capacity)
Copy the colliders quarantined by the most recent Step because their own pose or shape became non-fin...
R3Status r3SetNumThreads(struct R3World *world, size_t num_threads)
Configures a dedicated pool for this world's parallel work.
R3Real r3TimeStep(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::dt.
struct R3Bytes R3Bytes
Immutable owned byte buffer.
Definition rapier.h:12023
R3Real r3NormalizedPredictionDistance(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::normalizedPredictionDistance.
R3Status r3SetContactRecycling(struct R3World *world, R3Bool value)
Set the world setting documented by R3IntegrationParameters::contactRecycling.
R3Real r3NormalizedMaxCorrectiveVelocity(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::normalizedMaxCorrectiveVelocity.
struct R3Vector r3Gravity(const struct R3World *world)
Return the world-space gravitational acceleration.
R3Real r3LengthUnit(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::lengthUnit.
struct R3World R3World
Sole owner of simulation state.
Definition rapier.h:12150
R3Status r3Step(struct R3World *world, const struct R3PhysicsHooks *hooks, const struct R3EventCollector *events)
Advance simulation by one timestep.
R3Bool r3FrictionInBiasPass(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::frictionInBiasPass.
R3Status r3SetWarmstartCoefficient(struct R3World *world, R3Real value)
Set the world setting documented by R3IntegrationParameters::warmstartCoefficient.
R3Real r3WarmstartCoefficient(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::warmstartCoefficient.
size_t r3ActiveRigidBodies(const struct R3World *world, struct R3RigidBodyHandle *buffer, size_t capacity)
Copies the island manager's active body handles.
R3Real r3MinCcdDt(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::minCcdDt.
size_t r3NumSolverIterations(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::numSolverIterations.
R3Bool r3ContactClustering(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::contactClustering.
R3Status r3SetFrictionModel(struct R3World *world, uint32_t value)
Set the world setting documented by R3IntegrationParameters::frictionModel.
R3Status r3SetMinCcdDt(struct R3World *world, R3Real value)
Set the world setting documented by R3IntegrationParameters::minCcdDt.
R3Status r3SetNumInternalStabilizationIterations(struct R3World *world, size_t value)
Set the world setting documented by R3IntegrationParameters::numInternalStabilizationIterations.
size_t r3MaxCcdSubsteps(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::maxCcdSubsteps.
struct R3IntegrationParameters r3DefaultIntegrationParameters(void)
Return native default integration parameters.
R3Status r3SetWarmstartJoints(struct R3World *world, R3Bool value)
Set the world setting documented by R3IntegrationParameters::warmstartJoints.
R3Real r3NormalizedContactRecycleDistance(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::normalizedContactRecycleDistance.
R3Status r3SetNormalizedMaxLinearVelocity(struct R3World *world, R3Real value)
Set the world setting documented by R3IntegrationParameters::normalizedMaxLinearVelocity.
struct R3SpringCoefficients r3StaticContactSoftness(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::staticContactSoftness.
R3Status r3SetNormalizedContactRecycleDistance(struct R3World *world, R3Real value)
Set the world setting documented by R3IntegrationParameters::normalizedContactRecycleDistance.
R3Status r3DetectCollisions(struct R3World *world, const struct R3PhysicsHooks *hooks, const struct R3EventCollector *events)
Refresh collision detection without advancing simulation.
uint32_t r3FrictionModel(const struct R3World *world)
Return the world setting documented by R3IntegrationParameters::frictionModel.
R3Status r3SetFrictionInBiasPass(struct R3World *world, R3Bool value)
Set the world setting documented by R3IntegrationParameters::frictionInBiasPass.
R3Status r3SetNormalizedAllowedLinearError(struct R3World *world, R3Real value)
Set the world setting documented by R3IntegrationParameters::normalizedAllowedLinearError.
R3Status r3SetCountersEnabled(struct R3World *world, R3Bool enabled)
Enable or disable the native pipeline profiling counters.
R3Status r3FreeWorld(struct R3World *world)
Free a world.
struct R3World * r3DeserializeWorld(const uint8_t *data, size_t count)
Restore ONLY trusted snapshots produced by the identical Rapier build.
size_t r3QuarantinedRigidBodies(const struct R3World *world, struct R3RigidBodyHandle *buffer, size_t capacity)
Copy the rigid bodies quarantined by the most recent Step because their pose or velocity became non-f...
R3JointDesc joint(uint8_t locked_axes=0)
Return a joint description with the selected locked-axis mask.
Definition rapier.hpp:93
R3SoftBodyDesc soft_body()
Return native soft-body description defaults.
Definition rapier.hpp:88
R3QueryOptions queryOptions()
Return query defaults with no callback or exclusions.
Definition rapier.hpp:100
#define RAPIER_CALL
C ABI calling convention.
Definition rapier.h:41
Axis-aligned bounding box.
Definition rapier.h:13931
struct R3Vector maxs
Maximum corner in each coordinate.
Definition rapier.h:13939
struct R3Vector mins
Minimum corner in each coordinate.
Definition rapier.h:13935
Features available through the loaded C library, independent of consumer defines.
Definition rapier.h:14761
uint32_t simd_lanes
Solver SIMD lane count.
Definition rapier.h:14769
R3Bool enhanced_determinism
Whether the library is built with enhanced-determinism: the simulation, and the math functions such a...
Definition rapier.h:14778
R3Bool parallel
Whether this library exposes Rapier's parallel execution and thread-pool APIs.
Definition rapier.h:14773
R3Bool profiling
Whether native profiling timers were compiled in.
Definition rapier.h:14765
Runtime ABI identity and fundamental type sizes.
Definition rapier.h:14738
uint32_t dimension
Spatial dimension, 2 or 3.
Definition rapier.h:14746
uint32_t abi_version
Binary ABI revision; compare with the header ABI_VERSION.
Definition rapier.h:14742
uint32_t real_size
Size of Real in bytes, 4 or 8.
Definition rapier.h:14750
uint32_t pointer_size
Pointer size in bytes.
Definition rapier.h:14754
Borrowed bytes.
Definition rapier.h:14624
const uint8_t * data
Borrowed pointer to contiguous elements; NULL is allowed when count is zero.
Definition rapier.h:14628
size_t count
Number of elements, not bytes unless the element type is a byte.
Definition rapier.h:14632
Copy of the automatic stepping settings.
Definition rapier.h:14145
R3Bool enabled
Whether automatic stepping is enabled.
Definition rapier.h:14149
struct R3CharacterLength min_width
Minimum free width required on top of a step.
Definition rapier.h:14157
R3Bool include_dynamic_bodies
Whether the character can also step over dynamic bodies.
Definition rapier.h:14161
struct R3CharacterLength max_height
Maximum height of the steps climbed automatically.
Definition rapier.h:14153
Collision recorded during character movement.
Definition rapier.h:14187
struct R3Vector translation_applied
World-space translation already applied before collision.
Definition rapier.h:14199
struct R3ShapeCastHit hit
Shape/ray impact details.
Definition rapier.h:14207
struct R3Pose character_pos
World-space character pose at collision.
Definition rapier.h:14195
struct R3Vector translation_remaining
World-space translation remaining at collision.
Definition rapier.h:14203
struct R3ColliderHandle collider
World-bound collider handle.
Definition rapier.h:14191
Copy of character sliding, slope, and snapping settings.
Definition rapier.h:14288
R3Real min_slope_slide_angle
Minimum slope angle for sliding, in radians.
Definition rapier.h:14300
R3Bool slide
Whether obstacle sliding is enabled.
Definition rapier.h:14292
struct R3CharacterLength snap_distance
Maximum downward snapping distance.
Definition rapier.h:14308
R3Real max_slope_climb_angle
Maximum climbable slope angle in radians.
Definition rapier.h:14296
R3Bool snap_to_ground
Whether downward ground snapping is enabled.
Definition rapier.h:14304
CharacterLength counterpart: relative=1 scales with character height, relative=0 uses world units.
Definition rapier.h:14129
R3Bool relative
1 scales value by the character shape size; 0 uses an absolute length.
Definition rapier.h:14138
R3Real value
Nonnegative length: a fraction of the character shape height when relative is 1, a world-space length...
Definition rapier.h:14134
Allowed character motion and ground-contact state.
Definition rapier.h:14168
R3Bool grounded
Whether the character touches the ground after movement.
Definition rapier.h:14176
struct R3Vector translation
Allowed world-space displacement; not applied automatically.
Definition rapier.h:14172
R3Bool is_sliding_down_slope
Whether motion includes sliding down a non-climbable slope.
Definition rapier.h:14180
Copyable collider construction data.
Definition rapier.h:13382
struct R3InteractionGroups solverGroups
Groups controlling contact-force solving.
Definition rapier.h:13438
R3Real contactSkin
Nonnegative extra separation distance around the collider.
Definition rapier.h:13458
uint16_t activeCollisionTypes
Bitmask of body-type pairs allowed to collide.
Definition rapier.h:13442
R3Real mass
Mass; nonnegative when supplied as input.
Definition rapier.h:13402
R3Real friction
Nonnegative friction coefficient.
Definition rapier.h:13410
struct R3MassProperties massProperties
Explicit local mass and inertia when massMode selects them.
Definition rapier.h:13406
R3Bool isSensor
1 detects intersections without generating contact forces.
Definition rapier.h:13426
R3Real density
Nonnegative mass per unit volume.
Definition rapier.h:13398
uint32_t restitutionCombineRule
R3_COMBINE_AVERAGE, MIN, MULTIPLY, MAX, CLAMPED_SUM, or GEOMETRIC_MEAN.
Definition rapier.h:13422
struct R3UserData userData
Application data; Rapier does not own pointers encoded in it.
Definition rapier.h:13462
uint32_t activeEvents
R3_COLLISION_EVENTS and/or R3_CONTACT_FORCE_EVENTS.
Definition rapier.h:13450
struct R3Pose position
Pose relative to the parent body; world-space for a collider without a parent.
Definition rapier.h:13390
struct R3ShapeDesc shape
Non-owning shape description; build/insert consumes its views synchronously.
Definition rapier.h:13386
uint32_t activeHooks
Hook flags enabling pair filtering/contact modification.
Definition rapier.h:13446
R3Real contactForceEventThreshold
Nonnegative force threshold for force events.
Definition rapier.h:13454
R3Bool enabled
Whether this setting/object is enabled (0 or 1).
Definition rapier.h:13430
R3Real restitution
Nonnegative restitution coefficient.
Definition rapier.h:13414
struct R3InteractionGroups collisionGroups
Groups controlling collision detection.
Definition rapier.h:13434
uint32_t frictionCombineRule
R3_COMBINE_AVERAGE, MIN, MULTIPLY, MAX, CLAMPED_SUM, or GEOMETRIC_MEAN.
Definition rapier.h:13418
uint32_t massMode
R3_MASS_DENSITY, R3_MASS_TOTAL, or R3_MASS_PROPERTIES.
Definition rapier.h:13394
Copyable non-owning handle: world pointer plus entity index and generation.
Definition rapier.h:13751
uint32_t generation
Slot generation used to reject stale handles.
Definition rapier.h:13763
uint32_t index
Slot index; UINT32_MAX denotes the explicit invalid handle.
Definition rapier.h:13759
struct R3World * world
Borrowed owning world.
Definition rapier.h:13755
Collision start/stop flags match Rapier CollisionEventFlags.
Definition rapier.h:14474
struct R3ColliderHandle collider1
First collider in the pair.
Definition rapier.h:14478
R3Bool started
1 for a starting event, 0 for a stopping event.
Definition rapier.h:14486
uint32_t flags
Bitmask of R3_COLLISION_EVENT_SENSOR and R3_COLLISION_EVENT_REMOVED.
Definition rapier.h:14490
struct R3ColliderHandle collider2
Second collider in the pair.
Definition rapier.h:14482
One compound child with a local pose and borrowed geometry description.
Definition rapier.h:13305
struct R3Pose pose
Pose relative to the compound parent.
Definition rapier.h:13309
struct R3ShapeDesc shape
Non-owning shape description; build/insert consumes its views synchronously.
Definition rapier.h:13313
Borrowed elements; count counts elements.
Definition rapier.h:13211
size_t count
Number of elements, not bytes unless the element type is a byte.
Definition rapier.h:13219
const struct R3CompoundShapeDesc * data
Borrowed pointer to contiguous elements; NULL is allowed when count is zero.
Definition rapier.h:13215
World-space line segment produced by physics debug rendering.
Definition rapier.h:14639
struct R3Vector b
World-space end point.
Definition rapier.h:14647
struct R3Vector a
World-space start point.
Definition rapier.h:14643
float color[4]
HSLA color: hue in degrees, then saturation, lightness and alpha in [0, 1].
Definition rapier.h:14651
Debug-render colors and sizes.
Definition rapier.h:15399
float contact_normal_color[4]
Color of the contact normals.
Definition rapier.h:15463
float volume_gradient_color[4]
Color of the volume gradients drawn at the particles of a volume constraint.
Definition rapier.h:15507
float collider_aabb_color[4]
Color of the collider bounding boxes.
Definition rapier.h:15487
float multibody_joint_anchor_color[4]
Color of the lines from a body's center of mass to its multibody-joint anchors.
Definition rapier.h:15435
float soft_body_loaded_color[4]
Color of soft-body elements at their tear threshold when coloring them by load.
Definition rapier.h:15479
float disabled_color_multiplier[4]
Color multiplier for entities of disabled bodies.
Definition rapier.h:15451
float volume_contact_normal_color[4]
Color of the normals of soft-body volume contacts.
Definition rapier.h:15503
float multibody_joint_separation_color[4]
Color of the line between the two anchors of a multibody joint.
Definition rapier.h:15439
R3Real pseudo_normal_length
Nonnegative length of the pseudo-normals.
Definition rapier.h:15499
float impulse_joint_separation_color[4]
Color of the line between the two anchors of an impulse joint.
Definition rapier.h:15431
float collider_parentless_color[4]
Color of colliders without a parent body.
Definition rapier.h:15423
float contact_depth_color[4]
Color of the segments joining the two points of a contact.
Definition rapier.h:15459
R3Real rigid_body_axes_length
Nonnegative length of the rendered body axes.
Definition rapier.h:15455
float edge_pseudo_normal_color[4]
Color of the edge pseudo-normals of triangle meshes (3D only).
Definition rapier.h:15495
float soft_body_slack_color[4]
Color of unloaded soft-body elements when coloring them by load.
Definition rapier.h:15475
uint32_t border_subdivisions
Positive number of subdivisions approximating the borders of round shapes.
Definition rapier.h:15407
float soft_body_frame_color[4]
Color of the soft-body cluster frames.
Definition rapier.h:15483
float collider_fixed_color[4]
Color of colliders attached to fixed bodies.
Definition rapier.h:15415
float impulse_joint_anchor_color[4]
Color of the lines from a body's center of mass to its impulse-joint anchors.
Definition rapier.h:15427
float sleep_eligible_color_multiplier[4]
Color multiplier for entities of awake bodies eligible for sleep.
Definition rapier.h:15447
float collider_kinematic_color[4]
Color of colliders attached to kinematic bodies.
Definition rapier.h:15419
float collider_dynamic_color[4]
Color of colliders attached to dynamic bodies.
Definition rapier.h:15411
R3Real contact_normal_length
Nonnegative length of the contact normals.
Definition rapier.h:15467
float vertex_pseudo_normal_color[4]
Color of the vertex pseudo-normals of triangle meshes and polylines.
Definition rapier.h:15491
float sleep_color_multiplier[4]
Color multiplier for entities of sleeping bodies.
Definition rapier.h:15443
uint32_t subdivisions
Positive number of subdivisions approximating curved shapes.
Definition rapier.h:15403
float soft_body_element_color[4]
Color of soft-body elements.
Definition rapier.h:15471
Vertex indices for one dihedral; contiguous u32 fields with no padding.
Definition rapier.h:13131
uint32_t b
Second vertex index.
Definition rapier.h:13139
uint32_t c
Third vertex index.
Definition rapier.h:13143
uint32_t a
First vertex index.
Definition rapier.h:13135
uint32_t d
Fourth vertex index.
Definition rapier.h:13147
Borrowed array of dihedral elements.
Definition rapier.h:13157
size_t count
Number of elements, not bytes unless the element type is a byte.
Definition rapier.h:13165
const struct R3Dihedral * data
Borrowed pointer to contiguous elements; NULL is allowed when count is zero.
Definition rapier.h:13161
Vertex indices for one edge; contiguous u32 fields with no padding.
Definition rapier.h:12928
uint32_t a
First vertex index.
Definition rapier.h:12932
uint32_t b
Second vertex index.
Definition rapier.h:12936
Borrowed array of edge elements.
Definition rapier.h:12946
size_t count
Number of elements, not bytes unless the element type is a byte.
Definition rapier.h:12954
const struct R3Edge * data
Borrowed pointer to contiguous elements; NULL is allowed when count is zero.
Definition rapier.h:12950
An optional thread-local error handler.
Definition rapier.h:14411
R3ErrorCallback callback
Optional error callback; NULL disables notifications.
Definition rapier.h:14415
void * user_data
Application data; Rapier does not own pointers encoded in it.
Definition rapier.h:14419
Callbacks invoked while stepping, in addition to collecting the events.
Definition rapier.h:15378
R3ContactForceEventCallback contact_force_event
Optional contact-force callback.
Definition rapier.h:15390
void * user_data
Application data; Rapier does not own pointers encoded in it.
Definition rapier.h:15382
R3CollisionEventCallback collision_event
Optional collision start/stop callback.
Definition rapier.h:15386
Copyable non-owning handle: world pointer plus entity index and generation.
Definition rapier.h:12772
uint32_t index
Zero-based element index.
Definition rapier.h:12780
struct R3World * world
Borrowed owning world.
Definition rapier.h:12776
uint32_t generation
Slot generation used to reject stale handles.
Definition rapier.h:12784
Borrowed array of index elements.
Definition rapier.h:12913
size_t count
Number of elements, not bytes unless the element type is a byte.
Definition rapier.h:12921
const uint32_t * data
Borrowed pointer to contiguous elements; NULL is allowed when count is zero.
Definition rapier.h:12917
Plain configuration data; initialize defaults, edit, then apply.
Definition rapier.h:12480
R3Real normalizedContactRecycleDistance
Contact recycling distance divided by lengthUnit.
Definition rapier.h:12552
R3Real normalizedMaxCorrectiveVelocity
Maximum penetration-correction speed divided by lengthUnit.
Definition rapier.h:12516
R3Real warmstartCoefficient
Scale applied to cached impulses when warmstarting.
Definition rapier.h:12500
R3Real lengthUnit
Typical world-space length of one meter; scales solver tolerances, not geometry.
Definition rapier.h:12504
R3Real normalizedAllowedLinearError
Allowed penetration divided by lengthUnit.
Definition rapier.h:12512
R3Real normalizedMaxLinearVelocity
Maximum linear speed divided by lengthUnit.
Definition rapier.h:12524
struct R3SpringCoefficients contactSoftness
Spring coefficients for dynamic contact constraints.
Definition rapier.h:12492
size_t numSolverIterations
Number of solver substeps/iterations; must be positive.
Definition rapier.h:12528
R3Real dt
Simulation step duration in seconds.
Definition rapier.h:12484
size_t maxCcdSubsteps
Maximum CCD substeps; 0 disables all CCD for the world.
Definition rapier.h:12540
R3Bool contactRecycling
Whether to reuse nearby contacts between steps.
Definition rapier.h:12548
R3Real minCcdDt
Minimum CCD substep duration in seconds.
Definition rapier.h:12488
R3Bool contactClustering
Whether to cluster contacts for solving.
Definition rapier.h:12544
R3Bool frictionInBiasPass
Whether to solve friction in the bias pass.
Definition rapier.h:12556
struct R3SoftBodiesSettings softBodies
Soft-body integration and recovery settings.
Definition rapier.h:12508
uint32_t frictionModel
Friction model of rigid-body contacts, R3_FRICTION_MODEL_* (3D only).
Definition rapier.h:12565
size_t numInternalStabilizationIterations
Stabilization iterations after velocity solving.
Definition rapier.h:12536
size_t numInternalPgsIterations
PGS iterations per solver substep; must be positive.
Definition rapier.h:12532
struct R3SpringCoefficients staticContactSoftness
Spring coefficients for contacts against fixed bodies.
Definition rapier.h:12496
R3Real normalizedPredictionDistance
Speculative-contact distance divided by lengthUnit.
Definition rapier.h:12520
R3Bool warmstartJoints
Whether to warmstart joint constraints.
Definition rapier.h:12560
Collision membership/filter masks and their pairwise combination rule.
Definition rapier.h:13363
uint32_t filter
Membership groups accepted by this object, as a 32-bit mask.
Definition rapier.h:13371
uint32_t test_mode
0 requires both membership/filter tests; 1 accepts either test.
Definition rapier.h:13375
uint32_t memberships
Groups this object belongs to, as a 32-bit mask.
Definition rapier.h:13367
Sensor intersection state for a collider pair.
Definition rapier.h:14820
R3Bool intersecting
Whether the two sensor/collider shapes intersect.
Definition rapier.h:14832
struct R3ColliderHandle collider2
Second collider in the pair.
Definition rapier.h:14828
struct R3ColliderHandle collider1
First collider in the pair.
Definition rapier.h:14824
Damped least-squares inverse-kinematics parameters.
Definition rapier.h:14441
uint8_t constrained_axes
Controlled-axis bitmask; translations precede rotations.
Definition rapier.h:14453
R3Real epsilon_linear
Linear convergence tolerance.
Definition rapier.h:14457
size_t max_iters
Maximum inverse-kinematics iterations.
Definition rapier.h:14449
R3Real damping
Nonnegative motor damping.
Definition rapier.h:14445
R3Real epsilon_angular
Angular convergence tolerance in radians.
Definition rapier.h:14461
World-bound handles of the two connected bodies.
Definition rapier.h:14426
struct R3RigidBodyHandle body1
First connected body.
Definition rapier.h:14430
struct R3RigidBodyHandle body2
Second connected body.
Definition rapier.h:14434
Copyable joint configuration.
Definition rapier.h:12715
struct R3Pose localFrame1
Joint frame in body 1 local coordinates.
Definition rapier.h:12719
struct R3JointMotor motors[R3_JOINT_DOF_COUNT]
Axis motors in translation-then-rotation order.
Definition rapier.h:12747
struct R3Pose localFrame2
Joint frame in body 2 local coordinates.
Definition rapier.h:12723
R3Bool contactsEnabled
Whether connected bodies may collide.
Definition rapier.h:12755
uint8_t limitAxes
Axis mask enabling corresponding limits entries.
Definition rapier.h:12731
struct R3SpringCoefficients softness
Spring coefficients for constraint correction.
Definition rapier.h:12751
uint8_t coupledAxes
Axis mask sharing a coupled constraint.
Definition rapier.h:12739
R3Bool enabled
Whether this setting/object is enabled (0 or 1).
Definition rapier.h:12759
uint8_t motorAxes
Axis mask enabling corresponding motors entries.
Definition rapier.h:12735
struct R3JointLimits limits[R3_JOINT_DOF_COUNT]
Axis limits in translation-then-rotation order.
Definition rapier.h:12743
uint8_t lockedAxes
Locked joint degrees of freedom; translations precede rotations.
Definition rapier.h:12727
struct R3UserData userData
Application data; Rapier does not own pointers encoded in it.
Definition rapier.h:12763
Impulses applied by an impulse joint during the last step, along the axes of its joint frame.
Definition rapier.h:15185
R3Real limits[R3_JOINT_DOF_COUNT]
Impulse applied by the limit of each axis, in translation-then-rotation order.
Definition rapier.h:15197
struct R3Vector linear
Impulse applied along the locked translational axes.
Definition rapier.h:15189
R3AngVector angular
Angular impulse applied along the locked rotational axes (a scalar in 2D).
Definition rapier.h:15193
R3Real motors[R3_JOINT_DOF_COUNT]
Impulse applied by the motor of each axis, in translation-then-rotation order.
Definition rapier.h:15201
Lower and upper axis limits in length units or radians.
Definition rapier.h:12653
R3Real min
Minimum allowed axis displacement (length or radians).
Definition rapier.h:12657
R3Real max
Maximum allowed axis displacement (length or radians).
Definition rapier.h:12661
Position/velocity motor settings for one joint axis.
Definition rapier.h:12668
R3Real targetPos
Motor target position (length or radians).
Definition rapier.h:12676
R3Real stiffness
Nonnegative motor spring stiffness.
Definition rapier.h:12680
uint32_t model
Motor model: 0 acceleration-based, 1 force-based.
Definition rapier.h:12692
R3Real damping
Nonnegative motor damping.
Definition rapier.h:12684
R3Real maxForce
Nonnegative maximum force or torque.
Definition rapier.h:12688
R3Real targetVel
Motor target velocity (length per second or radians per second).
Definition rapier.h:12672
Explicit mass and principal inertia, matching MassProperties constructors.
Definition rapier.h:13338
R3AngVector principal_inertia
Principal angular inertia; scalar in 2D, three diagonal entries in 3D.
Definition rapier.h:13350
R3Real mass
Mass; nonnegative when supplied as input.
Definition rapier.h:13346
struct R3Rotation principal_inertia_local_frame
Orientation of principal inertia axes in local coordinates (3D).
Definition rapier.h:13355
struct R3Vector local_com
Center of mass in local coordinates.
Definition rapier.h:13342
Loader configuration.
Definition rapier.h:14934
R3Bool makeRootsFixed
Whether imported root bodies are fixed.
Definition rapier.h:14954
R3Bool skipPlaneGeoms
Whether to omit MJCF plane geometry.
Definition rapier.h:14958
R3Bool enableJointCollisions
Whether bodies connected by imported joints may collide.
Definition rapier.h:14950
R3Real scale
Shape scale along each axis.
Definition rapier.h:14970
struct R3ColliderDesc colliderBlueprint
Default collider description; nested geometry resources are borrowed through loading.
Definition rapier.h:14974
R3Bool applyImportedMassProps
Whether to use imported mass/inertia properties.
Definition rapier.h:14946
struct R3RigidBodyDesc rigidBodyBlueprint
Default rigid-body description used by the importer.
Definition rapier.h:14978
R3Bool disableJointMotors
Whether imported joint motors are disabled.
Definition rapier.h:14962
R3Bool createCollidersFromCollisionShapes
Whether to build colliders from collision geometry.
Definition rapier.h:14938
struct R3Pose shift
Transform applied to the imported model.
Definition rapier.h:14966
R3Bool createCollidersFromVisualShapes
Whether to also build colliders from visual geometry.
Definition rapier.h:14942
Copied metadata for a borrowed MJCF visual mesh.
Definition rapier.h:15020
R3Bool is_trimesh
Whether the visual geometry is a triangle mesh.
Definition rapier.h:15044
struct R3RenderMaterial material
Copied render material; meaningful when has_material is 1.
Definition rapier.h:15032
struct R3Pose local_pose
Visual pose relative to its source body.
Definition rapier.h:15024
R3Bool has_material
Whether material contains authored material data.
Definition rapier.h:15040
R3Bool has_color
Whether rgba contains an authored color.
Definition rapier.h:15036
float rgba[4]
RGBA visual color.
Definition rapier.h:15028
Copyable non-owning handle: world pointer plus entity index and generation.
Definition rapier.h:12814
struct R3World * world
Borrowed owning world.
Definition rapier.h:12818
uint32_t index
Zero-based element index.
Definition rapier.h:12822
uint32_t generation
Slot generation used to reject stale handles.
Definition rapier.h:12826
Rigid motion with constant linear and angular velocities.
Definition rapier.h:15239
struct R3Vector linvel
World-space linear velocity.
Definition rapier.h:15251
struct R3Vector local_center
Rotation center, in the local coordinates of the moving shape.
Definition rapier.h:15247
struct R3Pose start
World-space pose at time zero.
Definition rapier.h:15243
R3AngVector angvel
World-space angular velocity, in radians per second.
Definition rapier.h:15255
Optional boolean override.
Definition rapier.h:13189
R3Bool value
Value used when enabled is 1.
Definition rapier.h:13197
R3Bool enabled
Whether this setting/object is enabled (0 or 1).
Definition rapier.h:13193
Optional intersection pair; check found before reading the pair.
Definition rapier.h:15277
struct R3IntersectionPair pair
Intersection pair state.
Definition rapier.h:15281
R3Bool found
Whether a result exists; other result fields are meaningful only when this is 1.
Definition rapier.h:15285
Optional particle remapping; check found before reading the destination.
Definition rapier.h:14719
R3Bool found
Whether a result exists; other result fields are meaningful only when this is 1.
Definition rapier.h:14731
uint32_t index
Zero-based element index.
Definition rapier.h:14727
struct R3SoftBodyHandle body
World-bound rigid/soft-body handle, as selected by the field type.
Definition rapier.h:14723
Optional point projection.
Definition rapier.h:15223
struct R3PointProjection projection
Closest projection details.
Definition rapier.h:15227
R3Bool found
Whether a result exists; other result fields are meaningful only when this is 1.
Definition rapier.h:15231
Optional full ray result.
Definition rapier.h:13965
R3Bool found
Whether a result exists; other result fields are meaningful only when this is 1.
Definition rapier.h:13973
struct R3RayHit hit
Shape/ray impact details.
Definition rapier.h:13969
Optional scalar override; enabled = 0 selects no override.
Definition rapier.h:12193
R3Bool enabled
Whether this setting/object is enabled (0 or 1).
Definition rapier.h:12197
R3Real value
Value used when enabled is 1.
Definition rapier.h:12201
Optional shape-cast result.
Definition rapier.h:15208
struct R3ShapeCastHit hit
Shape-cast impact details.
Definition rapier.h:15212
R3Bool found
Whether a result exists; other result fields are meaningful only when this is 1.
Definition rapier.h:15216
Optional unsigned integer override; enabled = 0 selects no override.
Definition rapier.h:12208
R3Bool enabled
Whether this setting/object is enabled (0 or 1).
Definition rapier.h:12212
uint32_t value
Value used when enabled is 1.
Definition rapier.h:12216
Particle remapping after tearing.
Definition rapier.h:14658
uint32_t index
Zero-based element index.
Definition rapier.h:14666
struct R3SoftBodyHandle body
World-bound rigid/soft-body handle, as selected by the field type.
Definition rapier.h:14662
Stateless proportional-derivative controller: a PID controller without integral term,...
Definition rapier.h:14246
struct R3Vector lin_kd
Linear derivative gain per axis.
Definition rapier.h:14254
struct R3Vector lin_kp
Linear proportional gain per axis.
Definition rapier.h:14250
R3AngVector ang_kd
Angular derivative gain per axis.
Definition rapier.h:14262
R3AngVector ang_kp
Angular proportional gain per axis.
Definition rapier.h:14258
uint32_t axes
Controlled axes, a combination of R3_AXES_MASK_* bits.
Definition rapier.h:14266
Callbacks must not unwind or retain arguments.
Definition rapier.h:14597
void * user_data
Application data; Rapier does not own pointers encoded in it.
Definition rapier.h:14601
R3PairFilter filter_intersection_pair
Optional sensor-pair filter, called only for colliders enabling the hook.
Definition rapier.h:14609
R3PairFilter filter_contact_pair
Optional contact-pair filter, called only for colliders enabling the hook.
Definition rapier.h:14605
R3ModifyContactContext modify_solver_contacts_context
Runs after the legacy property callback.
Definition rapier.h:14617
R3ModifyContacts modify_solver_contacts
Optional legacy aggregate contact-edit callback.
Definition rapier.h:14613
Per-axis proportional, integral, and derivative controller gains.
Definition rapier.h:14214
R3AngVector ang_kd
Angular derivative gain per axis.
Definition rapier.h:14238
struct R3Vector lin_kp
Linear proportional gain per axis.
Definition rapier.h:14218
struct R3Vector lin_ki
Linear integral gain per axis.
Definition rapier.h:14222
struct R3Vector lin_kd
Linear derivative gain per axis.
Definition rapier.h:14226
R3AngVector ang_kp
Angular proportional gain per axis.
Definition rapier.h:14230
R3AngVector ang_ki
Angular integral gain per axis.
Definition rapier.h:14234
Sizes of the POD types in this library build, for foreign-language layout checks.
Definition rapier.h:14077
size_t softMeshBindingDesc
Size in bytes of the softMeshBindingDesc structure; zero when unavailable.
Definition rapier.h:14109
size_t colliderDesc
Size in bytes of the colliderDesc structure; zero when unavailable.
Definition rapier.h:14085
size_t urdfLoaderOptions
Zero unless 3D f32 robotics is enabled.
Definition rapier.h:14117
size_t queryOptions
Size in bytes of the queryOptions structure; zero when unavailable.
Definition rapier.h:14113
size_t jointDesc
Size in bytes of the jointDesc structure; zero when unavailable.
Definition rapier.h:14093
size_t rigidBodyDesc
Size in bytes of the rigidBodyDesc structure; zero when unavailable.
Definition rapier.h:14081
size_t shapeDesc
Size in bytes of the shapeDesc structure; zero when unavailable.
Definition rapier.h:14089
size_t mjcfLoaderOptions
Zero unless 3D f32 robotics is enabled.
Definition rapier.h:14121
size_t softBodyDesc
Size in bytes of the softBodyDesc structure; zero when unavailable.
Definition rapier.h:14105
size_t integrationParameters
Size in bytes of the integrationParameters structure; zero when unavailable.
Definition rapier.h:14101
size_t softBodyMaterial
Size in bytes of the softBodyMaterial structure; zero when unavailable.
Definition rapier.h:14097
Closest projected world-space point and its collider.
Definition rapier.h:13853
R3Bool is_inside
Whether the original point was inside the collider.
Definition rapier.h:13865
struct R3ColliderHandle collider
World-bound collider handle.
Definition rapier.h:13857
struct R3Vector point
Projected world-space point.
Definition rapier.h:13861
Rigid transform combining translation and rotation.
Definition rapier.h:12638
struct R3Rotation rotation
Rotation value.
Definition rapier.h:12646
struct R3Vector translation
Translation vector.
Definition rapier.h:12642
Scene-query flags, groups, and excluded handles.
Definition rapier.h:13770
struct R3RigidBodyHandle exclude_rigid_body
Body whose colliders are excluded; use the explicit invalid handle for none.
Definition rapier.h:13790
struct R3ColliderHandle exclude_collider
Collider to exclude; use the explicit invalid handle to exclude none.
Definition rapier.h:13786
uint32_t flags
R3_QUERY_EXCLUDE_* bitmask selecting body types and sensors/solids.
Definition rapier.h:13774
struct R3InteractionGroups groups
Groups to test when use_groups is 1.
Definition rapier.h:13782
R3Bool use_groups
Whether to apply the groups filter.
Definition rapier.h:13778
Copyable query settings.
Definition rapier.h:13806
struct R3QueryFilter filter
Query selection settings.
Definition rapier.h:13810
R3QueryPredicate predicate
Optional additional query filter; nonzero accepts a collider.
Definition rapier.h:13814
void * userData
Application data; Rapier does not own pointers encoded in it.
Definition rapier.h:13818
Closest ray intersection, with a world-space normal.
Definition rapier.h:13825
struct R3Vector normal
World-space contact or surface normal.
Definition rapier.h:13837
uint32_t feature_id
Index within the feature kind; zero for unknown.
Definition rapier.h:13846
uint32_t feature_type
Shape feature kind: R3_FEATURE_UNKNOWN, R3_FEATURE_VERTEX, R3_FEATURE_EDGE, or R3_FEATURE_FACE.
Definition rapier.h:13842
struct R3ColliderHandle collider
World-bound collider handle.
Definition rapier.h:13829
R3Real time_of_impact
Ray/sweep parameter at first impact, bounded by the query options.
Definition rapier.h:13833
Optional ray collider/time result.
Definition rapier.h:13946
R3Bool found
Whether a result exists; other result fields are meaningful only when this is 1.
Definition rapier.h:13958
struct R3ColliderHandle collider
World-bound collider handle.
Definition rapier.h:13950
R3Real toi
Ray parameter t at impact: origin + direction * t.
Definition rapier.h:13954
Borrowed array of real elements.
Definition rapier.h:12895
size_t count
Number of elements, not bytes unless the element type is a byte.
Definition rapier.h:12903
const R3Real * data
Borrowed pointer to contiguous elements; NULL is allowed when count is zero.
Definition rapier.h:12899
Imported physically based visual material; no texture ownership.
Definition rapier.h:14995
float metallic
Material metallic factor.
Definition rapier.h:14999
float reflectance
Material reflectance factor.
Definition rapier.h:15007
float emissive[3]
RGB emissive color.
Definition rapier.h:15011
float roughness
Material roughness factor.
Definition rapier.h:15003
Stack-allocated rigid-body construction data.
Definition rapier.h:13982
size_t additionalPgsIterations
Extra PGS iterations for this body.
Definition rapier.h:14062
R3Real angularDamping
Nonnegative angular damping coefficient.
Definition rapier.h:14010
R3Real gravityScale
Multiplier applied to world gravity.
Definition rapier.h:14002
R3Real linearDamping
Nonnegative linear damping coefficient.
Definition rapier.h:14006
R3Bool gyroscopicForcesEnabled
Whether to include gyroscopic forces (3D).
Definition rapier.h:14066
uint8_t lockedAxes
Locked-axis bitmask; translations precede rotations.
Definition rapier.h:14026
R3Bool enabled
Whether this setting/object is enabled (0 or 1).
Definition rapier.h:14050
uint32_t bodyType
R3_DYNAMIC, R3_FIXED, R3_KINEMATIC_POSITION_BASED, or R3_KINEMATIC_VELOCITY_BASED.
Definition rapier.h:13998
R3Bool canSleep
Whether automatic sleeping is allowed.
Definition rapier.h:14030
struct R3Vector linvel
World-space linear velocity.
Definition rapier.h:13990
R3Bool allowFastRotation
Whether to allow fast rotations without the native angular-motion clamp.
Definition rapier.h:14046
R3Bool useAdditionalMassProperties
1 uses additionalMassProperties; 0 uses additionalMass.
Definition rapier.h:14018
R3AngVector angvel
World-space angular velocity in radians per second.
Definition rapier.h:13994
R3Real softCcdPrediction
Nonnegative prediction distance for soft CCD.
Definition rapier.h:14042
R3Bool ccdEnabled
Whether continuous collision detection is enabled.
Definition rapier.h:14038
R3Bool sleeping
Whether the body starts/is asleep.
Definition rapier.h:14034
struct R3UserData userData
Application data; Rapier does not own pointers encoded in it.
Definition rapier.h:14070
R3Real additionalMass
Nonnegative mass added to attached collider contributions.
Definition rapier.h:14014
int8_t dominanceGroup
Signed dominance group; larger groups dominate smaller groups.
Definition rapier.h:14054
struct R3MassProperties additionalMassProperties
Additional body-local mass and inertia when enabled.
Definition rapier.h:14022
struct R3Pose position
World-space pose.
Definition rapier.h:13986
size_t additionalSolverIterations
Extra solver iterations for this body and connected bodies.
Definition rapier.h:14058
Copyable non-owning handle: world pointer plus entity index and generation.
Definition rapier.h:12793
struct R3World * world
Borrowed owning world.
Definition rapier.h:12797
uint32_t index
Slot index; UINT32_MAX denotes the explicit invalid handle.
Definition rapier.h:12801
uint32_t generation
Slot generation used to reject stale handles.
Definition rapier.h:12805
A copied state snapshot, with no pointers or ownership obligations.
Definition rapier.h:15052
R3Bool enabled
Whether this setting/object is enabled (0 or 1).
Definition rapier.h:15072
R3Bool sleeping
Whether the body starts/is asleep.
Definition rapier.h:15068
struct R3Pose position
World-space pose.
Definition rapier.h:15056
R3AngVector angvel
World-space angular velocity in radians per second.
Definition rapier.h:15064
struct R3Vector linvel
World-space linear velocity.
Definition rapier.h:15060
struct R3UserData userData
Application data; Rapier does not own pointers encoded in it.
Definition rapier.h:15076
2D: angle in radians.
Definition rapier.h:12600
R3Real z
Z component.
Definition rapier.h:12623
R3Real w
Quaternion scalar component.
Definition rapier.h:12629
R3Real y
Y component.
Definition rapier.h:12617
R3Real x
X component.
Definition rapier.h:12611
Shape-cast impact geometry; collider-side data is world-space, moving-shape data is local.
Definition rapier.h:13872
struct R3ColliderHandle collider
World-bound collider handle.
Definition rapier.h:13876
R3Real time_of_impact
Ray/sweep parameter at first impact, bounded by the query options.
Definition rapier.h:13880
struct R3Vector witness2
Impact witness on the moving shape, in its local coordinates.
Definition rapier.h:13888
struct R3Vector normal2
Impact normal on the moving shape, in its local coordinates.
Definition rapier.h:13896
struct R3Vector normal1
Impact normal on the collider, in world coordinates.
Definition rapier.h:13892
uint32_t status
Native result: 0 out of iterations, 1 converged, 2 failed, 3 penetrating or within target distance.
Definition rapier.h:13901
struct R3Vector witness1
Impact witness on the collider, in world coordinates.
Definition rapier.h:13884
Sweep termination settings.
Definition rapier.h:13908
R3Bool compute_impact_geometry_on_penetration
Whether to compute witness points/normals for an initial overlap.
Definition rapier.h:13924
R3Bool stop_at_penetration
Whether to stop at t = 0 for an initial overlap.
Definition rapier.h:13920
R3Real target_distance
Nonnegative separation at which a shape cast counts as a hit.
Definition rapier.h:13916
R3Real max_time_of_impact
Maximum sweep parameter; movement is velocity multiplied by this time.
Definition rapier.h:13912
Non-owning shape description.
Definition rapier.h:13230
struct R3Vector scale
Shape scale along each axis.
Definition rapier.h:13290
R3Real borderRadius
Rounding radius of a round cylinder or round cone (the round cuboid reads radius instead).
Definition rapier.h:13258
struct R3RealView heights
Borrowed height samples; 3D uses column-major rows * columns samples.
Definition rapier.h:13278
uint32_t kind
Discriminant selecting which description fields are read.
Definition rapier.h:13234
uint32_t flags
TRIMESH_*, POLYLINE_*, or HEIGHTFIELD_* bitmask selected by kind.
Definition rapier.h:13274
R3Real halfHeight
Half the height of a cylinder or cone.
Definition rapier.h:13254
struct R3Vector a
Half extents, endpoint/vertex, or halfspace normal, selected by kind.
Definition rapier.h:13238
R3Real radius
Radius for the selected primitive or recipe.
Definition rapier.h:13250
struct R3Vector b
Second endpoint or triangle vertex, selected by kind.
Definition rapier.h:13242
size_t rows
Number of heightfield rows.
Definition rapier.h:13282
struct R3EdgeView edges
Borrowed edge topology; count is edges.
Definition rapier.h:13270
struct R3Vector c
Third triangle vertex.
Definition rapier.h:13246
struct R3VectorView vertices
Borrowed vertex positions.
Definition rapier.h:13262
size_t columns
Number of heightfield columns.
Definition rapier.h:13286
struct R3CompoundShapeView children
Borrowed compound children and their nested geometry views.
Definition rapier.h:13298
struct R3TriangleView triangles
Borrowed triangle topology; count is triangles.
Definition rapier.h:13266
const R3SharedShape * sharedShape
Borrowed shared geometry; keep its wrapper alive through build/insert.
Definition rapier.h:13294
Plain configuration data; initialize defaults, edit, then apply.
Definition rapier.h:12451
R3Real contactStiffening
Multiplier on contact natural frequency for soft-body contacts.
Definition rapier.h:12467
size_t maxExtraSubsteps
Maximum additional substeps requested by soft-body motion.
Definition rapier.h:12463
struct R3SoftFemParameters fem
FEM linear-solver settings, present only when RAPIER_FEM is enabled.
Definition rapier.h:12472
struct R3SoftRecoverySettings recovery
Soft-body crossing detection and recovery settings.
Definition rapier.h:12455
R3Real resweepStrain
Strain threshold for re-solving soft constraints after contacts within a substep.
Definition rapier.h:12459
Copyable recipe, not an owned procedural builder.
Definition rapier.h:13475
struct R3Vector a
Recipe origin/center or first rope endpoint; use a recipe constructor.
Definition rapier.h:13483
size_t nz
Third recipe resolution; interpretation depends on kind.
Definition rapier.h:13525
struct R3IndexView pinned
Borrowed indices of pinned particles.
Definition rapier.h:13557
uint32_t kind
Discriminant selecting which description fields are read.
Definition rapier.h:13479
R3Real radiusEnd
Radius at the second end of a tapered cloth tube.
Definition rapier.h:13533
struct R3UserData userData
Application data; Rapier does not own pointers encoded in it.
Definition rapier.h:13698
uint32_t solver
0 = constraints, 1 = FEM (requires a library built with FEM).
Definition rapier.h:13629
int8_t dominanceGroup
Signed dominance group; larger groups dominate smaller groups.
Definition rapier.h:13694
struct R3EdgeView addedEdges
Borrowed structural edges added after appending (seams); indices count this body's particles then the...
Definition rapier.h:13617
R3Real linearDamping
Nonnegative linear damping coefficient.
Definition rapier.h:13674
struct R3Vector b
Recipe half extents, second rope endpoint, or tube axis; use a recipe constructor.
Definition rapier.h:13487
struct R3SpringCoefficients weftSoftness
Softness of the anisotropic cloth edges along dv (weft).
Definition rapier.h:13506
R3Real particleMass
Default nonnegative particle mass.
Definition rapier.h:13633
struct R3VolumeMeshParameters meshing
Volume-meshing parameters for a volumetric recipe.
Definition rapier.h:13545
struct R3EdgeView wire
Borrowed wire edges for a surface recipe.
Definition rapier.h:13596
struct R3RealView masses
Borrowed per-particle masses; when empty, particleMass is used.
Definition rapier.h:13553
R3Real volumeFactor
Target volume multiplier.
Definition rapier.h:13645
R3CellView cells
Borrowed triangles in 2D or tetrahedra in 3D.
Definition rapier.h:13581
struct R3SoftBodyDescView appended
Borrowed descriptions merged into this body, their particles numbered after this one's in order.
Definition rapier.h:13612
struct R3ColliderDesc collider
Collider configuration used by the recipe; shape comes from the generated geometry.
Definition rapier.h:13670
struct R3Vector translation
Translation vector.
Definition rapier.h:13537
size_t ny
Second recipe resolution; interpretation depends on kind.
Definition rapier.h:13521
R3SurfaceElementView skinIndices
Borrowed skin topology.
Definition rapier.h:13605
struct R3SpringCoefficients shearSoftness
Softness of the anisotropic cloth diagonal edges (shear).
Definition rapier.h:13512
struct R3EdgeView edges
Borrowed edge topology; count is edges.
Definition rapier.h:13561
struct R3Vector du
Cloth basis step along its first parameter axis.
Definition rapier.h:13491
struct R3OptionalBool shapeMatching
Optional shape-matching override; disabled retains recipe defaults.
Definition rapier.h:13649
R3Bool selfContacts
Whether self-collision is enabled.
Definition rapier.h:13658
R3Bool canSleep
Whether automatic sleeping is allowed.
Definition rapier.h:13690
R3Bool skinCollision
Whether skin elements participate in collision detection.
Definition rapier.h:13662
R3Bool volumePreservation
Whether to preserve volume.
Definition rapier.h:13641
struct R3SoftEdgeTearView edgeTearResistance
Borrowed per-edge tear-resistance overrides.
Definition rapier.h:13577
size_t additionalPgsIterations
Extra PGS iterations for this body.
Definition rapier.h:13686
struct R3OptionalReal particleRadius
Disabled by default: retain the radius computed by the generator.
Definition rapier.h:13637
struct R3DihedralView dihedrals
Borrowed four-vertex bending constraints.
Definition rapier.h:13590
struct R3VectorView skinVertices
Borrowed skin vertex positions.
Definition rapier.h:13601
struct R3SoftEdgeSoftnessView edgeSoftness
Borrowed per-edge softness overrides.
Definition rapier.h:13573
R3Real gravityScale
Multiplier applied to world gravity.
Definition rapier.h:13678
size_t additionalSolverIterations
Extra solver iterations for this body and connected bodies.
Definition rapier.h:13682
R3Real radius
Radius for the selected primitive or recipe.
Definition rapier.h:13529
struct R3OptionalBool oriented
Optional override of the ORIENTED flag of the generated collision surface (when disabled,...
Definition rapier.h:13654
struct R3SpringCoefficients warpSoftness
Softness of the anisotropic cloth edges along du (warp).
Definition rapier.h:13500
R3Bool collisionEnabled
Whether the generated collision geometry is enabled.
Definition rapier.h:13666
uint32_t cellModel
R3_SOFT_CELL_VOLUME, R3_SOFT_CELL_COROTATIONAL, or R3_SOFT_CELL_NEO_HOOKEAN.
Definition rapier.h:13625
struct R3EdgeView bendEdges
Borrowed bending edge constraints.
Definition rapier.h:13565
size_t nx
First recipe resolution; interpretation depends on kind.
Definition rapier.h:13517
struct R3IndexView tensionOnlyEdges
Borrowed indices of edges that resist tension only.
Definition rapier.h:13569
R3SurfaceElementView surface
Borrowed boundary edges in 2D or triangles in 3D.
Definition rapier.h:13585
struct R3VectorView positions
Borrowed initial particle positions.
Definition rapier.h:13549
struct R3OptionalReal totalMass
Optional total mass override for generated particles.
Definition rapier.h:13541
struct R3Vector dv
Cloth basis step along its second parameter axis.
Definition rapier.h:13495
struct R3SoftBodyMaterial material
Soft-body material coefficients.
Definition rapier.h:13621
Borrowed array of soft-body descriptions.
Definition rapier.h:13174
const struct R3SoftBodyDesc * data
Borrowed pointer to contiguous elements; NULL is allowed when count is zero.
Definition rapier.h:13178
size_t count
Number of elements, not bytes unless the element type is a byte.
Definition rapier.h:13182
Copyable non-owning handle: world pointer plus entity index and generation.
Definition rapier.h:13707
uint32_t index
Zero-based element index.
Definition rapier.h:13715
uint32_t generation
Slot generation used to reject stale handles.
Definition rapier.h:13719
struct R3World * world
Borrowed owning world.
Definition rapier.h:13711
Plain configuration data; initialize defaults, edit, then apply.
Definition rapier.h:12223
R3Real edgePlasticMax
Maximum permanent edge-length change as a fraction of its initial length.
Definition rapier.h:12279
R3Real tearSmoothing
Exponential load-smoothing time constant in seconds; zero disables smoothing.
Definition rapier.h:12295
R3Real youngModulus
Elastic modulus: force per area in 3D, force per length in 2D; nonnegative.
Definition rapier.h:12243
R3Real plasticMax
Maximum accumulated cell plastic stretch, measured by the norm of P - I.
Definition rapier.h:12263
struct R3SpringCoefficients bendSoftness
Spring coefficients for bending edges and dihedrals.
Definition rapier.h:12231
R3Real interiorStrength
Tear-threshold multiplier for undamaged interior elements.
Definition rapier.h:12299
R3Real elasticDampingRatio
Nonnegative damping ratio of elastic cells.
Definition rapier.h:12251
struct R3OptionalU32 minPiece
Optional minimum particle count of tear pieces.
Definition rapier.h:12307
uint32_t edgePlasticFlow
Plastic flow direction: R3_SOFT_EDGE_PLASTIC_FLOW_BOTH, _COMPRESSION or _TENSION.
Definition rapier.h:12283
R3Real poissonRatio
Poisson ratio for elastic cells, in [0, 0.5).
Definition rapier.h:12247
R3Real edgePlasticYield
Edge strain threshold for plastic flow; zero disables plasticity.
Definition rapier.h:12271
R3Real plasticYield
Cell strain threshold for plastic flow; zero disables plasticity.
Definition rapier.h:12255
R3Real deformationDamping
Rate per second pulling particle velocities toward best-fit rigid motion; zero disables it.
Definition rapier.h:12267
struct R3OptionalReal tearStrain
Optional strain threshold for tearing; disabled means no strain-based tearing.
Definition rapier.h:12287
struct R3SpringCoefficients shapeMatchingSoftness
Spring coefficients for shape-matching constraints.
Definition rapier.h:12239
uint32_t maxTearsPerStep
Maximum ordinary edge tears per step; edges above twice their threshold bypass the limit.
Definition rapier.h:12303
R3Real plasticCreep
Nonnegative rate per second at which excess cell strain becomes permanent.
Definition rapier.h:12259
struct R3SpringCoefficients edgeSoftness
Spring coefficients for structural edge constraints.
Definition rapier.h:12227
R3Real edgePlasticCreep
Nonnegative rate per second at which excess edge strain becomes permanent.
Definition rapier.h:12275
struct R3SpringCoefficients volumeSoftness
Spring coefficients for cell and global volume constraints.
Definition rapier.h:12235
struct R3OptionalReal tearForce
Optional tensile edge-force threshold for tearing.
Definition rapier.h:12291
Cluster and proxy remapping after a soft-body split.
Definition rapier.h:14673
struct R3RigidBodyHandle proxy
Cluster rigid-proxy body handle.
Definition rapier.h:14689
uint32_t cluster
Cluster index within its soft body.
Definition rapier.h:14685
struct R3SoftBodyHandle soft_body
Resulting soft-body handle.
Definition rapier.h:14681
uint32_t source_cluster
Original cluster index before splitting.
Definition rapier.h:14677
R3Bool keeps_proxy
Whether this split retains the original proxy.
Definition rapier.h:14693
Spring-coefficient override for one soft-body edge.
Definition rapier.h:12961
uint32_t edge
Zero-based edge index.
Definition rapier.h:12965
struct R3SpringCoefficients softness
Spring coefficients for constraint correction.
Definition rapier.h:12969
Borrowed elements; count counts elements.
Definition rapier.h:12976
size_t count
Number of elements, not bytes unless the element type is a byte.
Definition rapier.h:12984
const struct R3SoftEdgeSoftness * data
Borrowed pointer to contiguous elements; NULL is allowed when count is zero.
Definition rapier.h:12980
Tear-resistance override for one soft-body edge.
Definition rapier.h:12991
uint32_t edge
Zero-based edge index.
Definition rapier.h:12995
R3Real resistance
Nonnegative edge tear-resistance multiplier.
Definition rapier.h:12999
Borrowed elements; count counts elements.
Definition rapier.h:13006
size_t count
Number of elements, not bytes unless the element type is a byte.
Definition rapier.h:13014
const struct R3SoftEdgeTear * data
Borrowed pointer to contiguous elements; NULL is allowed when count is zero.
Definition rapier.h:13010
Plain configuration data; initialize defaults, edit, then apply.
Definition rapier.h:12431
R3Real linearTolerance
FEM iterative linear-solver tolerance.
Definition rapier.h:12435
size_t maxLinearIterations
Maximum FEM linear-solver iterations.
Definition rapier.h:12439
size_t maxDenseDofs
Maximum degrees of freedom solved by the dense FEM solver.
Definition rapier.h:12443
Impulse-joint movement between rigid proxies after tearing.
Definition rapier.h:14700
struct R3ImpulseJointHandle joint
Impulse joint that moved between proxies.
Definition rapier.h:14704
struct R3RigidBodyHandle to
Destination rigid-proxy body.
Definition rapier.h:14712
struct R3RigidBodyHandle from
Original rigid-proxy body.
Definition rapier.h:14708
Non-owning deformable binding description.
Definition rapier.h:13726
struct R3IndexView particles
Borrowed particle indices used for a direct mesh binding.
Definition rapier.h:13734
uint32_t kind
Discriminant selecting which description fields are read.
Definition rapier.h:13730
R3Real epsilon
Nonnegative positional tolerance for direct-by-position binding.
Definition rapier.h:13738
R3Bool selfContacts
Whether self-collision is enabled.
Definition rapier.h:13742
Stable identity of a live mesh within one soft body; matches Rapier's SoftMeshId.
Definition rapier.h:15083
uint32_t mesh
Mesh index within the cluster.
Definition rapier.h:15091
uint32_t cluster
Cluster index within its soft body.
Definition rapier.h:15087
Mesh identity and rendering metadata.
Definition rapier.h:15098
R3Bool is_skinned
Whether vertex positions are obtained by skinning.
Definition rapier.h:15114
struct R3SoftMeshId id
Cluster/mesh pair identifying this collision mesh.
Definition rapier.h:15102
size_t arity
Indices per mesh element: 2 for an edge or 3 for a triangle.
Definition rapier.h:15110
struct R3ColliderHandle collider
World-bound collider handle.
Definition rapier.h:15106
R3Bool collision_enabled
Whether collision detection is enabled for this mesh.
Definition rapier.h:15118
Plain configuration data; initialize defaults, edit, then apply.
Definition rapier.h:12314
R3Bool crossingRepulsionGuide
Guide cross-body repulsion by overlap-volume normals; closed meshes only.
Definition rapier.h:12358
R3Bool edgeStandDown
Disable edge constraints touching cross-body crossings.
Definition rapier.h:12350
uint32_t overlapPatchConstraints
Per-point constraints inside overlap patches: R3_SOFT_PATCH_CONSTRAINTS_KEEP, _STAND_DOWN or _ALONG_N...
Definition rapier.h:12391
R3Bool overlapSkipSelfTangled
Skip pair overlap constraints for self-crossed meshes.
Definition rapier.h:12378
R3Bool overlapRigid
Enable intersection-volume constraints against rigid colliders.
Definition rapier.h:12374
R3Bool authoredVelocityMargin
Expand speculative contact margins to cover particle velocities set between steps.
Definition rapier.h:12318
R3Bool crossBodyDetection
Detect boundary crossings between soft bodies.
Definition rapier.h:12338
R3Bool overlapConstraints
Enable intersection-volume constraints for overlapping closed surfaces.
Definition rapier.h:12370
R3Bool selfStandDown
Disable contacts on tangled features so elasticity can untangle them.
Definition rapier.h:12342
uint32_t overlapPatience
Recovery progress patience in steps.
Definition rapier.h:12419
R3Bool detectionMotionGating
Skip self-crossing detection when accumulated motion cannot have created a crossing.
Definition rapier.h:12334
R3Real overlapProgressMargin
Relative overlap-volume decrease that counts as recovery progress.
Definition rapier.h:12423
R3Bool crossingRepulsion
Repel crossing features toward their neighborhood's side of the surface.
Definition rapier.h:12354
R3Bool selfCrossingDetection
Detect surface self-crossings each step.
Definition rapier.h:12330
R3Bool edgeSpeculation
Enable speculative edge-edge collision constraints.
Definition rapier.h:12322
R3Real recoveryPace
Maximum recovery rate in length units per second, scaled by lengthUnit.
Definition rapier.h:12366
R3Bool crossingRepulsionSelfGuide
Guide self-crossing repulsion by self-intersection-volume normals; closed meshes only.
Definition rapier.h:12362
R3Bool invertedCellDetection
Detect inverted cells to support self-contact recovery.
Definition rapier.h:12326
R3Bool overlapNormalPush
Use the overlap normal for recovery pushes.
Definition rapier.h:12407
R3Bool overlapSkinVolume
Measure overlap on contact-skin surfaces rather than bare geometry.
Definition rapier.h:12395
R3Real overlapConstraintPace
Velocity-change limit per step, as a multiple of recoveryPace.
Definition rapier.h:12386
R3Bool crossBodyExpelGate
Allow contacts at cross-body crossings to expel, but not hold, the intruder.
Definition rapier.h:12346
R3Bool overlapSelfRegions
Enable recovery of self-intersection regions.
Definition rapier.h:12403
R3Bool overlapMultiVolume
Use spatially split overlap-volume constraints.
Definition rapier.h:12411
R3Bool overlapEdgeStandDown
Disable 3D closed-surface edge constraints where overlap constraints take over.
Definition rapier.h:12382
R3Real overlapKeptDepth
Overlap depth retained by recovery, as a fraction of the pair's contact skins.
Definition rapier.h:12399
uint32_t overlapSplit
Cells per tangent axis of the multi-volume grid.
Definition rapier.h:12415
Spring softness expressed as natural frequency and damping ratio.
Definition rapier.h:12172
R3Real damping_ratio
Nonnegative damping ratio; 1 is critical damping.
Definition rapier.h:12180
R3Real natural_frequency
Nonnegative spring natural frequency in Hz.
Definition rapier.h:12176
Vertex indices for one tetrahedron; contiguous u32 fields with no padding.
Definition rapier.h:13058
uint32_t c
Third vertex index.
Definition rapier.h:13070
uint32_t d
Fourth vertex index.
Definition rapier.h:13074
uint32_t b
Second vertex index.
Definition rapier.h:13066
uint32_t a
First vertex index.
Definition rapier.h:13062
Borrowed array of tetrahedron elements.
Definition rapier.h:13084
const struct R3Tetrahedron * data
Borrowed pointer to contiguous elements; NULL is allowed when count is zero.
Definition rapier.h:13088
size_t count
Number of elements, not bytes unless the element type is a byte.
Definition rapier.h:13092
Vertex indices for one triangle; contiguous u32 fields with no padding.
Definition rapier.h:13021
uint32_t a
First vertex index.
Definition rapier.h:13025
uint32_t c
Third vertex index.
Definition rapier.h:13033
uint32_t b
Second vertex index.
Definition rapier.h:13029
Borrowed array of triangle elements.
Definition rapier.h:13043
const struct R3Triangle * data
Borrowed pointer to contiguous elements; NULL is allowed when count is zero.
Definition rapier.h:13047
size_t count
Number of elements, not bytes unless the element type is a byte.
Definition rapier.h:13051
Loader configuration.
Definition rapier.h:14884
R3Bool squeezeEmptyFixedLinks
Whether to merge empty fixed URDF links.
Definition rapier.h:14908
R3Bool createCollidersFromVisualShapes
Whether to also build colliders from visual geometry.
Definition rapier.h:14892
struct R3RigidBodyDesc rigidBodyBlueprint
Default rigid-body description used by the importer.
Definition rapier.h:14924
R3Bool createCollidersFromCollisionShapes
Whether to build colliders from collision geometry.
Definition rapier.h:14888
struct R3Pose shift
Transform applied to the imported model.
Definition rapier.h:14912
R3Bool applyImportedMassProps
Whether to use imported mass/inertia properties.
Definition rapier.h:14896
struct R3ColliderDesc colliderBlueprint
Default collider description; nested geometry resources are borrowed through loading.
Definition rapier.h:14920
R3Bool makeRootsFixed
Whether imported root bodies are fixed.
Definition rapier.h:14904
R3Bool enableJointCollisions
Whether bodies connected by imported joints may collide.
Definition rapier.h:14900
R3Real scale
Shape scale along each axis.
Definition rapier.h:14916
Application-defined 128-bit value.
Definition rapier.h:12699
uint64_t low
Low 64 bits of the application value.
Definition rapier.h:12703
uint64_t high
High 64 bits of the application value.
Definition rapier.h:12707
Cartesian vector with two or three components.
Definition rapier.h:12579
R3Real z
Z component.
Definition rapier.h:12592
R3Real x
X component.
Definition rapier.h:12583
R3Real y
Y component.
Definition rapier.h:12587
Borrowed array of vector elements.
Definition rapier.h:12877
const struct R3Vector * data
Borrowed pointer to contiguous elements; NULL is allowed when count is zero.
Definition rapier.h:12881
size_t count
Number of elements, not bytes unless the element type is a byte.
Definition rapier.h:12885
Linear and angular velocity correction computed by a controller.
Definition rapier.h:14273
struct R3Vector linear
World-space linear velocity correction.
Definition rapier.h:14277
R3AngVector angularVelocity
World-space angular velocity correction, in radians per second.
Definition rapier.h:14281
Parameters for the native volumetric mesher.
Definition rapier.h:12833
uint32_t cover_smoothing
Number of cover-smoothing passes.
Definition rapier.h:12854
R3Real cell_size
Positive target cell size for volume meshing.
Definition rapier.h:12837
uint32_t enclosure
Enclosure strategy: 0 covers the whole shape, 1 encloses only its surface.
Definition rapier.h:12848
R3Real cover_guard
Minimum smoothed-cover distance from the shape, as a fraction of local cell size.
Definition rapier.h:12860
uint32_t cover_subdivisions
Maximum boundary-cell halvings below cell_size before cover smoothing.
Definition rapier.h:12866
Integer coordinates of a voxel cell.
Definition rapier.h:15141
R3VoxelCoord x
X component.
Definition rapier.h:15145
R3VoxelCoord z
Z component.
Definition rapier.h:15154
R3VoxelCoord y
Y component.
Definition rapier.h:15149
Optional voxel lookup result; check found before reading voxel data.
Definition rapier.h:15162
R3Bool found
Whether a result exists; other result fields are meaningful only when this is 1.
Definition rapier.h:15178
struct R3Vector size
Voxel dimensions along each axis.
Definition rapier.h:15174
struct R3Vector center
World-space wheel center.
Definition rapier.h:15170
struct R3VoxelKey key
Integer voxel coordinates.
Definition rapier.h:15166
Copy of the current wheel pose, suspension, and contact state.
Definition rapier.h:14353
R3Real rotation
Wheel rotation angle in radians.
Definition rapier.h:14369
struct R3Vector axle
World-space axle direction.
Definition rapier.h:14365
R3Real suspension_length
Current suspension length.
Definition rapier.h:14377
struct R3Vector center
World-space wheel center.
Definition rapier.h:14357
struct R3Vector contact_normal
World-space ground contact normal.
Definition rapier.h:14393
R3Bool is_in_contact
Whether the wheel has ground contact.
Definition rapier.h:14381
struct R3Vector contact_point
World-space ground contact point.
Definition rapier.h:14389
R3Real suspension_force
Current suspension force.
Definition rapier.h:14373
struct R3ColliderHandle ground_object
Ground collider handle, invalid when there is no contact.
Definition rapier.h:14385
struct R3Vector suspension
World-space suspension direction.
Definition rapier.h:14361
Wheel suspension/friction parameters.
Definition rapier.h:14316
R3Real max_suspension_force
Maximum force exerted by suspension.
Definition rapier.h:14340
R3Real side_friction_stiffness
Sideways tire friction stiffness.
Definition rapier.h:14344
R3Real suspension_damping
Nonnegative suspension relaxation damping.
Definition rapier.h:14328
R3Real friction_slip
Maximum tire friction/slip coefficient.
Definition rapier.h:14336
R3Real suspension_compression
Nonnegative damping coefficient during suspension compression.
Definition rapier.h:14324
R3Real max_suspension_travel
Maximum suspension travel in length units.
Definition rapier.h:14332
R3Real suspension_stiffness
Nonnegative suspension spring stiffness.
Definition rapier.h:14320