Rapier C — 3D / f32 0.36.0+c.0
Loading...
Searching...
No Matches
rapier.h
Go to the documentation of this file.
1
5#if !defined(RAPIER_DIM2) && !defined(RAPIER_DIM3)
6#define RAPIER_DIM3
7#endif
8#if defined(RAPIER_DIM2) && defined(RAPIER_DIM3)
9#error Select exactly one Rapier dimension
10#endif
11#if !defined(RAPIER_F32) && !defined(RAPIER_F64)
12#define RAPIER_F32
13#endif
14#if defined(RAPIER_F32) && defined(RAPIER_F64)
15#error Select exactly one Rapier precision
16#endif
17#if defined(RAPIER_DIM2)
19#define R2_DIMENSION 2
21#define RAPIER_TYPE(name) R2##name
23#define RAPIER_CONST(name) R2_##name
25#define RAPIER_FN(name) r2##name
26#else
28#define R3_DIMENSION 3
30#define RAPIER_TYPE(name) R3##name
32#define RAPIER_CONST(name) R3_##name
34#define RAPIER_FN(name) r3##name
35#endif
36#if defined(_WIN32)
38#define RAPIER_CALL __cdecl
39#else
41#define RAPIER_CALL
42#endif
43#ifndef RAPIER_API
44#if defined(_WIN32) && !defined(RAPIER_STATIC)
46#define RAPIER_API __declspec(dllimport)
47#else
49#define RAPIER_API
50#endif
51#endif
52
53
54#ifndef RAPIER_H
55#define RAPIER_H
56
57/* Generated by cbindgen. Regenerate with bindings/c/tools/generate-header.sh. */
58
59#include <stdarg.h>
60#include <stdbool.h>
61#include <stddef.h>
62#include <stdint.h>
63#include <stdlib.h>
64
65#if defined(RAPIER_DIM2)
66
67#if defined(RAPIER_DIM3)
73#define R2_FRICTION_MODEL_SIMPLIFIED 0
74#endif
75
76#if defined(RAPIER_DIM3)
81#define R2_FRICTION_MODEL_COULOMB 1
82#endif
83
84#if defined(RAPIER_DIM2)
89#define R2_JOINT_DOF_COUNT 3
90#endif
91
92#if defined(RAPIER_DIM3)
97#define R2_JOINT_DOF_COUNT 6
98#endif
99
104#define R2_SOFT_DESC_PARTICLES 0
105
110#define R2_SOFT_DESC_ROPE 1
111
116#define R2_SOFT_DESC_GRID 2
117
122#define R2_SOFT_DESC_CLOTH 3
123
128#define R2_SOFT_DESC_CUBOID 4
129
134#define R2_SOFT_DESC_SURFACE 5
135
140#define R2_SOFT_DESC_DISK 6
141
146#define R2_SOFT_DESC_SPHERE 7
147
152#define R2_SOFT_DESC_CLOTH_TUBE 8
153
158#define R2_SOFT_DESC_VOLUMETRIC 9
159
160#if defined(RAPIER_DIM2)
165#define R2_SOFT_DESC_POLYGON 10
166#endif
167
168#if defined(RAPIER_DIM2)
173#define R2_SOFT_DESC_TRIMESH 11
174#endif
175
176#if defined(RAPIER_DIM3)
181#define R2_SOFT_DESC_CLOTH_ANISOTROPIC 12
182#endif
183
188#define R2_SOFT_BINDING_SKINNED 0
189
194#define R2_SOFT_BINDING_DIRECT 1
195
200#define R2_SOFT_BINDING_DIRECT_BY_POSITION 2
201
202#if defined(RAPIER_DIM2)
207#define R2_POLYLINE_ORIENTED 1
208#endif
209
214#define R2_POLYLINE_DEFORMABLE 2
215
220#define R2_SHAPE_DESC_BALL 0
221
226#define R2_SHAPE_DESC_CUBOID 1
227
232#define R2_SHAPE_DESC_ROUND_CUBOID 2
233
238#define R2_SHAPE_DESC_CAPSULE 3
239
244#define R2_SHAPE_DESC_SEGMENT 4
245
250#define R2_SHAPE_DESC_TRIANGLE 5
251
256#define R2_SHAPE_DESC_HALFSPACE 6
257
262#define R2_SHAPE_DESC_CONVEX_HULL 7
263
268#define R2_SHAPE_DESC_TRIMESH 8
269
274#define R2_SHAPE_DESC_POLYLINE 9
275
280#define R2_SHAPE_DESC_SHARED 10
281
286#define R2_SHAPE_DESC_HEIGHTFIELD 11
287
292#define R2_SHAPE_DESC_CYLINDER 12
293
298#define R2_SHAPE_DESC_CONE 13
299
304#define R2_SHAPE_DESC_COMPOUND 14
305
310#define R2_SHAPE_DESC_ROUND_CYLINDER 15
311
316#define R2_SHAPE_DESC_ROUND_CONE 16
317
322#define R2_MASS_DENSITY 0
323
328#define R2_MASS_TOTAL 1
329
334#define R2_MASS_PROPERTIES 2
335
340#define R2_ABI_VERSION 1
341
346#define R2_DYNAMIC 0
347
352#define R2_FIXED 1
353
358#define R2_KINEMATIC_POSITION_BASED 2
359
364#define R2_KINEMATIC_VELOCITY_BASED 3
365
370#define R2_COLLISION_EVENTS 1
371
376#define R2_CONTACT_FORCE_EVENTS 2
377
382#define R2_COMBINE_AVERAGE 0
383
388#define R2_COMBINE_MIN 1
389
394#define R2_COMBINE_MULTIPLY 2
395
400#define R2_COMBINE_MAX 3
401
406#define R2_COMBINE_CLAMPED_SUM 4
407
412#define R2_COMBINE_GEOMETRIC_MEAN 5
413
418#define R2_COLLISION_TYPES_DYNAMIC_DYNAMIC 1
419
424#define R2_COLLISION_TYPES_DYNAMIC_KINEMATIC 12
425
430#define R2_COLLISION_TYPES_DYNAMIC_FIXED 2
431
436#define R2_COLLISION_TYPES_KINEMATIC_KINEMATIC 52224
437
442#define R2_COLLISION_TYPES_KINEMATIC_FIXED 8704
443
448#define R2_COLLISION_TYPES_FIXED_FIXED 32
449
454#define R2_COLLISION_TYPES_DEFAULT 15
455
460#define R2_FILTER_CONTACT_PAIRS 1
461
466#define R2_FILTER_INTERSECTION_PAIR 2
467
472#define R2_MODIFY_SOLVER_CONTACTS 4
473
478#define R2_QUERY_EXCLUDE_FIXED 1
479
484#define R2_QUERY_EXCLUDE_KINEMATIC 2
485
490#define R2_QUERY_EXCLUDE_DYNAMIC 4
491
496#define R2_QUERY_EXCLUDE_SENSORS 8
497
502#define R2_QUERY_EXCLUDE_SOLIDS 16
503
508#define R2_QUERY_ONLY_DYNAMIC 3
509
514#define R2_QUERY_ONLY_KINEMATIC 5
515
520#define R2_QUERY_ONLY_FIXED 6
521
526#define R2_DEBUG_COLLIDER_SHAPES 1
527
532#define R2_DEBUG_RIGID_BODY_AXES 2
533
538#define R2_DEBUG_MULTIBODY_JOINTS 4
539
544#define R2_DEBUG_IMPULSE_JOINTS 8
545
550#define R2_DEBUG_SOLVER_CONTACTS 16
551
556#define R2_DEBUG_CONTACTS 32
557
562#define R2_DEBUG_COLLIDER_AABBS 64
563
568#define R2_DEBUG_SOFT_BODIES 128
569
574#define R2_DEBUG_PSEUDO_NORMALS 256
575
580#define R2_DEBUG_SOFT_VOLUME_CONTACTS 512
581
586#define R2_DEBUG_SOFT_BODY_STRESS 1024
587
592#define R2_GROUPS_AND 0
593
598#define R2_GROUPS_OR 1
599
604#define R2_MOTOR_ACCELERATION_BASED 0
605
610#define R2_MOTOR_FORCE_BASED 1
611
616#define R2_SOFT_CELL_VOLUME 0
617
622#define R2_SOFT_CELL_COROTATIONAL 1
623
628#define R2_SOFT_CELL_NEO_HOOKEAN 2
629
634#define R2_SOFT_SOLVER_CONSTRAINTS 0
635
640#define R2_SOFT_SOLVER_FEM 1
641
646#define R2_SOFT_EDGE_PLASTIC_FLOW_BOTH 0
647
652#define R2_SOFT_EDGE_PLASTIC_FLOW_COMPRESSION 1
653
658#define R2_SOFT_EDGE_PLASTIC_FLOW_TENSION 2
659
664#define R2_SOFT_PATCH_CONSTRAINTS_KEEP 0
665
670#define R2_SOFT_PATCH_CONSTRAINTS_STAND_DOWN 1
671
676#define R2_SOFT_PATCH_CONSTRAINTS_ALONG_NORMAL 2
677
682#define R2_AXIS_LIN_X 0
683
688#define R2_AXIS_LIN_Y 1
689
694#define R2_LOCK_TRANSLATION_X 1
695
700#define R2_LOCK_TRANSLATION_Y 2
701
706#define R2_LOCK_TRANSLATION_Z 4
707
712#define R2_LOCK_ROTATION_X 8
713
718#define R2_LOCK_ROTATION_Y 16
719
724#define R2_LOCK_ROTATION_Z 32
725
726#if defined(RAPIER_DIM2)
731#define R2_AXIS_ANG_X 2
732#endif
733
734#if defined(RAPIER_DIM3)
739#define R2_AXIS_ANG_X 3
740#endif
741
742#if defined(RAPIER_DIM2)
747#define R2_JOINT_FIXED_AXES 7
748#endif
749
750#if defined(RAPIER_DIM3)
755#define R2_JOINT_FIXED_AXES 63
756#endif
757
758#if defined(RAPIER_DIM2)
763#define R2_JOINT_REVOLUTE_AXES 3
764#endif
765
766#if defined(RAPIER_DIM3)
771#define R2_JOINT_REVOLUTE_AXES 55
772#endif
773
774#if defined(RAPIER_DIM2)
779#define R2_JOINT_PRISMATIC_AXES 6
780#endif
781
782#if defined(RAPIER_DIM3)
787#define R2_JOINT_PRISMATIC_AXES 62
788#endif
789
790#if defined(RAPIER_DIM3)
795#define R2_AXIS_LIN_Z 2
796#endif
797
798#if defined(RAPIER_DIM3)
803#define R2_AXIS_ANG_Y 4
804#endif
805
806#if defined(RAPIER_DIM3)
811#define R2_AXIS_ANG_Z 5
812#endif
813
814#if defined(RAPIER_DIM3)
819#define R2_JOINT_SPHERICAL_AXES 7
820#endif
821
826#define R2_SOFT_FRAME 4
827
832#define R2_SHAPE_CAST_OUT_OF_ITERATIONS 0
833
838#define R2_SHAPE_CAST_CONVERGED 1
839
844#define R2_SHAPE_CAST_FAILED 2
845
850#define R2_SHAPE_CAST_PENETRATING 3
851
856#define R2_FEATURE_UNKNOWN 0
857
862#define R2_FEATURE_VERTEX 1
863
868#define R2_FEATURE_EDGE 2
869
874#define R2_FEATURE_FACE 3
875
880#define R2_MULTIBODY_JOINTS_ARE_KINEMATIC 1
881
886#define R2_MULTIBODY_DISABLE_SELF_CONTACTS 2
887
893#define R2_MULTIBODY_SKIP_LOOP_CLOSURES 4
894
899#define R2_MULTIBODY_SKIP_JOINT_MOTORS 8
900
905#define R2_MULTIBODY_SKIP_JOINT_LIMITS 16
906
911#define R2_MULTIBODY_SKIP_JOINT_SPRINGS 32
912
917#define R2_TRIMESH_HALF_EDGE_TOPOLOGY 1
918
923#define R2_TRIMESH_CONNECTED_COMPONENTS 2
924
929#define R2_TRIMESH_DELETE_BAD_TOPOLOGY_TRIANGLES 4
930
935#define R2_TRIMESH_ORIENTED 8
936
941#define R2_TRIMESH_MERGE_DUPLICATE_VERTICES 16
942
947#define R2_TRIMESH_DELETE_DEGENERATE_TRIANGLES 32
948
953#define R2_TRIMESH_DELETE_DUPLICATE_TRIANGLES 64
954
959#define R2_TRIMESH_FIX_INTERNAL_EDGES 144
960
965#define R2_TRIMESH_DEFORMABLE 256
966
971#define R2_TRIMESH_FIX_INTERNAL_EDGES_TWO_SIDED 656
972
977#define R2_HEIGHTFIELD_FIX_INTERNAL_EDGES 1
978
983#define R2_AXES_MASK_LIN_X 1
984
989#define R2_AXES_MASK_LIN_Y 2
990
991#if defined(RAPIER_DIM3)
996#define R2_AXES_MASK_LIN_Z 4
997#endif
998
999#if defined(RAPIER_DIM3)
1004#define R2_AXES_MASK_ANG_X 8
1005#endif
1006
1007#if defined(RAPIER_DIM3)
1012#define R2_AXES_MASK_ANG_Y 16
1013#endif
1014
1019#define R2_AXES_MASK_ANG_Z 32
1020
1025#define R2_ABI_FEATURE_FEM 1
1026
1031#define R2_ABI_FEATURE_ROBOTICS 2
1032
1033#if (defined(RAPIER_FEM) && defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1038#define R2_ABI_FEATURES 3
1039#endif
1040
1041#if (defined(RAPIER_FEM) && !(defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32)))
1046#define R2_ABI_FEATURES 1
1047#endif
1048
1049#if (!defined(RAPIER_FEM) && defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1054#define R2_ABI_FEATURES 2
1055#endif
1056
1057#if (!defined(RAPIER_FEM) && !(defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32)))
1062#define R2_ABI_FEATURES 0
1063#endif
1064
1065#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1070#define R2_MESH_CONVERTER_TRIMESH 0
1071#endif
1072
1073#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1078#define R2_MESH_CONVERTER_OBB 1
1079#endif
1080
1081#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1086#define R2_MESH_CONVERTER_AABB 2
1087#endif
1088
1089#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1094#define R2_MESH_CONVERTER_CONVEX_HULL 3
1095#endif
1096
1097#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1102#define R2_MESH_CONVERTER_CONVEX_DECOMPOSITION 4
1103#endif
1104
1109#define R2_COLLISION_EVENT_SENSOR 1
1110
1115#define R2_COLLISION_EVENT_REMOVED 2
1116
1121typedef struct R2Bytes R2Bytes;
1122
1127typedef struct R2ContactModificationContext R2ContactModificationContext;
1128
1129#if defined(RAPIER_DIM3)
1134typedef struct R2DynamicRayCastVehicleController R2DynamicRayCastVehicleController;
1135#endif
1136
1143typedef struct R2EventCollector R2EventCollector;
1144
1151typedef struct R2KinematicCharacterController R2KinematicCharacterController;
1152
1153#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1159typedef struct R2LoadedMeshes R2LoadedMeshes;
1160#endif
1161
1162#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1168typedef struct R2MjcfContactHooks R2MjcfContactHooks;
1169#endif
1170
1171#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1176typedef struct R2MjcfRobot R2MjcfRobot;
1177#endif
1178
1179#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1185typedef struct R2MjcfRobotHandles R2MjcfRobotHandles;
1186#endif
1187
1193typedef struct R2PidController R2PidController;
1194
1200typedef struct R2ReadContext R2ReadContext;
1201
1208typedef struct R2ShapeMesh R2ShapeMesh;
1209
1214typedef struct R2SoftBodyTearEvent R2SoftBodyTearEvent;
1215
1216#if defined(RAPIER_DIM3)
1221typedef struct R2TriMeshData R2TriMeshData;
1222#endif
1223
1224#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1230typedef struct R2UrdfRobot R2UrdfRobot;
1231#endif
1232
1233#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
1239typedef struct R2UrdfRobotHandles R2UrdfRobotHandles;
1240#endif
1241
1248typedef struct R2World R2World;
1249
1250#if defined(RAPIER_F32)
1255typedef float R2Real;
1256#endif
1257
1258#if defined(RAPIER_F64)
1263typedef double R2Real;
1264#endif
1265
1270typedef struct R2SpringCoefficients {
1274 R2Real natural_frequency;
1278 R2Real damping_ratio;
1279} R2SpringCoefficients;
1280
1285typedef uint32_t R2Bool;
1286
1291typedef struct R2OptionalReal {
1295 R2Bool enabled;
1299 R2Real value;
1300} R2OptionalReal;
1301
1306typedef struct R2OptionalU32 {
1310 R2Bool enabled;
1314 uint32_t value;
1315} R2OptionalU32;
1316
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;
1361 R2Real plasticMax;
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;
1407
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;
1523
1524#if defined(RAPIER_FEM)
1529typedef struct R2SoftFemParameters {
1533 R2Real linearTolerance;
1537 size_t maxLinearIterations;
1541 size_t maxDenseDofs;
1542} R2SoftFemParameters;
1543#endif
1544
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;
1571#endif
1572} R2SoftBodiesSettings;
1573
1578typedef struct R2IntegrationParameters {
1582 R2Real dt;
1586 R2Real minCcdDt;
1590 struct R2SpringCoefficients contactSoftness;
1594 struct R2SpringCoefficients staticContactSoftness;
1598 R2Real warmstartCoefficient;
1602 R2Real lengthUnit;
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;
1664#endif
1665} R2IntegrationParameters;
1666
1671typedef uint32_t R2Status;
1672
1677typedef struct R2Vector {
1681 R2Real x;
1685 R2Real y;
1686#if defined(RAPIER_DIM3)
1690 R2Real z;
1691#endif
1692} R2Vector;
1693
1698typedef struct R2Rotation {
1699#if defined(RAPIER_DIM2)
1703 R2Real angle;
1704#endif
1705#if defined(RAPIER_DIM3)
1709 R2Real x;
1710#endif
1711#if defined(RAPIER_DIM3)
1715 R2Real y;
1716#endif
1717#if defined(RAPIER_DIM3)
1721 R2Real z;
1722#endif
1723#if defined(RAPIER_DIM3)
1727 R2Real w;
1728#endif
1729} R2Rotation;
1730
1736typedef struct R2Pose {
1740 struct R2Vector translation;
1744 struct R2Rotation rotation;
1745} R2Pose;
1746
1751typedef struct R2JointLimits {
1755 R2Real min;
1759 R2Real max;
1760} R2JointLimits;
1761
1766typedef struct R2JointMotor {
1770 R2Real targetVel;
1774 R2Real targetPos;
1778 R2Real stiffness;
1782 R2Real damping;
1786 R2Real maxForce;
1790 uint32_t model;
1791} R2JointMotor;
1792
1797typedef struct R2UserData {
1801 uint64_t low;
1805 uint64_t high;
1806} R2UserData;
1807
1813typedef struct R2JointDesc {
1817 struct R2Pose localFrame1;
1821 struct R2Pose localFrame2;
1825 uint8_t lockedAxes;
1829 uint8_t limitAxes;
1833 uint8_t motorAxes;
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;
1857 R2Bool enabled;
1861 struct R2UserData userData;
1862} R2JointDesc;
1863
1870typedef struct R2ImpulseJointHandle {
1874 struct R2World *world;
1878 uint32_t index;
1882 uint32_t generation;
1883} R2ImpulseJointHandle;
1884
1891typedef struct R2RigidBodyHandle {
1895 struct R2World *world;
1899 uint32_t index;
1903 uint32_t generation;
1904} R2RigidBodyHandle;
1905
1912typedef struct R2MultibodyJointHandle {
1916 struct R2World *world;
1920 uint32_t index;
1924 uint32_t generation;
1925} R2MultibodyJointHandle;
1926
1931typedef struct R2VolumeMeshParameters {
1935 R2Real cell_size;
1936#if defined(RAPIER_DIM2)
1940 R2Real min_angle;
1941#endif
1942#if defined(RAPIER_DIM3)
1946 uint32_t enclosure;
1947#endif
1948#if defined(RAPIER_DIM3)
1952 uint32_t cover_smoothing;
1953#endif
1954#if defined(RAPIER_DIM3)
1958 R2Real cover_guard;
1959#endif
1960#if defined(RAPIER_DIM3)
1964 uint32_t cover_subdivisions;
1965#endif
1966} R2VolumeMeshParameters;
1967
1975typedef struct R2VectorView {
1979 const struct R2Vector *data;
1983 size_t count;
1984} R2VectorView;
1985
1993typedef struct R2RealView {
1997 const R2Real *data;
2001 size_t count;
2002} R2RealView;
2003
2011typedef struct R2IndexView {
2015 const uint32_t *data;
2019 size_t count;
2020} R2IndexView;
2021
2026typedef struct R2Edge {
2030 uint32_t a;
2034 uint32_t b;
2035} R2Edge;
2036
2044typedef struct R2EdgeView {
2048 const struct R2Edge *data;
2052 size_t count;
2053} R2EdgeView;
2054
2059typedef struct R2SoftEdgeSoftness {
2063 uint32_t edge;
2067 struct R2SpringCoefficients softness;
2068} R2SoftEdgeSoftness;
2069
2074typedef struct R2SoftEdgeSoftnessView {
2078 const struct R2SoftEdgeSoftness *data;
2082 size_t count;
2083} R2SoftEdgeSoftnessView;
2084
2089typedef struct R2SoftEdgeTear {
2093 uint32_t edge;
2097 R2Real resistance;
2098} R2SoftEdgeTear;
2099
2104typedef struct R2SoftEdgeTearView {
2108 const struct R2SoftEdgeTear *data;
2112 size_t count;
2113} R2SoftEdgeTearView;
2114
2119typedef struct R2Triangle {
2123 uint32_t a;
2127 uint32_t b;
2131 uint32_t c;
2132} R2Triangle;
2133
2141typedef struct R2TriangleView {
2145 const struct R2Triangle *data;
2149 size_t count;
2150} R2TriangleView;
2151
2156typedef struct R2Tetrahedron {
2160 uint32_t a;
2164 uint32_t b;
2168 uint32_t c;
2172 uint32_t d;
2173} R2Tetrahedron;
2174
2182typedef struct R2TetrahedronView {
2186 const struct R2Tetrahedron *data;
2190 size_t count;
2191} R2TetrahedronView;
2192
2193#if defined(RAPIER_DIM2)
2198typedef struct R2TriangleView R2CellView;
2199#endif
2200
2201#if defined(RAPIER_DIM3)
2206typedef struct R2TetrahedronView R2CellView;
2207#endif
2208
2209#if defined(RAPIER_DIM2)
2214typedef struct R2EdgeView R2SurfaceElementView;
2215#endif
2216
2217#if defined(RAPIER_DIM3)
2222typedef struct R2TriangleView R2SurfaceElementView;
2223#endif
2224
2229typedef struct R2Dihedral {
2233 uint32_t a;
2237 uint32_t b;
2241 uint32_t c;
2245 uint32_t d;
2246} R2Dihedral;
2247
2255typedef struct R2DihedralView {
2259 const struct R2Dihedral *data;
2263 size_t count;
2264} R2DihedralView;
2265
2272typedef struct R2SoftBodyDescView {
2276 const struct R2SoftBodyDesc *data;
2280 size_t count;
2281} R2SoftBodyDescView;
2282
2287typedef struct R2OptionalBool {
2291 R2Bool enabled;
2295 R2Bool value;
2296} R2OptionalBool;
2297
2302typedef struct R2SharedShape R2SharedShape;
2303
2304
2309typedef struct R2CompoundShapeView {
2313 const struct R2CompoundShapeDesc *data;
2317 size_t count;
2318} R2CompoundShapeView;
2319
2328typedef struct R2ShapeDesc {
2332 uint32_t kind;
2336 struct R2Vector a;
2340 struct R2Vector b;
2344 struct R2Vector c;
2348 R2Real radius;
2352 R2Real halfHeight;
2356 R2Real borderRadius;
2360 struct R2VectorView vertices;
2364 struct R2TriangleView triangles;
2368 struct R2EdgeView edges;
2372 uint32_t flags;
2376 struct R2RealView heights;
2380 size_t rows;
2384 size_t columns;
2388 struct R2Vector scale;
2392 const R2SharedShape *sharedShape;
2396 struct R2CompoundShapeView children;
2397} R2ShapeDesc;
2398
2403typedef struct R2CompoundShapeDesc {
2407 struct R2Pose pose;
2411 struct R2ShapeDesc shape;
2412} R2CompoundShapeDesc;
2413
2414
2415#if defined(RAPIER_DIM2)
2420typedef R2Real R2AngVector;
2421#endif
2422
2423#if defined(RAPIER_DIM3)
2428typedef struct R2Vector R2AngVector;
2429#endif
2430
2436typedef struct R2MassProperties {
2440 struct R2Vector local_com;
2444 R2Real mass;
2448 R2AngVector principal_inertia;
2449#if defined(RAPIER_DIM3)
2453 struct R2Rotation principal_inertia_local_frame;
2454#endif
2455} R2MassProperties;
2456
2461typedef struct R2InteractionGroups {
2465 uint32_t memberships;
2469 uint32_t filter;
2473 uint32_t test_mode;
2474} R2InteractionGroups;
2475
2480typedef struct R2ColliderDesc {
2484 struct R2ShapeDesc shape;
2488 struct R2Pose position;
2492 uint32_t massMode;
2496 R2Real density;
2500 R2Real mass;
2504 struct R2MassProperties massProperties;
2508 R2Real friction;
2512 R2Real restitution;
2516 uint32_t frictionCombineRule;
2520 uint32_t restitutionCombineRule;
2524 R2Bool isSensor;
2528 R2Bool enabled;
2532 struct R2InteractionGroups collisionGroups;
2536 struct R2InteractionGroups solverGroups;
2540 uint16_t activeCollisionTypes;
2544 uint32_t activeHooks;
2548 uint32_t activeEvents;
2552 R2Real contactForceEventThreshold;
2556 R2Real contactSkin;
2560 struct R2UserData userData;
2561} R2ColliderDesc;
2562
2573typedef struct R2SoftBodyDesc {
2577 uint32_t kind;
2581 struct R2Vector a;
2585 struct R2Vector b;
2589 struct R2Vector du;
2593 struct R2Vector dv;
2594#if defined(RAPIER_DIM3)
2598 struct R2SpringCoefficients warpSoftness;
2599#endif
2600#if defined(RAPIER_DIM3)
2604 struct R2SpringCoefficients weftSoftness;
2605#endif
2606#if defined(RAPIER_DIM3)
2610 struct R2SpringCoefficients shearSoftness;
2611#endif
2615 size_t nx;
2619 size_t ny;
2623 size_t nz;
2627 R2Real radius;
2631 R2Real radiusEnd;
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;
2679 R2CellView cells;
2683 R2SurfaceElementView surface;
2684#if defined(RAPIER_DIM3)
2688 struct R2DihedralView dihedrals;
2689#endif
2690#if defined(RAPIER_DIM3)
2694 struct R2EdgeView wire;
2695#endif
2699 struct R2VectorView skinVertices;
2703 R2SurfaceElementView skinIndices;
2710 struct R2SoftBodyDescView appended;
2715 struct R2EdgeView addedEdges;
2719 struct R2SoftBodyMaterial material;
2723 uint32_t cellModel;
2727 uint32_t solver;
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;
2788 R2Bool canSleep;
2792 int8_t dominanceGroup;
2796 struct R2UserData userData;
2797} R2SoftBodyDesc;
2798
2805typedef struct R2SoftBodyHandle {
2809 struct R2World *world;
2813 uint32_t index;
2817 uint32_t generation;
2818} R2SoftBodyHandle;
2819
2824typedef struct R2SoftMeshBindingDesc {
2828 uint32_t kind;
2832 struct R2IndexView particles;
2836 R2Real epsilon;
2840 R2Bool selfContacts;
2841} R2SoftMeshBindingDesc;
2842
2849typedef struct R2ColliderHandle {
2853 struct R2World *world;
2857 uint32_t index;
2861 uint32_t generation;
2862} R2ColliderHandle;
2863
2868typedef struct R2QueryFilter {
2872 uint32_t flags;
2876 R2Bool use_groups;
2880 struct R2InteractionGroups groups;
2884 struct R2ColliderHandle exclude_collider;
2888 struct R2RigidBodyHandle exclude_rigid_body;
2889} R2QueryFilter;
2890
2896typedef R2Bool (RAPIER_CALL *R2QueryPredicate)(void *user_data,
2897 const struct R2ReadContext *read,
2898 struct R2ColliderHandle handle);
2899
2904typedef struct R2QueryOptions {
2908 struct R2QueryFilter filter;
2912 R2QueryPredicate predicate;
2916 void *userData;
2917} R2QueryOptions;
2918
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;
2945} R2RayHit;
2946
2951typedef struct R2PointProjection {
2955 struct R2ColliderHandle collider;
2959 struct R2Vector point;
2963 R2Bool is_inside;
2964} R2PointProjection;
2965
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;
2999 uint32_t status;
3000} R2ShapeCastHit;
3001
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;
3024
3029typedef struct R2Aabb {
3033 struct R2Vector mins;
3037 struct R2Vector maxs;
3038} R2Aabb;
3039
3044typedef struct R2RayToi {
3048 struct R2ColliderHandle collider;
3052 R2Real toi;
3056 R2Bool found;
3057} R2RayToi;
3058
3063typedef struct R2OptionalRayHit {
3067 struct R2RayHit hit;
3071 R2Bool found;
3072} R2OptionalRayHit;
3073
3080typedef struct R2RigidBodyDesc {
3084 struct R2Pose position;
3088 struct R2Vector linvel;
3092 R2AngVector angvel;
3096 uint32_t bodyType;
3100 R2Real gravityScale;
3104 R2Real linearDamping;
3108 R2Real angularDamping;
3112 R2Real additionalMass;
3116 R2Bool useAdditionalMassProperties;
3120 struct R2MassProperties additionalMassProperties;
3124 uint8_t lockedAxes;
3128 R2Bool canSleep;
3132 R2Bool sleeping;
3136 R2Bool ccdEnabled;
3140 R2Real softCcdPrediction;
3144 R2Bool allowFastRotation;
3148 R2Bool enabled;
3152 int8_t dominanceGroup;
3156 size_t additionalSolverIterations;
3160 size_t additionalPgsIterations;
3164 R2Bool gyroscopicForcesEnabled;
3168 struct R2UserData userData;
3169} R2RigidBodyDesc;
3170
3175typedef struct R2PodLayout {
3179 size_t rigidBodyDesc;
3183 size_t colliderDesc;
3187 size_t shapeDesc;
3191 size_t jointDesc;
3195 size_t softBodyMaterial;
3199 size_t integrationParameters;
3203 size_t softBodyDesc;
3207 size_t softMeshBindingDesc;
3211 size_t queryOptions;
3215 size_t urdfLoaderOptions;
3219 size_t mjcfLoaderOptions;
3220} R2PodLayout;
3221
3227typedef struct R2CharacterLength {
3232 R2Real value;
3236 R2Bool relative;
3237} R2CharacterLength;
3238
3243typedef struct R2CharacterAutostep {
3247 R2Bool enabled;
3251 struct R2CharacterLength max_height;
3255 struct R2CharacterLength min_width;
3259 R2Bool include_dynamic_bodies;
3260} R2CharacterAutostep;
3261
3266typedef struct R2CharacterMovement {
3270 struct R2Vector translation;
3274 R2Bool grounded;
3278 R2Bool is_sliding_down_slope;
3279} R2CharacterMovement;
3280
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;
3307
3312typedef struct R2PidGains {
3316 struct R2Vector lin_kp;
3320 struct R2Vector lin_ki;
3324 struct R2Vector lin_kd;
3328 R2AngVector ang_kp;
3332 R2AngVector ang_ki;
3336 R2AngVector ang_kd;
3337} R2PidGains;
3338
3344typedef struct R2PdController {
3348 struct R2Vector lin_kp;
3352 struct R2Vector lin_kd;
3356 R2AngVector ang_kp;
3360 R2AngVector ang_kd;
3364 uint32_t axes;
3365} R2PdController;
3366
3371typedef struct R2VelocityCorrection {
3375 struct R2Vector linear;
3379 R2AngVector angularVelocity;
3380} R2VelocityCorrection;
3381
3386typedef struct R2CharacterControllerSettings {
3390 R2Bool slide;
3394 R2Real max_slope_climb_angle;
3398 R2Real min_slope_slide_angle;
3402 R2Bool snap_to_ground;
3406 struct R2CharacterLength snap_distance;
3407} R2CharacterControllerSettings;
3408
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;
3443} R2WheelTuning;
3444#endif
3445
3446#if defined(RAPIER_DIM3)
3451typedef struct R2WheelState {
3455 struct R2Vector center;
3459 struct R2Vector suspension;
3463 struct R2Vector axle;
3467 R2Real rotation;
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;
3492} R2WheelState;
3493#endif
3494
3502typedef void (RAPIER_CALL *R2ErrorCallback)(R2Status, const char*, void*);
3503
3509typedef struct R2ErrorHandler {
3513 R2ErrorCallback callback;
3517 void *user_data;
3518} R2ErrorHandler;
3519
3524typedef struct R2JointBodies {
3528 struct R2RigidBodyHandle body1;
3532 struct R2RigidBodyHandle body2;
3533} R2JointBodies;
3534
3539typedef struct R2InverseKinematicsOptions {
3543 R2Real damping;
3547 size_t max_iters;
3551 uint8_t constrained_axes;
3555 R2Real epsilon_linear;
3559 R2Real epsilon_angular;
3560} R2InverseKinematicsOptions;
3561
3566typedef R2Bool (RAPIER_CALL *R2IkJointCanMove)(void*, struct R2RigidBodyHandle);
3567
3572typedef struct R2CollisionEvent {
3576 struct R2ColliderHandle collider1;
3580 struct R2ColliderHandle collider2;
3584 R2Bool started;
3588 uint32_t flags;
3589} R2CollisionEvent;
3590
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;
3624 R2Bool started;
3625} R2ContactForceEvent;
3626
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);
3639
3644typedef struct R2ContactModification {
3648 struct R2Vector normal;
3652 R2Real friction;
3656 R2Real restitution;
3660 uint32_t user_data;
3664 R2Bool enabled;
3665} R2ContactModification;
3666
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);
3676
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);
3686
3695typedef struct R2PhysicsHooks {
3699 void *user_data;
3703 R2PairFilter filter_contact_pair;
3707 R2PairFilter filter_intersection_pair;
3711 R2ModifyContacts modify_solver_contacts;
3715 R2ModifyContactContext modify_solver_contacts_context;
3716} R2PhysicsHooks;
3717
3722typedef struct R2ByteView {
3726 const uint8_t *data;
3730 size_t count;
3731} R2ByteView;
3732
3737typedef struct R2DebugLine {
3741 struct R2Vector a;
3745 struct R2Vector b;
3749 float color[4];
3750} R2DebugLine;
3751
3756typedef struct R2ParticleDestination {
3760 struct R2SoftBodyHandle body;
3764 uint32_t index;
3765} R2ParticleDestination;
3766
3771typedef struct R2SoftClusterSplit {
3775 uint32_t source_cluster;
3779 struct R2SoftBodyHandle soft_body;
3783 uint32_t cluster;
3787 struct R2RigidBodyHandle proxy;
3791 R2Bool keeps_proxy;
3792} R2SoftClusterSplit;
3793
3798typedef struct R2SoftJointMove {
3802 struct R2ImpulseJointHandle joint;
3806 struct R2RigidBodyHandle from;
3810 struct R2RigidBodyHandle to;
3811} R2SoftJointMove;
3812
3817typedef struct R2OptionalParticleDestination {
3821 struct R2SoftBodyHandle body;
3825 uint32_t index;
3829 R2Bool found;
3830} R2OptionalParticleDestination;
3831
3836typedef struct R2BuildInfo {
3840 uint32_t abi_version;
3844 uint32_t dimension;
3848 uint32_t real_size;
3852 uint32_t pointer_size;
3853} R2BuildInfo;
3854
3859typedef struct R2BuildFeatures {
3863 R2Bool profiling;
3867 uint32_t simd_lanes;
3871 R2Bool parallel;
3876 R2Bool enhanced_determinism;
3877} R2BuildFeatures;
3878
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;
3907 R2Real max_impulse;
3911 struct R2Vector max_impulse_direction;
3912} R2ContactPair;
3913
3918typedef struct R2IntersectionPair {
3922 struct R2ColliderHandle collider1;
3926 struct R2ColliderHandle collider2;
3930 R2Bool intersecting;
3931} R2IntersectionPair;
3932
3937typedef struct R2ContactPoint {
3941 size_t manifold_index;
3945 struct R2Vector local_p1;
3949 struct R2Vector local_p2;
3953 struct R2Vector normal;
3957 R2Real distance;
3961 R2Real impulse;
3962#if defined(RAPIER_DIM2)
3966 R2Real tangent_impulse[1];
3967#endif
3968#if defined(RAPIER_DIM3)
3972 R2Real tangent_impulse[2];
3973#endif
3974} R2ContactPoint;
3975
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;
4014 R2Real scale;
4018 struct R2ColliderDesc colliderBlueprint;
4022 struct R2RigidBodyDesc rigidBodyBlueprint;
4023} R2UrdfLoaderOptions;
4024#endif
4025
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;
4068 R2Real scale;
4072 struct R2ColliderDesc colliderBlueprint;
4076 struct R2RigidBodyDesc rigidBodyBlueprint;
4077} R2MjcfLoaderOptions;
4078#endif
4079
4080#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
4085typedef struct R2MjcfVisualMesh R2MjcfVisualMesh;
4086#endif
4087
4088#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
4093typedef struct R2RenderMaterial {
4097 float metallic;
4101 float roughness;
4105 float reflectance;
4109 float emissive[3];
4110} R2RenderMaterial;
4111#endif
4112
4113#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
4118typedef struct R2MjcfVisualMeshInfo {
4122 struct R2Pose local_pose;
4126 float rgba[4];
4130 struct R2RenderMaterial material;
4134 R2Bool has_color;
4138 R2Bool has_material;
4142 R2Bool is_trimesh;
4143} R2MjcfVisualMeshInfo;
4144#endif
4145
4150typedef struct R2RigidBodyState {
4154 struct R2Pose position;
4158 struct R2Vector linvel;
4162 R2AngVector angvel;
4166 R2Bool sleeping;
4170 R2Bool enabled;
4174 struct R2UserData userData;
4175} R2RigidBodyState;
4176
4181typedef struct R2SoftMeshId {
4185 uint32_t cluster;
4189 uint32_t mesh;
4190} R2SoftMeshId;
4191
4196typedef struct R2SoftMeshInfo {
4200 struct R2SoftMeshId id;
4204 struct R2ColliderHandle collider;
4208 size_t arity;
4212 R2Bool is_skinned;
4216 R2Bool collision_enabled;
4217} R2SoftMeshInfo;
4218
4219#if defined(RAPIER_F32)
4224typedef int32_t R2VoxelCoord;
4225#endif
4226
4227#if defined(RAPIER_F64)
4232typedef int64_t R2VoxelCoord;
4233#endif
4234
4239typedef struct R2VoxelKey {
4243 R2VoxelCoord x;
4247 R2VoxelCoord y;
4248#if defined(RAPIER_DIM3)
4252 R2VoxelCoord z;
4253#endif
4254} R2VoxelKey;
4255
4260typedef struct R2VoxelQuery {
4264 struct R2VoxelKey key;
4268 struct R2Vector center;
4272 struct R2Vector size;
4276 R2Bool found;
4277} R2VoxelQuery;
4278
4283typedef struct R2JointImpulses {
4287 struct R2Vector linear;
4291 R2AngVector angular;
4295 R2Real limits[R2_JOINT_DOF_COUNT];
4299 R2Real motors[R2_JOINT_DOF_COUNT];
4300} R2JointImpulses;
4301
4306typedef struct R2OptionalShapeCastHit {
4310 struct R2ShapeCastHit hit;
4314 R2Bool found;
4315} R2OptionalShapeCastHit;
4316
4321typedef struct R2OptionalPointProjection {
4325 struct R2PointProjection projection;
4329 R2Bool found;
4330} R2OptionalPointProjection;
4331
4337typedef struct R2NonlinearRigidMotion {
4341 struct R2Pose start;
4345 struct R2Vector local_center;
4349 struct R2Vector linvel;
4353 R2AngVector angvel;
4354} R2NonlinearRigidMotion;
4355
4360typedef struct R2OptionalContactPair {
4364 struct R2ContactPair pair;
4368 R2Bool found;
4369} R2OptionalContactPair;
4370
4375typedef struct R2OptionalIntersectionPair {
4379 struct R2IntersectionPair pair;
4383 R2Bool found;
4384} R2OptionalIntersectionPair;
4385
4391typedef struct R2ContactManifold {
4395 struct R2Vector local_n1;
4399 struct R2Vector local_n2;
4403 struct R2Vector normal;
4407 uint32_t subshape1;
4411 uint32_t subshape2;
4415 size_t num_points;
4419 size_t num_solver_contacts;
4423 uint32_t user_data;
4424} R2ContactManifold;
4425
4430typedef struct R2SolverContact {
4434 struct R2Vector point1;
4438 struct R2Vector point2;
4442 R2Real distance;
4446 struct R2Vector tangent_velocity;
4447} R2SolverContact;
4448
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);
4460
4465typedef void (RAPIER_CALL *R2ContactForceEventCallback)(void *user_data,
4466 const struct R2ReadContext *read,
4467 const struct R2ContactForceEvent *event);
4468
4476typedef struct R2EventCallbacks {
4480 void *user_data;
4484 R2CollisionEventCallback collision_event;
4488 R2ContactForceEventCallback contact_force_event;
4489} R2EventCallbacks;
4490
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;
4607
4612#define R2_OK 0
4613
4618#define R2_NULL_POINTER 1
4619
4624#define R2_INVALID_ARGUMENT 2
4625
4630#define R2_INVALID_HANDLE 3
4631
4636#define R2_BUFFER_TOO_SMALL 4
4637
4642#define R2_UNSUPPORTED 5
4643
4648#define R2_PANIC 6
4649
4654#define R2_NOT_FOUND 7
4655
4660#define R2_WORLD_BUSY 8
4661
4662#ifdef __cplusplus
4663extern "C" {
4664#endif // __cplusplus
4665
4670RAPIER_API struct R2SoftBodyMaterial RAPIER_CALL r2DefaultSoftBodyMaterial(void);
4671
4676RAPIER_API struct R2SoftRecoverySettings RAPIER_CALL r2DefaultSoftRecoverySettings(void);
4677
4678#if defined(RAPIER_FEM)
4683RAPIER_API struct R2SoftFemParameters RAPIER_CALL r2DefaultSoftFemParameters(void);
4684#endif
4685
4690RAPIER_API struct R2SoftBodiesSettings RAPIER_CALL r2DefaultSoftBodiesSettings(void);
4691
4696RAPIER_API struct R2IntegrationParameters RAPIER_CALL r2DefaultIntegrationParameters(void);
4697
4702RAPIER_API struct R2IntegrationParameters RAPIER_CALL r2IntegrationParameters(const struct R2World *world);
4703
4708RAPIER_API
4709R2Status RAPIER_CALL r2SetIntegrationParameters(struct R2World *world,
4710 const struct R2IntegrationParameters *data);
4711
4716RAPIER_API struct R2JointDesc RAPIER_CALL r2DefaultJointDesc(void);
4717
4722RAPIER_API struct R2JointDesc RAPIER_CALL r2FixedJointDesc(void);
4723
4724#if defined(RAPIER_DIM2)
4729RAPIER_API struct R2JointDesc RAPIER_CALL r2RevoluteJointDesc(void);
4730#endif
4731
4732#if defined(RAPIER_DIM3)
4737RAPIER_API struct R2JointDesc RAPIER_CALL r2RevoluteJointDesc(struct R2Vector axis_vector);
4738#endif
4739
4744RAPIER_API struct R2JointDesc RAPIER_CALL r2PrismaticJointDesc(struct R2Vector axis_vector);
4745
4750RAPIER_API struct R2JointDesc RAPIER_CALL r2RopeJointDesc(R2Real length);
4751
4756RAPIER_API
4757struct R2JointDesc RAPIER_CALL r2SpringJointDesc(R2Real length,
4758 R2Real stiffness,
4759 R2Real damping);
4760
4761#if defined(RAPIER_DIM3)
4766RAPIER_API struct R2JointDesc RAPIER_CALL r2SphericalJointDesc(void);
4767#endif
4768
4769#if defined(RAPIER_DIM2)
4774RAPIER_API struct R2JointDesc RAPIER_CALL r2PinSlotJointDesc(struct R2Vector axis_vector);
4775#endif
4776
4782RAPIER_API
4783struct R2ImpulseJointHandle RAPIER_CALL r2InsertImpulseJoint(struct R2RigidBodyHandle body1,
4784 struct R2RigidBodyHandle body2,
4785 const struct R2JointDesc *joint);
4786
4792RAPIER_API
4793struct R2MultibodyJointHandle RAPIER_CALL r2InsertMultibodyJoint(struct R2RigidBodyHandle body1,
4794 struct R2RigidBodyHandle body2,
4795 const struct R2JointDesc *joint);
4796
4801RAPIER_API struct R2SoftBodyDesc RAPIER_CALL r2DefaultSoftBodyDesc(void);
4802
4807RAPIER_API
4808struct R2SoftBodyHandle RAPIER_CALL r2InsertSoftBody(struct R2World *world,
4809 const struct R2SoftBodyDesc *desc);
4810
4815RAPIER_API struct R2SoftMeshBindingDesc RAPIER_CALL r2DefaultSoftMeshBindingDesc(void);
4816
4822RAPIER_API
4823struct R2ColliderHandle RAPIER_CALL r2InsertDeformableCollider(const struct R2ColliderDesc *collider,
4824 const struct R2SoftMeshBindingDesc *binding,
4825 struct R2RigidBodyHandle parent);
4826
4831RAPIER_API struct R2QueryOptions RAPIER_CALL r2DefaultQueryOptions(void);
4832
4841RAPIER_API
4842struct R2RayHit RAPIER_CALL r2CastRay(const struct R2World *world,
4843 const struct R2QueryOptions *query_options,
4844 struct R2Vector origin,
4845 struct R2Vector direction,
4846 R2Real max_toi,
4847 R2Bool solid);
4848
4856RAPIER_API
4857struct R2PointProjection RAPIER_CALL r2ProjectPoint(const struct R2World *world,
4858 const struct R2QueryOptions *query_options,
4859 struct R2Vector point,
4860 R2Real max_distance,
4861 R2Bool solid);
4862
4870RAPIER_API
4871struct R2ShapeCastHit RAPIER_CALL r2CastShape(const struct R2World *world,
4872 const struct R2QueryOptions *query_options,
4873 struct R2Pose pose,
4874 struct R2Vector velocity,
4875 const R2SharedShape *shape,
4876 struct R2ShapeCastOptions options);
4877
4885RAPIER_API
4886size_t RAPIER_CALL r2IntersectPoint(const struct R2World *world,
4887 const struct R2QueryOptions *query_options,
4888 struct R2Vector point,
4889 struct R2ColliderHandle *buffer,
4890 size_t capacity);
4891
4900RAPIER_API
4901size_t RAPIER_CALL r2IntersectShape(const struct R2World *world,
4902 const struct R2QueryOptions *query_options,
4903 struct R2Pose pose,
4904 const R2SharedShape *shape,
4905 struct R2ColliderHandle *buffer,
4906 size_t capacity);
4907
4916RAPIER_API
4917size_t RAPIER_CALL r2IntersectAabbConservative(const struct R2World *world,
4918 const struct R2QueryOptions *query_options,
4919 struct R2Aabb aabb,
4920 struct R2ColliderHandle *buffer,
4921 size_t capacity);
4922
4930RAPIER_API
4931struct R2RayToi RAPIER_CALL r2CastRayToi(const struct R2World *world,
4932 const struct R2QueryOptions *query_options,
4933 struct R2Vector origin,
4934 struct R2Vector direction,
4935 R2Real max_toi,
4936 R2Bool solid);
4937
4945RAPIER_API
4946struct R2OptionalRayHit RAPIER_CALL r2TryCastRay(const struct R2World *world,
4947 const struct R2QueryOptions *query_options,
4948 struct R2Vector origin,
4949 struct R2Vector direction,
4950 R2Real max_toi,
4951 R2Bool solid);
4952
4957RAPIER_API struct R2RigidBodyDesc RAPIER_CALL r2DynamicRigidBodyDesc(void);
4958
4963RAPIER_API struct R2RigidBodyDesc RAPIER_CALL r2FixedRigidBodyDesc(void);
4964
4969RAPIER_API struct R2RigidBodyDesc RAPIER_CALL r2KinematicPositionBasedRigidBodyDesc(void);
4970
4975RAPIER_API struct R2RigidBodyDesc RAPIER_CALL r2KinematicVelocityBasedRigidBodyDesc(void);
4976
4981RAPIER_API struct R2ShapeDesc RAPIER_CALL r2DefaultShapeDesc(void);
4982
4988RAPIER_API R2SharedShape *RAPIER_CALL r2ShapeDesc_Build(const struct R2ShapeDesc *desc);
4989
4994RAPIER_API struct R2ColliderDesc RAPIER_CALL r2DefaultColliderDesc(void);
4995
5001RAPIER_API struct R2ColliderDesc RAPIER_CALL r2BallColliderDesc(R2Real radius);
5002
5008RAPIER_API struct R2ColliderDesc RAPIER_CALL r2CuboidColliderDesc(struct R2Vector half_extents);
5009
5014RAPIER_API
5015struct R2RigidBodyHandle RAPIER_CALL r2InsertRigidBody(struct R2World *world,
5016 const struct R2RigidBodyDesc *desc);
5017
5024RAPIER_API
5025struct R2ColliderHandle RAPIER_CALL r2InsertCollider(struct R2RigidBodyHandle parent,
5026 const struct R2ColliderDesc *desc);
5027
5033RAPIER_API
5034struct R2ColliderHandle RAPIER_CALL r2InsertColliderWithoutParent(struct R2World *world,
5035 const struct R2ColliderDesc *desc);
5036
5041RAPIER_API struct R2PodLayout RAPIER_CALL r2PodLayout(void);
5042
5048RAPIER_API struct R2KinematicCharacterController *RAPIER_CALL r2NewKinematicCharacterController(void);
5049
5055RAPIER_API
5056R2Status RAPIER_CALL r2FreeKinematicCharacterController(struct R2KinematicCharacterController *controller);
5057
5062RAPIER_API
5063R2Status RAPIER_CALL r2KinematicCharacterController_SetUp(struct R2KinematicCharacterController *controller,
5064 struct R2Vector up);
5065
5070RAPIER_API
5071R2Status RAPIER_CALL r2KinematicCharacterController_SetOffset(struct R2KinematicCharacterController *controller,
5072 struct R2CharacterLength offset);
5073
5078RAPIER_API
5079R2Status RAPIER_CALL r2KinematicCharacterController_SetSlide(struct R2KinematicCharacterController *controller,
5080 R2Bool enabled);
5081
5086RAPIER_API
5087R2Status RAPIER_CALL r2KinematicCharacterController_SetSlopes(struct R2KinematicCharacterController *controller,
5088 R2Real max_climb_angle,
5089 R2Real min_slide_angle);
5090
5095RAPIER_API
5096R2Status RAPIER_CALL r2KinematicCharacterController_SetAutostep(struct R2KinematicCharacterController *controller,
5097 R2Bool enabled,
5098 struct R2CharacterLength max_height,
5099 struct R2CharacterLength min_width,
5100 R2Bool include_dynamic_bodies);
5101
5106RAPIER_API
5107R2Status RAPIER_CALL r2KinematicCharacterController_SetSnapToGround(struct R2KinematicCharacterController *controller,
5108 R2Bool enabled,
5109 struct R2CharacterLength distance);
5110
5115RAPIER_API
5116struct R2Vector RAPIER_CALL r2KinematicCharacterController_Up(const struct R2KinematicCharacterController *controller);
5117
5122RAPIER_API
5123struct R2CharacterLength RAPIER_CALL r2KinematicCharacterController_Offset(const struct R2KinematicCharacterController *controller);
5124
5130RAPIER_API
5131struct R2CharacterAutostep RAPIER_CALL r2KinematicCharacterController_Autostep(const struct R2KinematicCharacterController *controller);
5132
5138RAPIER_API
5139R2Status RAPIER_CALL r2KinematicCharacterController_SetNormalNudgeFactor(struct R2KinematicCharacterController *controller,
5140 R2Real value);
5141
5146RAPIER_API
5147R2Real RAPIER_CALL r2KinematicCharacterController_NormalNudgeFactor(const struct R2KinematicCharacterController *controller);
5148
5156RAPIER_API
5157struct R2CharacterMovement RAPIER_CALL r2KinematicCharacterController_MoveShape(const struct R2World *world,
5158 const struct R2QueryOptions *options,
5159 struct R2KinematicCharacterController *controller,
5160 R2Real dt,
5161 const R2SharedShape *shape,
5162 struct R2Pose pose,
5163 struct R2Vector desired_translation);
5164
5170RAPIER_API
5171size_t RAPIER_CALL r2KinematicCharacterController_Collisions(const struct R2KinematicCharacterController *controller,
5172 struct R2CharacterCollision *buffer,
5173 size_t capacity);
5174
5182RAPIER_API
5183R2Status RAPIER_CALL r2KinematicCharacterController_SolveCharacterCollisionImpulses(const struct R2KinematicCharacterController *controller,
5184 const R2SharedShape *shape,
5185 R2Real dt,
5186 R2Real mass,
5187 const struct R2QueryOptions *options);
5188
5194RAPIER_API struct R2PidController *RAPIER_CALL r2NewPidController(void);
5195
5201RAPIER_API R2Status RAPIER_CALL r2FreePidController(struct R2PidController *controller);
5202
5207RAPIER_API struct R2PidGains RAPIER_CALL r2PidController_Gains(const struct R2PidController *controller);
5208
5213RAPIER_API
5214R2Status RAPIER_CALL r2PidController_SetGains(struct R2PidController *controller,
5215 struct R2PidGains gains);
5216
5222RAPIER_API
5223R2Status RAPIER_CALL r2PidController_SetAxes(struct R2PidController *controller,
5224 uint32_t axes);
5225
5230RAPIER_API uint32_t RAPIER_CALL r2PidController_Axes(const struct R2PidController *controller);
5231
5236RAPIER_API R2Status RAPIER_CALL r2PidController_ResetIntegrals(struct R2PidController *controller);
5237
5243RAPIER_API struct R2PdController RAPIER_CALL r2DefaultPdController(void);
5244
5250RAPIER_API
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);
5256
5261RAPIER_API
5262struct R2VelocityCorrection RAPIER_CALL r2PidController_RigidBodyCorrection(struct R2PidController *controller,
5263 R2Real dt,
5264 struct R2RigidBodyHandle body,
5265 struct R2Pose target_pose,
5266 struct R2Vector target_linvel,
5267 R2AngVector target_angvel);
5268
5273RAPIER_API
5274struct R2CharacterControllerSettings RAPIER_CALL r2KinematicCharacterController_Settings(const struct R2KinematicCharacterController *controller);
5275
5276#if defined(RAPIER_DIM3)
5281RAPIER_API struct R2WheelTuning RAPIER_CALL r2DefaultWheelTuning(void);
5282#endif
5283
5284#if defined(RAPIER_DIM3)
5290RAPIER_API
5291struct R2DynamicRayCastVehicleController *RAPIER_CALL r2NewDynamicRayCastVehicleController(struct R2RigidBodyHandle chassis);
5292#endif
5293
5294#if defined(RAPIER_DIM3)
5300RAPIER_API
5301R2Status RAPIER_CALL r2FreeDynamicRayCastVehicleController(struct R2DynamicRayCastVehicleController *controller);
5302#endif
5303
5304#if defined(RAPIER_DIM3)
5310RAPIER_API
5311size_t RAPIER_CALL r2DynamicRayCastVehicleController_AddWheel(struct R2DynamicRayCastVehicleController *controller,
5312 struct R2Vector connection,
5313 struct R2Vector direction,
5314 struct R2Vector axle,
5315 R2Real rest_length,
5316 R2Real radius,
5317 const struct R2WheelTuning *tuning);
5318#endif
5319
5320#if defined(RAPIER_DIM3)
5325RAPIER_API
5326R2Status RAPIER_CALL r2DynamicRayCastVehicleController_SetAxes(struct R2DynamicRayCastVehicleController *controller,
5327 size_t up,
5328 size_t forward);
5329#endif
5330
5331#if defined(RAPIER_DIM3)
5336RAPIER_API
5337R2Status RAPIER_CALL r2DynamicRayCastVehicleController_SetWheelControls(struct R2DynamicRayCastVehicleController *controller,
5338 size_t index,
5339 R2Real steering,
5340 R2Real engine_force,
5341 R2Real brake);
5342#endif
5343
5344#if defined(RAPIER_DIM3)
5353RAPIER_API
5354R2Status RAPIER_CALL r2DynamicRayCastVehicleController_UpdateVehicle(struct R2DynamicRayCastVehicleController *controller,
5355 R2Real dt,
5356 const struct R2QueryOptions *options);
5357#endif
5358
5359#if defined(RAPIER_DIM3)
5364RAPIER_API
5365R2Real RAPIER_CALL r2DynamicRayCastVehicleController_CurrentVehicleSpeed(const struct R2DynamicRayCastVehicleController *controller);
5366#endif
5367
5368#if defined(RAPIER_DIM3)
5374RAPIER_API
5375size_t RAPIER_CALL r2DynamicRayCastVehicleController_Wheels(const struct R2DynamicRayCastVehicleController *controller,
5376 struct R2WheelState *buffer,
5377 size_t capacity);
5378#endif
5379
5385RAPIER_API
5386R2Status RAPIER_CALL r2RigidBodyPropagateModifiedBodyPositionsToColliders(struct R2World *world);
5387
5393RAPIER_API
5394size_t RAPIER_CALL r2ActiveRigidBodies(const struct R2World *world,
5395 struct R2RigidBodyHandle *buffer,
5396 size_t capacity);
5397
5402RAPIER_API R2Status RAPIER_CALL r2RigidBody_WakeUp(struct R2RigidBodyHandle handle, R2Bool strong);
5403
5411RAPIER_API struct R2ErrorHandler RAPIER_CALL r2SetErrorHandler(struct R2ErrorHandler handler);
5412
5420RAPIER_API R2Status RAPIER_CALL r2LastStatus(void);
5421
5426RAPIER_API const char *RAPIER_CALL r2LastError(void);
5427
5432RAPIER_API R2SharedShape *RAPIER_CALL r2BallSharedShape(R2Real radius);
5433
5438RAPIER_API R2SharedShape *RAPIER_CALL r2CuboidSharedShape(struct R2Vector half_extents);
5439
5444RAPIER_API
5445R2SharedShape *RAPIER_CALL r2RoundCuboidSharedShape(struct R2Vector half_extents,
5446 R2Real border_radius);
5447
5452RAPIER_API
5453R2SharedShape *RAPIER_CALL r2CapsuleSharedShape(struct R2Vector a,
5454 struct R2Vector b,
5455 R2Real radius);
5456
5461RAPIER_API R2SharedShape *RAPIER_CALL r2SegmentSharedShape(struct R2Vector a, struct R2Vector b);
5462
5467RAPIER_API
5468R2SharedShape *RAPIER_CALL r2TriangleSharedShape(struct R2Vector a,
5469 struct R2Vector b,
5470 struct R2Vector c);
5471
5476RAPIER_API R2SharedShape *RAPIER_CALL r2HalfspaceSharedShape(struct R2Vector normal);
5477
5478#if defined(RAPIER_DIM3)
5483RAPIER_API R2SharedShape *RAPIER_CALL r2CylinderSharedShape(R2Real half_height, R2Real radius);
5484#endif
5485
5486#if defined(RAPIER_DIM3)
5491RAPIER_API R2SharedShape *RAPIER_CALL r2ConeSharedShape(R2Real half_height, R2Real radius);
5492#endif
5493
5499RAPIER_API R2SharedShape *RAPIER_CALL r2CompoundSharedShape(struct R2CompoundShapeView children);
5500
5505RAPIER_API R2Status RAPIER_CALL r2RemoveCollider(struct R2ColliderHandle handle, R2Bool wake_up);
5506
5511RAPIER_API R2Status RAPIER_CALL r2RemoveImpulseJoint(struct R2ImpulseJointHandle handle, R2Bool wake_up);
5512
5518RAPIER_API
5519size_t RAPIER_CALL r2ImpulseJointHandles(const struct R2World *world,
5520 struct R2ImpulseJointHandle *buffer,
5521 size_t capacity);
5522
5527RAPIER_API
5528R2Status RAPIER_CALL r2RemoveMultibodyJoint(struct R2MultibodyJointHandle handle,
5529 R2Bool wake_up);
5530
5536RAPIER_API
5537size_t RAPIER_CALL r2MultibodyJointHandles(const struct R2World *world,
5538 struct R2MultibodyJointHandle *buffer,
5539 size_t capacity);
5540
5545RAPIER_API struct R2JointBodies RAPIER_CALL r2ImpulseJoint_Bodies(struct R2ImpulseJointHandle handle);
5546
5551RAPIER_API struct R2InverseKinematicsOptions RAPIER_CALL r2DefaultInverseKinematicsOptions(void);
5552
5559RAPIER_API size_t RAPIER_CALL r2MultibodyJoint_Ndofs(struct R2MultibodyJointHandle handle);
5560
5565RAPIER_API
5566R2Status RAPIER_CALL r2MultibodyJoint_InverseKinematics(struct R2MultibodyJointHandle handle,
5567 const struct R2InverseKinematicsOptions *options,
5568 struct R2Pose target,
5569 R2IkJointCanMove can_move,
5570 void *user_data,
5571 R2Real *displacements,
5572 size_t count);
5573
5578RAPIER_API
5579R2Status RAPIER_CALL r2MultibodyJoint_ApplyDisplacements(struct R2MultibodyJointHandle handle,
5580 const R2Real *displacements,
5581 size_t count);
5582
5587RAPIER_API R2Status RAPIER_CALL r2FreeSharedShape(R2SharedShape *object);
5588
5594RAPIER_API R2SharedShape *RAPIER_CALL r2SharedShape_Clone(const R2SharedShape *object);
5595
5600RAPIER_API size_t RAPIER_CALL r2RigidBodyCount(const struct R2World *world);
5601
5607RAPIER_API
5608size_t RAPIER_CALL r2RigidBodyHandles(const struct R2World *world,
5609 struct R2RigidBodyHandle *buffer,
5610 size_t capacity);
5611
5617RAPIER_API R2Bool RAPIER_CALL r2RigidBody_Contains(struct R2RigidBodyHandle handle);
5618
5623RAPIER_API size_t RAPIER_CALL r2ColliderCount(const struct R2World *world);
5624
5630RAPIER_API
5631size_t RAPIER_CALL r2ColliderHandles(const struct R2World *world,
5632 struct R2ColliderHandle *buffer,
5633 size_t capacity);
5634
5639RAPIER_API R2Bool RAPIER_CALL r2Collider_Contains(struct R2ColliderHandle handle);
5640
5645RAPIER_API size_t RAPIER_CALL r2SoftBodyCount(const struct R2World *world);
5646
5652RAPIER_API
5653size_t RAPIER_CALL r2SoftBodyHandles(const struct R2World *world,
5654 struct R2SoftBodyHandle *buffer,
5655 size_t capacity);
5656
5662RAPIER_API R2Bool RAPIER_CALL r2SoftBody_Contains(struct R2SoftBodyHandle handle);
5663
5671RAPIER_API
5672R2Status RAPIER_CALL r2RemoveRigidBody(struct R2RigidBodyHandle handle,
5673 R2Bool remove_attached_colliders);
5674
5679RAPIER_API R2Real RAPIER_CALL r2TimeStep(const struct R2World *world);
5680
5685RAPIER_API R2Status RAPIER_CALL r2SetTimeStep(struct R2World *world, R2Real value);
5686
5691RAPIER_API R2Real RAPIER_CALL r2MinCcdDt(const struct R2World *world);
5692
5697RAPIER_API R2Status RAPIER_CALL r2SetMinCcdDt(struct R2World *world, R2Real value);
5698
5703RAPIER_API R2Real RAPIER_CALL r2LengthUnit(const struct R2World *world);
5704
5709RAPIER_API R2Status RAPIER_CALL r2SetLengthUnit(struct R2World *world, R2Real value);
5710
5715RAPIER_API R2Real RAPIER_CALL r2WarmstartCoefficient(const struct R2World *world);
5716
5721RAPIER_API R2Status RAPIER_CALL r2SetWarmstartCoefficient(struct R2World *world, R2Real value);
5722
5727RAPIER_API R2Real RAPIER_CALL r2NormalizedAllowedLinearError(const struct R2World *world);
5728
5733RAPIER_API R2Status RAPIER_CALL r2SetNormalizedAllowedLinearError(struct R2World *world, R2Real value);
5734
5740RAPIER_API R2Real RAPIER_CALL r2NormalizedMaxCorrectiveVelocity(const struct R2World *world);
5741
5746RAPIER_API
5747R2Status RAPIER_CALL r2SetNormalizedMaxCorrectiveVelocity(struct R2World *world,
5748 R2Real value);
5749
5754RAPIER_API R2Real RAPIER_CALL r2NormalizedPredictionDistance(const struct R2World *world);
5755
5760RAPIER_API R2Status RAPIER_CALL r2SetNormalizedPredictionDistance(struct R2World *world, R2Real value);
5761
5766RAPIER_API R2Real RAPIER_CALL r2NormalizedMaxLinearVelocity(const struct R2World *world);
5767
5772RAPIER_API R2Status RAPIER_CALL r2SetNormalizedMaxLinearVelocity(struct R2World *world, R2Real value);
5773
5779RAPIER_API R2Real RAPIER_CALL r2NormalizedContactRecycleDistance(const struct R2World *world);
5780
5785RAPIER_API
5786R2Status RAPIER_CALL r2SetNormalizedContactRecycleDistance(struct R2World *world,
5787 R2Real value);
5788
5793RAPIER_API size_t RAPIER_CALL r2NumSolverIterations(const struct R2World *world);
5794
5799RAPIER_API R2Status RAPIER_CALL r2SetNumSolverIterations(struct R2World *world, size_t value);
5800
5805RAPIER_API size_t RAPIER_CALL r2NumInternalPgsIterations(const struct R2World *world);
5806
5811RAPIER_API R2Status RAPIER_CALL r2SetNumInternalPgsIterations(struct R2World *world, size_t value);
5812
5818RAPIER_API size_t RAPIER_CALL r2NumInternalStabilizationIterations(const struct R2World *world);
5819
5825RAPIER_API
5826R2Status RAPIER_CALL r2SetNumInternalStabilizationIterations(struct R2World *world,
5827 size_t value);
5828
5833RAPIER_API size_t RAPIER_CALL r2MaxCcdSubsteps(const struct R2World *world);
5834
5839RAPIER_API R2Status RAPIER_CALL r2SetMaxCcdSubsteps(struct R2World *world, size_t value);
5840
5845RAPIER_API R2Bool RAPIER_CALL r2ContactClustering(const struct R2World *world);
5846
5851RAPIER_API R2Status RAPIER_CALL r2SetContactClustering(struct R2World *world, R2Bool value);
5852
5857RAPIER_API R2Bool RAPIER_CALL r2ContactRecycling(const struct R2World *world);
5858
5863RAPIER_API R2Status RAPIER_CALL r2SetContactRecycling(struct R2World *world, R2Bool value);
5864
5869RAPIER_API R2Bool RAPIER_CALL r2FrictionInBiasPass(const struct R2World *world);
5870
5875RAPIER_API R2Status RAPIER_CALL r2SetFrictionInBiasPass(struct R2World *world, R2Bool value);
5876
5881RAPIER_API R2Bool RAPIER_CALL r2WarmstartJoints(const struct R2World *world);
5882
5887RAPIER_API R2Status RAPIER_CALL r2SetWarmstartJoints(struct R2World *world, R2Bool value);
5888
5893RAPIER_API struct R2SpringCoefficients RAPIER_CALL r2ContactSoftness(const struct R2World *world);
5894
5899RAPIER_API
5900R2Status RAPIER_CALL r2SetContactSoftness(struct R2World *world,
5901 struct R2SpringCoefficients value);
5902
5907RAPIER_API struct R2SpringCoefficients RAPIER_CALL r2StaticContactSoftness(const struct R2World *world);
5908
5913RAPIER_API
5914R2Status RAPIER_CALL r2SetStaticContactSoftness(struct R2World *world,
5915 struct R2SpringCoefficients value);
5916
5921RAPIER_API
5922R2Status RAPIER_CALL r2ContactModificationContext_UpdateAsOnewayPlatform(struct R2ContactModificationContext *context,
5923 struct R2Vector allowed_local_n1,
5924 R2Real allowed_angle);
5925
5930RAPIER_API
5931R2Status RAPIER_CALL r2ContactModificationContext_SetTangentVelocity(struct R2ContactModificationContext *context,
5932 struct R2Vector velocity);
5933
5938RAPIER_API struct R2EventCollector *RAPIER_CALL r2NewEventCollector(void);
5939
5945RAPIER_API R2Status RAPIER_CALL r2FreeEventCollector(struct R2EventCollector *events);
5946
5951RAPIER_API R2Status RAPIER_CALL r2EventCollector_Clear(struct R2EventCollector *events);
5952
5958RAPIER_API
5959size_t RAPIER_CALL r2EventCollector_CollisionEvents(const struct R2EventCollector *events,
5960 struct R2CollisionEvent *buffer,
5961 size_t capacity);
5962
5968RAPIER_API
5969size_t RAPIER_CALL r2EventCollector_ContactForceEvents(const struct R2EventCollector *events,
5970 struct R2ContactForceEvent *buffer,
5971 size_t capacity);
5972
5977RAPIER_API size_t RAPIER_CALL r2EventCollector_TearEventCount(const struct R2EventCollector *events);
5978
5984RAPIER_API
5985struct R2SoftBodyTearEvent *RAPIER_CALL r2EventCollector_TearEvent(const struct R2EventCollector *events,
5986 size_t index);
5987
5992RAPIER_API struct R2Vector RAPIER_CALL r2Gravity(const struct R2World *world);
5993
5998RAPIER_API R2Status RAPIER_CALL r2SetGravity(struct R2World *world, struct R2Vector value);
5999
6006RAPIER_API
6007R2Status RAPIER_CALL r2Step(struct R2World *world,
6008 const struct R2PhysicsHooks *hooks,
6009 const struct R2EventCollector *events);
6010
6016RAPIER_API
6017R2Status RAPIER_CALL r2DetectCollisions(struct R2World *world,
6018 const struct R2PhysicsHooks *hooks,
6019 const struct R2EventCollector *events);
6020
6026RAPIER_API struct R2ByteView RAPIER_CALL r2Bytes_Data(const struct R2Bytes *bytes);
6027
6033RAPIER_API R2Status RAPIER_CALL r2FreeBytes(struct R2Bytes *bytes);
6034
6040RAPIER_API struct R2Bytes *RAPIER_CALL r2SerializeWorld(const struct R2World *world);
6041
6047RAPIER_API struct R2World *RAPIER_CALL r2DeserializeWorld(const uint8_t *data, size_t count);
6048
6055RAPIER_API
6056size_t RAPIER_CALL r2DebugRender(const struct R2World *world,
6057 uint32_t mode,
6058 struct R2DebugLine *buffer,
6059 size_t capacity);
6060
6065RAPIER_API R2Status RAPIER_CALL r2SoftBodiesSetResweepStrain(struct R2World *world, R2Real value);
6066
6071RAPIER_API R2Real RAPIER_CALL r2SoftBodiesResweepStrain(const struct R2World *world);
6072
6077RAPIER_API R2Status RAPIER_CALL r2SoftBodiesSetContactStiffening(struct R2World *world, R2Real value);
6078
6083RAPIER_API R2Real RAPIER_CALL r2SoftBodiesContactStiffening(const struct R2World *world);
6084
6089RAPIER_API R2Status RAPIER_CALL r2SoftBodiesSetMaxExtraSubsteps(struct R2World *world, size_t value);
6090
6095RAPIER_API size_t RAPIER_CALL r2SoftBodiesMaxExtraSubsteps(const struct R2World *world);
6096
6101RAPIER_API
6102R2Status RAPIER_CALL r2RecoverySetAuthoredVelocityMargin(struct R2World *world,
6103 R2Bool value);
6104
6109RAPIER_API R2Status RAPIER_CALL r2RecoverySetEdgeSpeculation(struct R2World *world, R2Bool value);
6110
6115RAPIER_API
6116R2Status RAPIER_CALL r2RecoverySetInvertedCellDetection(struct R2World *world,
6117 R2Bool value);
6118
6123RAPIER_API
6124R2Status RAPIER_CALL r2RecoverySetSelfCrossingDetection(struct R2World *world,
6125 R2Bool value);
6126
6131RAPIER_API
6132R2Status RAPIER_CALL r2RecoverySetDetectionMotionGating(struct R2World *world,
6133 R2Bool value);
6134
6139RAPIER_API R2Status RAPIER_CALL r2RecoverySetCrossBodyDetection(struct R2World *world, R2Bool value);
6140
6145RAPIER_API R2Status RAPIER_CALL r2RecoverySetSelfStandDown(struct R2World *world, R2Bool value);
6146
6151RAPIER_API R2Status RAPIER_CALL r2RecoverySetCrossBodyExpelGate(struct R2World *world, R2Bool value);
6152
6157RAPIER_API R2Status RAPIER_CALL r2RecoverySetEdgeStandDown(struct R2World *world, R2Bool value);
6158
6163RAPIER_API R2Status RAPIER_CALL r2RecoverySetCrossingRepulsion(struct R2World *world, R2Bool value);
6164
6169RAPIER_API
6170R2Status RAPIER_CALL r2RecoverySetCrossingRepulsionGuide(struct R2World *world,
6171 R2Bool value);
6172
6177RAPIER_API
6178R2Status RAPIER_CALL r2RecoverySetCrossingRepulsionSelfGuide(struct R2World *world,
6179 R2Bool value);
6180
6185RAPIER_API R2Status RAPIER_CALL r2RecoverySetRecoveryPace(struct R2World *world, R2Real value);
6186
6191RAPIER_API R2Status RAPIER_CALL r2RecoverySetOverlapConstraints(struct R2World *world, R2Bool value);
6192
6197RAPIER_API R2Status RAPIER_CALL r2RecoverySetOverlapRigid(struct R2World *world, R2Bool value);
6198
6203RAPIER_API
6204R2Status RAPIER_CALL r2RecoverySetOverlapSkipSelfTangled(struct R2World *world,
6205 R2Bool value);
6206
6211RAPIER_API
6212R2Status RAPIER_CALL r2RecoverySetOverlapEdgeStandDown(struct R2World *world,
6213 R2Bool value);
6214
6219RAPIER_API
6220R2Status RAPIER_CALL r2RecoverySetOverlapConstraintPace(struct R2World *world,
6221 R2Real value);
6222
6227RAPIER_API R2Status RAPIER_CALL r2RecoverySetOverlapSkinVolume(struct R2World *world, R2Bool value);
6228
6233RAPIER_API R2Status RAPIER_CALL r2RecoverySetOverlapKeptDepth(struct R2World *world, R2Real value);
6234
6239RAPIER_API R2Status RAPIER_CALL r2RecoverySetOverlapSelfRegions(struct R2World *world, R2Bool value);
6240
6245RAPIER_API R2Status RAPIER_CALL r2RecoverySetOverlapNormalPush(struct R2World *world, R2Bool value);
6246
6251RAPIER_API R2Status RAPIER_CALL r2RecoverySetOverlapMultiVolume(struct R2World *world, R2Bool value);
6252
6257RAPIER_API
6258R2Status RAPIER_CALL r2RecoverySetOverlapProgressMargin(struct R2World *world,
6259 R2Real value);
6260
6261#if defined(RAPIER_FEM)
6266RAPIER_API R2Status RAPIER_CALL r2FemSetLinearTolerance(struct R2World *world, R2Real value);
6267#endif
6268
6269#if defined(RAPIER_FEM)
6274RAPIER_API R2Status RAPIER_CALL r2FemSetMaxLinearIterations(struct R2World *world, size_t value);
6275#endif
6276
6277#if defined(RAPIER_FEM)
6282RAPIER_API R2Status RAPIER_CALL r2FemSetMaxDenseDofs(struct R2World *world, size_t value);
6283#endif
6284
6292RAPIER_API R2Status RAPIER_CALL r2SetNumThreads(struct R2World *world, size_t num_threads);
6293
6300RAPIER_API R2Status RAPIER_CALL r2ClearThreadPool(struct R2World *world);
6301
6307RAPIER_API size_t RAPIER_CALL r2NumThreads(const struct R2World *world);
6308
6314RAPIER_API R2Status RAPIER_CALL r2SetCountersEnabled(struct R2World *world, R2Bool enabled);
6315
6322RAPIER_API double RAPIER_CALL r2StepTimeMs(const struct R2World *world);
6323
6332RAPIER_API struct R2World *RAPIER_CALL r2DeserializeRigidState(const uint8_t *data, size_t count);
6333
6338RAPIER_API struct R2QueryFilter RAPIER_CALL r2DefaultQueryFilter(void);
6339
6344RAPIER_API struct R2ShapeCastOptions RAPIER_CALL r2DefaultShapeCastOptions(void);
6345
6350RAPIER_API R2Status RAPIER_CALL r2RemoveSoftBody(struct R2SoftBodyHandle handle);
6351
6356RAPIER_API R2Status RAPIER_CALL r2SoftBody_WakeUp(struct R2SoftBodyHandle handle);
6357
6363RAPIER_API R2Status RAPIER_CALL r2FreeSoftBodyTearEvent(struct R2SoftBodyTearEvent *event);
6364
6369RAPIER_API
6370struct R2SoftBodyHandle RAPIER_CALL r2SoftBodyTearEvent_SoftBody(const struct R2SoftBodyTearEvent *event);
6371
6379RAPIER_API
6380size_t RAPIER_CALL r2SoftBodyTearEvent_Bodies(const struct R2SoftBodyTearEvent *event,
6381 struct R2SoftBodyHandle *buffer,
6382 size_t capacity);
6383
6388RAPIER_API
6389struct R2ParticleDestination RAPIER_CALL r2SoftBodyTearEvent_ParticleDestination(const struct R2SoftBodyTearEvent *event,
6390 uint32_t particle);
6391
6397RAPIER_API
6398size_t RAPIER_CALL r2SoftBodyTearEvent_TornEdges(const struct R2SoftBodyTearEvent *event,
6399 uint32_t *buffer,
6400 size_t capacity);
6401
6407RAPIER_API
6408size_t RAPIER_CALL r2SoftBodyTearEvent_TornCells(const struct R2SoftBodyTearEvent *event,
6409 uint32_t *buffer,
6410 size_t capacity);
6411
6417RAPIER_API
6418size_t RAPIER_CALL r2SoftBodyTearEvent_RemovedEdges(const struct R2SoftBodyTearEvent *event,
6419 uint32_t *buffer,
6420 size_t capacity);
6421
6427RAPIER_API
6428size_t RAPIER_CALL r2SoftBodyTearEvent_SplitParticles(const struct R2SoftBodyTearEvent *event,
6429 uint32_t *buffer,
6430 size_t capacity);
6431
6437RAPIER_API
6438size_t RAPIER_CALL r2SoftBodyTearEvent_InsertedParticles(const struct R2SoftBodyTearEvent *event,
6439 uint32_t *buffer,
6440 size_t capacity);
6441
6449RAPIER_API
6450size_t RAPIER_CALL r2SoftBodyTearEvent_PieceParticles(const struct R2SoftBodyTearEvent *event,
6451 size_t piece_index,
6452 uint32_t *buffer,
6453 size_t capacity);
6454
6460RAPIER_API
6461size_t RAPIER_CALL r2SoftBodyTearEvent_Clusters(const struct R2SoftBodyTearEvent *event,
6462 struct R2SoftClusterSplit *buffer,
6463 size_t capacity);
6464
6470RAPIER_API
6471size_t RAPIER_CALL r2SoftBodyTearEvent_MovedJoints(const struct R2SoftBodyTearEvent *event,
6472 struct R2SoftJointMove *buffer,
6473 size_t capacity);
6474
6480RAPIER_API
6481struct R2SoftBodyTearEvent *RAPIER_CALL r2SoftBody_Tear(struct R2SoftBodyHandle handle,
6482 const uint32_t *edges,
6483 size_t edge_count,
6484 const uint32_t *cells,
6485 size_t cell_count);
6486
6491RAPIER_API
6492uint32_t RAPIER_CALL r2SoftBody_AddCluster(struct R2SoftBodyHandle handle,
6493 const uint32_t *particles,
6494 size_t count);
6495
6500RAPIER_API
6501R2Status RAPIER_CALL r2SoftBody_RemoveCluster(struct R2SoftBodyHandle handle,
6502 uint32_t cluster);
6503
6509RAPIER_API
6510struct R2OptionalParticleDestination RAPIER_CALL r2SoftBodyTearEvent_TryParticleDestination(const struct R2SoftBodyTearEvent *event,
6511 uint32_t particle);
6512
6518RAPIER_API
6519struct R2SoftBodyTearEvent *RAPIER_CALL r2CutSoftBody(struct R2SoftBodyHandle handle,
6520 const struct R2Vector *blade);
6521
6527RAPIER_API struct R2VolumeMeshParameters RAPIER_CALL r2NewVolumeMeshParameters(R2Real cell_size);
6528
6533RAPIER_API struct R2BuildInfo RAPIER_CALL r2BuildInfo(void);
6534
6542RAPIER_API const char *RAPIER_CALL r2Version(void);
6543
6551RAPIER_API const char *RAPIER_CALL r2BuildProfile(void);
6552
6557RAPIER_API struct R2BuildFeatures RAPIER_CALL r2BuildFeatures(void);
6558
6564RAPIER_API
6565R2SharedShape *RAPIER_CALL r2HeightfieldSharedShape(struct R2RealView heights,
6566 size_t rows,
6567 size_t columns,
6568 struct R2Vector scale);
6569
6574RAPIER_API
6575struct R2Aabb RAPIER_CALL r2SharedShape_ComputeAabb(const R2SharedShape *shape,
6576 struct R2Pose pose);
6577
6582RAPIER_API
6583struct R2MassProperties RAPIER_CALL r2SharedShape_MassProperties(const R2SharedShape *shape,
6584 R2Real density);
6585
6590RAPIER_API
6591R2Bool RAPIER_CALL r2SharedShape_ContainsPoint(const R2SharedShape *shape,
6592 struct R2Pose pose,
6593 struct R2Vector point);
6594
6600RAPIER_API
6601size_t RAPIER_CALL r2ContactPairs(const struct R2World *world,
6602 struct R2ContactPair *buffer,
6603 size_t capacity);
6604
6610RAPIER_API
6611struct R2ContactPair RAPIER_CALL r2ContactPair(struct R2ColliderHandle collider1,
6612 struct R2ColliderHandle collider2);
6613
6619RAPIER_API
6620size_t RAPIER_CALL r2IntersectionPairs(const struct R2World *world,
6621 struct R2IntersectionPair *buffer,
6622 size_t capacity);
6623
6633RAPIER_API
6634size_t RAPIER_CALL r2ContactPoints(struct R2ColliderHandle collider1,
6635 struct R2ColliderHandle collider2,
6636 struct R2ContactPoint *buffer,
6637 size_t capacity);
6638
6644RAPIER_API
6645size_t RAPIER_CALL r2MultibodyJoint_GeneralizedVelocity(struct R2MultibodyJointHandle handle,
6646 R2Real *buffer,
6647 size_t capacity);
6648
6653RAPIER_API
6654R2Status RAPIER_CALL r2MultibodyJoint_SetGeneralizedVelocity(struct R2MultibodyJointHandle handle,
6655 const R2Real *values,
6656 size_t count);
6657
6666RAPIER_API
6667R2Status RAPIER_CALL r2CheckAbi(uint32_t version,
6668 uint32_t dimension,
6669 size_t real_size,
6670 size_t vector_size,
6671 size_t pose_size,
6672 uint32_t features);
6673
6682RAPIER_API
6683size_t RAPIER_CALL r2QuarantinedRigidBodies(const struct R2World *world,
6684 struct R2RigidBodyHandle *buffer,
6685 size_t capacity);
6686
6695RAPIER_API
6696size_t RAPIER_CALL r2QuarantinedColliders(const struct R2World *world,
6697 struct R2ColliderHandle *buffer,
6698 size_t capacity);
6699
6708RAPIER_API
6709size_t RAPIER_CALL r2QuarantinedSoftBodies(const struct R2World *world,
6710 struct R2SoftBodyHandle *buffer,
6711 size_t capacity);
6712
6713#if defined(RAPIER_DIM3)
6718RAPIER_API uint32_t RAPIER_CALL r2FrictionModel(const struct R2World *world);
6719#endif
6720
6721#if defined(RAPIER_DIM3)
6726RAPIER_API R2Status RAPIER_CALL r2SetFrictionModel(struct R2World *world, uint32_t value);
6727#endif
6728
6734RAPIER_API R2Real RAPIER_CALL r2Sin(R2Real x);
6735
6740RAPIER_API R2Real RAPIER_CALL r2Cos(R2Real x);
6741
6746RAPIER_API R2Real RAPIER_CALL r2Tan(R2Real x);
6747
6752RAPIER_API R2Real RAPIER_CALL r2Asin(R2Real x);
6753
6758RAPIER_API R2Real RAPIER_CALL r2Acos(R2Real x);
6759
6765RAPIER_API R2Real RAPIER_CALL r2Atan2(R2Real y, R2Real x);
6766
6771RAPIER_API R2Real RAPIER_CALL r2Exp(R2Real x);
6772
6777RAPIER_API R2Real RAPIER_CALL r2Ln(R2Real x);
6778
6783RAPIER_API R2Real RAPIER_CALL r2Powf(R2Real base, R2Real exponent);
6784
6790RAPIER_API
6791struct R2ShapeMesh *RAPIER_CALL r2SharedShape_Tessellate(const R2SharedShape *shape,
6792 uint32_t subdivisions);
6793
6799RAPIER_API
6800size_t RAPIER_CALL r2ShapeMesh_Triangles(const struct R2ShapeMesh *mesh,
6801 struct R2Vector *buffer,
6802 size_t capacity);
6803
6809RAPIER_API
6810size_t RAPIER_CALL r2ShapeMesh_Lines(const struct R2ShapeMesh *mesh,
6811 struct R2Vector *buffer,
6812 size_t capacity);
6813
6819RAPIER_API R2Status RAPIER_CALL r2FreeShapeMesh(struct R2ShapeMesh *mesh);
6820
6821#if defined(RAPIER_DIM3)
6826RAPIER_API
6827R2SharedShape *RAPIER_CALL r2RoundCylinderSharedShape(R2Real half_height,
6828 R2Real radius,
6829 R2Real border_radius);
6830#endif
6831
6832#if defined(RAPIER_DIM3)
6837RAPIER_API
6838R2SharedShape *RAPIER_CALL r2RoundConeSharedShape(R2Real half_height,
6839 R2Real radius,
6840 R2Real border_radius);
6841#endif
6842
6843#if defined(RAPIER_DIM3)
6851RAPIER_API
6852struct R2TriMeshData *RAPIER_CALL r2SharedShape_ToTrimesh(const R2SharedShape *shape,
6853 uint32_t ntheta,
6854 uint32_t nphi);
6855#endif
6856
6857#if defined(RAPIER_DIM3)
6863RAPIER_API
6864size_t RAPIER_CALL r2TriMeshData_Vertices(const struct R2TriMeshData *mesh,
6865 struct R2Vector *buffer,
6866 size_t capacity);
6867#endif
6868
6869#if defined(RAPIER_DIM3)
6875RAPIER_API
6876size_t RAPIER_CALL r2TriMeshData_Indices(const struct R2TriMeshData *mesh,
6877 uint32_t *buffer,
6878 size_t capacity);
6879#endif
6880
6881#if defined(RAPIER_DIM3)
6887RAPIER_API R2Status RAPIER_CALL r2FreeTriMeshData(struct R2TriMeshData *mesh);
6888#endif
6889
6890#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6895RAPIER_API struct R2UrdfLoaderOptions RAPIER_CALL r2DefaultUrdfLoaderOptions(void);
6896#endif
6897
6898#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6904RAPIER_API R2Status RAPIER_CALL r2FreeUrdfRobot(struct R2UrdfRobot *object);
6905#endif
6906
6907#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6913RAPIER_API
6914struct R2UrdfRobot *RAPIER_CALL r2UrdfRobotFromFile(const char *path,
6915 const struct R2UrdfLoaderOptions *options);
6916#endif
6917
6918#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6923RAPIER_API
6924R2Status RAPIER_CALL r2UrdfRobot_AppendTransform(struct R2UrdfRobot *robot,
6925 struct R2Pose transform);
6926#endif
6927
6928#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6934RAPIER_API R2Status RAPIER_CALL r2FreeUrdfRobotHandles(struct R2UrdfRobotHandles *handles);
6935#endif
6936
6937#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6942RAPIER_API
6943struct R2UrdfRobotHandles *RAPIER_CALL r2UrdfRobot_InsertUsingImpulseJoints(struct R2World *world,
6944 const struct R2UrdfRobot *robot);
6945#endif
6946
6947#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6952RAPIER_API
6953struct R2UrdfRobotHandles *RAPIER_CALL r2UrdfRobot_InsertUsingMultibodyJoints(struct R2World *world,
6954 const struct R2UrdfRobot *robot,
6955 uint8_t options);
6956#endif
6957
6958#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6965RAPIER_API
6966size_t RAPIER_CALL r2UrdfRobotHandles_Bodies(const struct R2UrdfRobotHandles *handles,
6967 struct R2RigidBodyHandle *buffer,
6968 size_t capacity);
6969#endif
6970
6971#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6976RAPIER_API struct R2MjcfLoaderOptions RAPIER_CALL r2DefaultMjcfLoaderOptions(void);
6977#endif
6978
6979#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6985RAPIER_API R2Status RAPIER_CALL r2FreeMjcfRobot(struct R2MjcfRobot *object);
6986#endif
6987
6988#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
6994RAPIER_API
6995struct R2MjcfRobot *RAPIER_CALL r2MjcfRobotFromFile(const char *path,
6996 const struct R2MjcfLoaderOptions *options);
6997#endif
6998
6999#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7004RAPIER_API
7005R2Status RAPIER_CALL r2MjcfRobot_AppendTransform(struct R2MjcfRobot *robot,
7006 struct R2Pose transform);
7007#endif
7008
7009#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7015RAPIER_API R2Status RAPIER_CALL r2FreeMjcfRobotHandles(struct R2MjcfRobotHandles *handles);
7016#endif
7017
7018#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7023RAPIER_API
7024struct R2MjcfRobotHandles *RAPIER_CALL r2MjcfRobot_InsertUsingImpulseJoints(struct R2World *world,
7025 const struct R2MjcfRobot *robot);
7026#endif
7027
7028#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7033RAPIER_API
7034struct R2MjcfRobotHandles *RAPIER_CALL r2MjcfRobot_InsertUsingMultibodyJoints(struct R2World *world,
7035 const struct R2MjcfRobot *robot,
7036 uint8_t options);
7037#endif
7038
7039#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7045RAPIER_API
7046size_t RAPIER_CALL r2MjcfRobotHandles_Bodies(const struct R2MjcfRobotHandles *handles,
7047 struct R2RigidBodyHandle *buffer,
7048 size_t capacity);
7049#endif
7050
7051#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7056RAPIER_API struct R2Vector RAPIER_CALL r2MjcfRobot_Gravity(const struct R2MjcfRobot *robot);
7057#endif
7058
7059#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7064RAPIER_API size_t RAPIER_CALL r2MjcfRobot_BodyCount(const struct R2MjcfRobot *robot);
7065#endif
7066
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);
7073#endif
7074
7075#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7080RAPIER_API
7081R2Status RAPIER_CALL r2MjcfRobot_SetBodyColliderCollisionGroups(struct R2MjcfRobot *robot,
7082 size_t body,
7083 size_t collider,
7084 struct R2InteractionGroups groups);
7085#endif
7086
7087#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7092RAPIER_API size_t RAPIER_CALL r2MjcfRobot_KeyframeCount(const struct R2MjcfRobot *robot);
7093#endif
7094
7095#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7101RAPIER_API
7102size_t RAPIER_CALL r2MjcfRobot_KeyframeName(const struct R2MjcfRobot *robot,
7103 size_t key,
7104 char *buffer,
7105 size_t capacity);
7106#endif
7107
7108#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7113RAPIER_API
7114R2Status RAPIER_CALL r2MjcfRobot_AppendKeyframe(struct R2MjcfRobot *robot,
7115 const struct R2MjcfRobot *source,
7116 size_t key);
7117#endif
7118
7119#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7125RAPIER_API
7126size_t RAPIER_CALL r2MjcfRobot_KeyframeControls(const struct R2MjcfRobot *robot,
7127 size_t key,
7128 R2Real *buffer,
7129 size_t capacity);
7130#endif
7131
7132#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7137RAPIER_API size_t RAPIER_CALL r2MjcfRobotHandles_ActuatorCount(const struct R2MjcfRobotHandles *handles);
7138#endif
7139
7140#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7145RAPIER_API
7146R2Status RAPIER_CALL r2MjcfRobotHandles_ApplyKeyframe(const struct R2MjcfRobotHandles *handles,
7147 const struct R2MjcfRobot *robot,
7148 size_t key);
7149#endif
7150
7151#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7156RAPIER_API
7157R2Status RAPIER_CALL r2MjcfRobotHandles_ApplyControlsScaled(const struct R2MjcfRobotHandles *handles,
7158 const R2Real *controls,
7159 size_t count,
7160 R2Real gain);
7161#endif
7162
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);
7169#endif
7170
7171#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7177RAPIER_API
7178const R2MjcfVisualMesh *RAPIER_CALL r2MjcfRobot_BodyVisual(const struct R2MjcfRobot *robot,
7179 size_t body,
7180 size_t visual);
7181#endif
7182
7183#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7188RAPIER_API struct R2MjcfVisualMeshInfo RAPIER_CALL r2MjcfVisualMesh_Info(const R2MjcfVisualMesh *visual);
7189#endif
7190
7191#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7197RAPIER_API R2SharedShape *RAPIER_CALL r2MjcfVisualMesh_CloneShape(const R2MjcfVisualMesh *visual);
7198#endif
7199
7200#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7206RAPIER_API
7207size_t RAPIER_CALL r2MjcfVisualMesh_Uvs(const R2MjcfVisualMesh *visual,
7208 float *buffer,
7209 size_t capacity);
7210#endif
7211
7212#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7218RAPIER_API
7219size_t RAPIER_CALL r2MjcfVisualMesh_Normals(const R2MjcfVisualMesh *visual,
7220 float *buffer,
7221 size_t capacity);
7222#endif
7223
7224#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7230RAPIER_API
7231size_t RAPIER_CALL r2MjcfVisualMesh_Texture(const R2MjcfVisualMesh *visual,
7232 char *buffer,
7233 size_t capacity);
7234#endif
7235
7236#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7243RAPIER_API
7244struct R2UrdfRobot *RAPIER_CALL r2UrdfRobotFromString(const char *urdf,
7245 const char *mesh_dir,
7246 const struct R2UrdfLoaderOptions *options);
7247#endif
7248
7249#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7255RAPIER_API R2Status RAPIER_CALL r2FreeMjcfContactHooks(struct R2MjcfContactHooks *hooks);
7256#endif
7257
7258#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7264RAPIER_API
7265struct R2MjcfContactHooks *RAPIER_CALL r2MjcfRobotHandles_ContactHooks(const struct R2MjcfRobotHandles *handles,
7266 const struct R2MjcfRobot *robot);
7267#endif
7268
7269#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7276RAPIER_API
7277struct R2PhysicsHooks RAPIER_CALL r2MjcfContactHooks_PhysicsHooks(const struct R2MjcfContactHooks *hooks);
7278#endif
7279
7280#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7286RAPIER_API R2Status RAPIER_CALL r2FreeLoadedMeshes(struct R2LoadedMeshes *meshes);
7287#endif
7288
7289#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7297RAPIER_API
7298struct R2LoadedMeshes *RAPIER_CALL r2LoadedMeshesFromFile(const char *path,
7299 uint32_t converter,
7300 uint32_t trimesh_flags,
7301 struct R2Vector scale);
7302#endif
7303
7304#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7309RAPIER_API size_t RAPIER_CALL r2LoadedMeshes_Count(const struct R2LoadedMeshes *meshes);
7310#endif
7311
7312#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7319RAPIER_API
7320R2SharedShape *RAPIER_CALL r2LoadedMeshes_CloneShape(const struct R2LoadedMeshes *meshes,
7321 size_t index);
7322#endif
7323
7324#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
7330RAPIER_API
7331struct R2Pose RAPIER_CALL r2LoadedMeshes_Pose(const struct R2LoadedMeshes *meshes,
7332 size_t index);
7333#endif
7334
7339RAPIER_API struct R2Pose RAPIER_CALL r2RigidBody_Position(struct R2RigidBodyHandle handle);
7340
7345RAPIER_API struct R2Vector RAPIER_CALL r2RigidBody_Translation(struct R2RigidBodyHandle handle);
7346
7351RAPIER_API struct R2Vector RAPIER_CALL r2RigidBody_Linvel(struct R2RigidBodyHandle handle);
7352
7357RAPIER_API R2AngVector RAPIER_CALL r2RigidBody_Angvel(struct R2RigidBodyHandle handle);
7358
7363RAPIER_API R2Bool RAPIER_CALL r2RigidBody_IsSleeping(struct R2RigidBodyHandle handle);
7364
7369RAPIER_API R2Bool RAPIER_CALL r2RigidBody_IsEnabled(struct R2RigidBodyHandle handle);
7370
7375RAPIER_API struct R2UserData RAPIER_CALL r2RigidBody_UserData(struct R2RigidBodyHandle handle);
7376
7382RAPIER_API
7383R2Status RAPIER_CALL r2RigidBody_SetPosition(struct R2RigidBodyHandle handle,
7384 struct R2Pose value,
7385 R2Bool wake_up);
7386
7392RAPIER_API
7393R2Status RAPIER_CALL r2RigidBody_SetTranslation(struct R2RigidBodyHandle handle,
7394 struct R2Vector value,
7395 R2Bool wake_up);
7396
7402RAPIER_API
7403R2Status RAPIER_CALL r2RigidBody_SetLinvel(struct R2RigidBodyHandle handle,
7404 struct R2Vector value,
7405 R2Bool wake_up);
7406
7412RAPIER_API
7413R2Status RAPIER_CALL r2RigidBody_SetAngvel(struct R2RigidBodyHandle handle,
7414 R2AngVector value,
7415 R2Bool wake_up);
7416
7421RAPIER_API
7422R2Status RAPIER_CALL r2RigidBody_SetNextKinematicPosition(struct R2RigidBodyHandle handle,
7423 struct R2Pose value);
7424
7429RAPIER_API
7430R2Status RAPIER_CALL r2RigidBody_SetNextKinematicTranslation(struct R2RigidBodyHandle handle,
7431 struct R2Vector value);
7432
7438RAPIER_API
7439R2Status RAPIER_CALL r2RigidBody_SetGravityScale(struct R2RigidBodyHandle handle,
7440 R2Real value,
7441 R2Bool wake_up);
7442
7447RAPIER_API
7448R2Status RAPIER_CALL r2RigidBody_SetLinearDamping(struct R2RigidBodyHandle handle,
7449 R2Real value);
7450
7455RAPIER_API
7456R2Status RAPIER_CALL r2RigidBody_SetAngularDamping(struct R2RigidBodyHandle handle,
7457 R2Real value);
7458
7463RAPIER_API R2Status RAPIER_CALL r2RigidBody_SetEnabled(struct R2RigidBodyHandle handle, R2Bool value);
7464
7469RAPIER_API
7470R2Status RAPIER_CALL r2RigidBody_SetUserData(struct R2RigidBodyHandle handle,
7471 struct R2UserData value);
7472
7478RAPIER_API
7479R2Status RAPIER_CALL r2RigidBody_ApplyImpulse(struct R2RigidBodyHandle handle,
7480 struct R2Vector value,
7481 R2Bool wake_up);
7482
7488RAPIER_API
7489R2Status RAPIER_CALL r2RigidBody_ApplyImpulseAtPoint(struct R2RigidBodyHandle handle,
7490 struct R2Vector value,
7491 struct R2Vector point,
7492 R2Bool wake_up);
7493
7499RAPIER_API
7500R2Status RAPIER_CALL r2RigidBody_AddForce(struct R2RigidBodyHandle handle,
7501 struct R2Vector value,
7502 R2Bool wake_up);
7503
7509RAPIER_API R2Status RAPIER_CALL r2RigidBody_ResetForces(struct R2RigidBodyHandle handle, R2Bool wake_up);
7510
7515RAPIER_API R2Status RAPIER_CALL r2RigidBody_Sleep(struct R2RigidBodyHandle handle);
7516
7521RAPIER_API struct R2Pose RAPIER_CALL r2Collider_Position(struct R2ColliderHandle handle);
7522
7527RAPIER_API struct R2Vector RAPIER_CALL r2Collider_Translation(struct R2ColliderHandle handle);
7528
7533RAPIER_API R2Real RAPIER_CALL r2Collider_Friction(struct R2ColliderHandle handle);
7534
7539RAPIER_API R2Real RAPIER_CALL r2Collider_Restitution(struct R2ColliderHandle handle);
7540
7545RAPIER_API R2Bool RAPIER_CALL r2Collider_IsSensor(struct R2ColliderHandle handle);
7546
7551RAPIER_API struct R2RigidBodyHandle RAPIER_CALL r2Collider_Parent(struct R2ColliderHandle handle);
7552
7558RAPIER_API
7559R2Status RAPIER_CALL r2Collider_SetPosition(struct R2ColliderHandle handle,
7560 struct R2Pose value);
7561
7567RAPIER_API
7568R2Status RAPIER_CALL r2Collider_SetTranslation(struct R2ColliderHandle handle,
7569 struct R2Vector value);
7570
7575RAPIER_API R2Status RAPIER_CALL r2Collider_SetFriction(struct R2ColliderHandle handle, R2Real value);
7576
7581RAPIER_API R2Status RAPIER_CALL r2Collider_SetRestitution(struct R2ColliderHandle handle, R2Real value);
7582
7587RAPIER_API R2Status RAPIER_CALL r2Collider_SetSensor(struct R2ColliderHandle handle, R2Bool value);
7588
7593RAPIER_API
7594R2Status RAPIER_CALL r2Collider_SetCollisionGroups(struct R2ColliderHandle handle,
7595 struct R2InteractionGroups value);
7596
7601RAPIER_API
7602R2Status RAPIER_CALL r2Collider_SetUserData(struct R2ColliderHandle handle,
7603 struct R2UserData value);
7604
7609RAPIER_API
7610struct R2Vector RAPIER_CALL r2SoftBody_ParticlePosition(struct R2SoftBodyHandle handle,
7611 size_t index);
7612
7618RAPIER_API
7619size_t RAPIER_CALL r2SoftBody_ParticlePositions(struct R2SoftBodyHandle handle,
7620 struct R2Vector *buffer,
7621 size_t capacity);
7622
7627RAPIER_API struct R2SoftBodyMaterial RAPIER_CALL r2SoftBody_Material(struct R2SoftBodyHandle handle);
7628
7633RAPIER_API
7634R2Status RAPIER_CALL r2SoftBody_SetParticlePosition(struct R2SoftBodyHandle handle,
7635 size_t index,
7636 struct R2Vector value);
7637
7642RAPIER_API
7643R2Status RAPIER_CALL r2SoftBody_SetMaterial(struct R2SoftBodyHandle handle,
7644 const struct R2SoftBodyMaterial *data);
7645
7651RAPIER_API
7652R2Status RAPIER_CALL r2SoftBody_AddParticleForce(struct R2SoftBodyHandle handle,
7653 size_t index,
7654 struct R2Vector value,
7655 R2Bool wake_up);
7656
7663RAPIER_API
7664size_t RAPIER_CALL r2RigidBodyReadStates(const struct R2World *world,
7665 const struct R2RigidBodyHandle *handles,
7666 size_t handle_count,
7667 struct R2RigidBodyState *states,
7668 size_t capacity);
7669
7674RAPIER_API struct R2JointDesc RAPIER_CALL r2ImpulseJoint_Desc(struct R2ImpulseJointHandle handle);
7675
7681RAPIER_API
7682R2Status RAPIER_CALL r2ImpulseJoint_SetDesc(struct R2ImpulseJointHandle handle,
7683 const struct R2JointDesc *desc,
7684 R2Bool wake_up);
7685
7690RAPIER_API uint16_t RAPIER_CALL r2Collider_ActiveCollisionTypes(struct R2ColliderHandle handle);
7691
7696RAPIER_API uint32_t RAPIER_CALL r2Collider_ActiveHooks(struct R2ColliderHandle handle);
7697
7702RAPIER_API uint32_t RAPIER_CALL r2Collider_FrictionCombineRule(struct R2ColliderHandle handle);
7703
7708RAPIER_API uint32_t RAPIER_CALL r2Collider_RestitutionCombineRule(struct R2ColliderHandle handle);
7709
7715RAPIER_API struct R2Pose RAPIER_CALL r2Collider_PositionWrtParent(struct R2ColliderHandle handle);
7716
7721RAPIER_API int8_t RAPIER_CALL r2RigidBody_DominanceGroup(struct R2RigidBodyHandle handle);
7722
7727RAPIER_API size_t RAPIER_CALL r2RigidBody_AdditionalSolverIterations(struct R2RigidBodyHandle handle);
7728
7733RAPIER_API size_t RAPIER_CALL r2RigidBody_AdditionalPgsIterations(struct R2RigidBodyHandle handle);
7734
7739RAPIER_API R2Bool RAPIER_CALL r2RigidBody_IsFastRotationAllowed(struct R2RigidBodyHandle handle);
7740
7746RAPIER_API
7747R2Status RAPIER_CALL r2Collider_SetRotation(struct R2ColliderHandle handle,
7748 struct R2Rotation value);
7749
7755RAPIER_API
7756R2Status RAPIER_CALL r2RigidBody_SetAllowFastRotation(struct R2RigidBodyHandle handle,
7757 R2Bool value);
7758
7765RAPIER_API
7766R2Status RAPIER_CALL r2ShapeDesc_SetTrimesh(struct R2ShapeDesc *desc,
7767 struct R2VectorView vertices,
7768 struct R2TriangleView indices,
7769 uint32_t flags);
7770
7777RAPIER_API
7778R2Status RAPIER_CALL r2ShapeDesc_SetPolyline(struct R2ShapeDesc *desc,
7779 struct R2VectorView vertices,
7780 struct R2EdgeView indices,
7781 uint32_t flags);
7782
7787RAPIER_API
7788R2Status RAPIER_CALL r2ShapeDesc_SetConvexHull(struct R2ShapeDesc *desc,
7789 struct R2VectorView vertices);
7790
7795RAPIER_API
7796R2Status RAPIER_CALL r2SoftBodyDesc_SetParticles(struct R2SoftBodyDesc *desc,
7797 struct R2VectorView positions);
7798
7803RAPIER_API
7804R2Status RAPIER_CALL r2SoftBodyDesc_SetSurfaceMesh(struct R2SoftBodyDesc *desc,
7805 struct R2VectorView vertices,
7806 R2SurfaceElementView elements);
7807
7808#if defined(RAPIER_DIM2)
7815RAPIER_API
7816R2Status RAPIER_CALL r2SoftBodyDesc_SetTrimesh(struct R2SoftBodyDesc *desc,
7817 struct R2VectorView vertices,
7818 struct R2TriangleView triangles);
7819#endif
7820
7827RAPIER_API
7828R2Status RAPIER_CALL r2SoftBodyDesc_SetAppended(struct R2SoftBodyDesc *desc,
7829 struct R2SoftBodyDescView view);
7830
7837RAPIER_API
7838R2Status RAPIER_CALL r2SoftBodyDesc_SetAddedEdges(struct R2SoftBodyDesc *desc,
7839 struct R2EdgeView view);
7840
7845RAPIER_API
7846R2Status RAPIER_CALL r2SoftBodyDesc_SetSkin(struct R2SoftBodyDesc *desc,
7847 struct R2VectorView vertices,
7848 R2SurfaceElementView elements);
7849
7857RAPIER_API
7858R2Status RAPIER_CALL r2SoftBodyDesc_SetMasses(struct R2SoftBodyDesc *desc,
7859 struct R2RealView view);
7860
7868RAPIER_API
7869R2Status RAPIER_CALL r2SoftBodyDesc_SetPinnedParticles(struct R2SoftBodyDesc *desc,
7870 struct R2IndexView view);
7871
7879RAPIER_API
7880R2Status RAPIER_CALL r2SoftBodyDesc_SetEdges(struct R2SoftBodyDesc *desc,
7881 struct R2EdgeView view);
7882
7890RAPIER_API
7891R2Status RAPIER_CALL r2SoftBodyDesc_SetBendEdges(struct R2SoftBodyDesc *desc,
7892 struct R2EdgeView view);
7893
7901RAPIER_API R2Status RAPIER_CALL r2SoftBodyDesc_SetCells(struct R2SoftBodyDesc *desc, R2CellView view);
7902
7910RAPIER_API
7911R2Status RAPIER_CALL r2SoftBodyDesc_SetSurface(struct R2SoftBodyDesc *desc,
7912 R2SurfaceElementView view);
7913
7921RAPIER_API
7922R2Status RAPIER_CALL r2SoftBodyDesc_SetTensionOnlyEdges(struct R2SoftBodyDesc *desc,
7923 struct R2IndexView view);
7924
7925#if defined(RAPIER_DIM3)
7933RAPIER_API
7934R2Status RAPIER_CALL r2SoftBodyDesc_SetDihedrals(struct R2SoftBodyDesc *desc,
7935 struct R2DihedralView view);
7936#endif
7937
7938#if defined(RAPIER_DIM3)
7946RAPIER_API
7947R2Status RAPIER_CALL r2SoftBodyDesc_SetWire(struct R2SoftBodyDesc *desc,
7948 struct R2EdgeView view);
7949#endif
7950
7956RAPIER_API
7957struct R2ColliderDesc RAPIER_CALL r2RoundCuboidColliderDesc(struct R2Vector half_extents,
7958 R2Real border_radius);
7959
7965RAPIER_API
7966struct R2ColliderDesc RAPIER_CALL r2CapsuleColliderDesc(struct R2Vector a,
7967 struct R2Vector b,
7968 R2Real radius);
7969
7975RAPIER_API struct R2ColliderDesc RAPIER_CALL r2SegmentColliderDesc(struct R2Vector a, struct R2Vector b);
7976
7982RAPIER_API
7983struct R2ColliderDesc RAPIER_CALL r2TriangleColliderDesc(struct R2Vector a,
7984 struct R2Vector b,
7985 struct R2Vector c);
7986
7992RAPIER_API struct R2ColliderDesc RAPIER_CALL r2HalfspaceColliderDesc(struct R2Vector normal);
7993
7994#if defined(RAPIER_DIM3)
8000RAPIER_API struct R2ColliderDesc RAPIER_CALL r2CylinderColliderDesc(R2Real half_height, R2Real radius);
8001#endif
8002
8003#if defined(RAPIER_DIM3)
8009RAPIER_API struct R2ColliderDesc RAPIER_CALL r2ConeColliderDesc(R2Real half_height, R2Real radius);
8010#endif
8011
8012#if defined(RAPIER_DIM3)
8018RAPIER_API
8019struct R2ColliderDesc RAPIER_CALL r2RoundCylinderColliderDesc(R2Real half_height,
8020 R2Real radius,
8021 R2Real border_radius);
8022#endif
8023
8024#if defined(RAPIER_DIM3)
8030RAPIER_API
8031struct R2ColliderDesc RAPIER_CALL r2RoundConeColliderDesc(R2Real half_height,
8032 R2Real radius,
8033 R2Real border_radius);
8034#endif
8035
8041RAPIER_API struct R2ColliderDesc RAPIER_CALL r2CapsuleXColliderDesc(R2Real half_height, R2Real radius);
8042
8048RAPIER_API struct R2ColliderDesc RAPIER_CALL r2CapsuleYColliderDesc(R2Real half_height, R2Real radius);
8049
8050#if defined(RAPIER_DIM3)
8056RAPIER_API struct R2ColliderDesc RAPIER_CALL r2CapsuleZColliderDesc(R2Real half_height, R2Real radius);
8057#endif
8058
8064RAPIER_API
8065struct R2SoftBodyDesc RAPIER_CALL r2RopeSoftBodyDesc(struct R2Vector a,
8066 struct R2Vector b,
8067 size_t particles);
8068
8069#if defined(RAPIER_DIM2)
8075RAPIER_API
8076struct R2SoftBodyDesc RAPIER_CALL r2GridSoftBodyDesc(struct R2Vector center,
8077 struct R2Vector half_extents,
8078 size_t nx,
8079 size_t ny);
8080#endif
8081
8082#if defined(RAPIER_DIM3)
8088RAPIER_API
8089struct R2SoftBodyDesc RAPIER_CALL r2CuboidSoftBodyDesc(struct R2Vector center,
8090 struct R2Vector half_extents,
8091 size_t nx,
8092 size_t ny,
8093 size_t nz);
8094#endif
8095
8096#if defined(RAPIER_DIM3)
8102RAPIER_API
8103struct R2SoftBodyDesc RAPIER_CALL r2ClothSoftBodyDesc(struct R2Vector origin,
8104 struct R2Vector du,
8105 struct R2Vector dv,
8106 size_t nu,
8107 size_t nv);
8108#endif
8109
8110#if defined(RAPIER_DIM3)
8118RAPIER_API
8119struct R2SoftBodyDesc RAPIER_CALL r2ClothAnisotropicSoftBodyDesc(struct R2Vector origin,
8120 struct R2Vector du,
8121 struct R2Vector dv,
8122 size_t nu,
8123 size_t nv,
8124 struct R2SpringCoefficients warp,
8125 struct R2SpringCoefficients weft,
8126 struct R2SpringCoefficients shear);
8127#endif
8128
8129#if defined(RAPIER_DIM2)
8137RAPIER_API struct R2SoftBodyDesc RAPIER_CALL r2PolygonSoftBodyDesc(struct R2VectorView points);
8138#endif
8139
8140#if defined(RAPIER_DIM2)
8147RAPIER_API
8148struct R2SoftBodyDesc RAPIER_CALL r2DiskSoftBodyDesc(struct R2Vector center,
8149 R2Real radius,
8150 size_t particles);
8151#endif
8152
8153#if defined(RAPIER_DIM3)
8159RAPIER_API
8160struct R2SoftBodyDesc RAPIER_CALL r2SphereSoftBodyDesc(struct R2Vector center,
8161 R2Real radius,
8162 uint32_t subdivisions);
8163#endif
8164
8165#if defined(RAPIER_DIM3)
8172RAPIER_API
8173struct R2SoftBodyDesc RAPIER_CALL r2ClothTubeSoftBodyDesc(struct R2Vector origin,
8174 struct R2Vector axis,
8175 R2Real radius_start,
8176 R2Real radius_end,
8177 size_t num_around,
8178 size_t num_along);
8179#endif
8180
8185RAPIER_API
8186struct R2SoftBodyDesc RAPIER_CALL r2VolumetricSoftBodyDesc(struct R2VectorView vertices,
8187 R2SurfaceElementView surface,
8188 struct R2VolumeMeshParameters parameters);
8189
8194RAPIER_API
8195struct R2SoftBodyMaterial RAPIER_CALL r2UniformSoftBodyMaterial(struct R2SpringCoefficients value);
8196
8202RAPIER_API
8203size_t RAPIER_CALL r2SoftBodyDesc_ParticlePositions(const struct R2SoftBodyDesc *desc,
8204 struct R2Vector *buffer,
8205 size_t capacity);
8206
8212RAPIER_API
8213size_t RAPIER_CALL r2SoftBodyDesc_CellIndices(const struct R2SoftBodyDesc *desc,
8214 uint32_t *buffer,
8215 size_t capacity);
8216
8221RAPIER_API
8222struct R2Vector RAPIER_CALL r2SoftBody_ParticleVelocity(struct R2SoftBodyHandle handle,
8223 size_t index);
8224
8230RAPIER_API uint32_t RAPIER_CALL r2SoftBody_Solver(struct R2SoftBodyHandle handle);
8231
8237RAPIER_API
8238R2Status RAPIER_CALL r2SoftBody_SetClusterEdgeSoftness(struct R2SoftBodyHandle handle,
8239 uint32_t cluster,
8240 const struct R2SpringCoefficients *softness);
8241
8250RAPIER_API
8251R2Status RAPIER_CALL r2SoftBody_ApplyImpulseAtPoint(struct R2SoftBodyHandle handle,
8252 struct R2Vector impulse,
8253 struct R2Vector point,
8254 R2Real falloff_radius,
8255 R2Bool wake_up);
8256
8266RAPIER_API
8267R2Status RAPIER_CALL r2SoftBody_ApplyRadialImpulse(struct R2SoftBodyHandle handle,
8268 struct R2Vector center,
8269 R2Real magnitude,
8270 R2Real falloff_radius,
8271 R2Bool wake_up);
8272
8279RAPIER_API R2Status RAPIER_CALL r2SoftBody_ResetPlasticity(struct R2SoftBodyHandle handle);
8280
8286RAPIER_API R2Status RAPIER_CALL r2SoftBody_TearEdge(struct R2SoftBodyHandle handle, size_t index);
8287
8294RAPIER_API R2Status RAPIER_CALL r2SoftBody_TearCell(struct R2SoftBodyHandle handle, size_t index);
8295
8301RAPIER_API struct R2SoftBodyHandle RAPIER_CALL r2Collider_SoftBody(struct R2ColliderHandle handle);
8302
8308RAPIER_API
8309struct R2SoftBodyHandle RAPIER_CALL r2ReadCollider_SoftBody(const struct R2ReadContext *context,
8310 struct R2ColliderHandle handle);
8311
8318RAPIER_API size_t RAPIER_CALL r2SoftBodyTearEvent_PieceCount(const struct R2SoftBodyTearEvent *event);
8319
8324RAPIER_API R2Bool RAPIER_CALL r2RecoveryAuthoredVelocityMargin(const struct R2World *world);
8325
8330RAPIER_API R2Bool RAPIER_CALL r2RecoveryEdgeSpeculation(const struct R2World *world);
8331
8336RAPIER_API R2Bool RAPIER_CALL r2RecoveryInvertedCellDetection(const struct R2World *world);
8337
8342RAPIER_API R2Bool RAPIER_CALL r2RecoverySelfCrossingDetection(const struct R2World *world);
8343
8348RAPIER_API R2Bool RAPIER_CALL r2RecoveryDetectionMotionGating(const struct R2World *world);
8349
8354RAPIER_API R2Bool RAPIER_CALL r2RecoveryCrossBodyDetection(const struct R2World *world);
8355
8360RAPIER_API R2Bool RAPIER_CALL r2RecoverySelfStandDown(const struct R2World *world);
8361
8366RAPIER_API R2Bool RAPIER_CALL r2RecoveryCrossBodyExpelGate(const struct R2World *world);
8367
8372RAPIER_API R2Bool RAPIER_CALL r2RecoveryEdgeStandDown(const struct R2World *world);
8373
8378RAPIER_API R2Bool RAPIER_CALL r2RecoveryCrossingRepulsion(const struct R2World *world);
8379
8384RAPIER_API R2Bool RAPIER_CALL r2RecoveryCrossingRepulsionGuide(const struct R2World *world);
8385
8390RAPIER_API R2Bool RAPIER_CALL r2RecoveryCrossingRepulsionSelfGuide(const struct R2World *world);
8391
8396RAPIER_API R2Real RAPIER_CALL r2RecoveryRecoveryPace(const struct R2World *world);
8397
8402RAPIER_API R2Bool RAPIER_CALL r2RecoveryOverlapConstraints(const struct R2World *world);
8403
8408RAPIER_API R2Bool RAPIER_CALL r2RecoveryOverlapRigid(const struct R2World *world);
8409
8414RAPIER_API R2Bool RAPIER_CALL r2RecoveryOverlapSkipSelfTangled(const struct R2World *world);
8415
8420RAPIER_API R2Bool RAPIER_CALL r2RecoveryOverlapEdgeStandDown(const struct R2World *world);
8421
8426RAPIER_API R2Real RAPIER_CALL r2RecoveryOverlapConstraintPace(const struct R2World *world);
8427
8432RAPIER_API uint32_t RAPIER_CALL r2RecoveryOverlapPatchConstraints(const struct R2World *world);
8433
8438RAPIER_API
8439R2Status RAPIER_CALL r2RecoverySetOverlapPatchConstraints(struct R2World *world,
8440 uint32_t value);
8441
8446RAPIER_API R2Bool RAPIER_CALL r2RecoveryOverlapSkinVolume(const struct R2World *world);
8447
8452RAPIER_API R2Real RAPIER_CALL r2RecoveryOverlapKeptDepth(const struct R2World *world);
8453
8458RAPIER_API R2Bool RAPIER_CALL r2RecoveryOverlapSelfRegions(const struct R2World *world);
8459
8464RAPIER_API R2Bool RAPIER_CALL r2RecoveryOverlapNormalPush(const struct R2World *world);
8465
8470RAPIER_API R2Bool RAPIER_CALL r2RecoveryOverlapMultiVolume(const struct R2World *world);
8471
8476RAPIER_API uint32_t RAPIER_CALL r2RecoveryOverlapSplit(const struct R2World *world);
8477
8482RAPIER_API R2Status RAPIER_CALL r2RecoverySetOverlapSplit(struct R2World *world, uint32_t value);
8483
8488RAPIER_API uint32_t RAPIER_CALL r2RecoveryOverlapPatience(const struct R2World *world);
8489
8494RAPIER_API R2Status RAPIER_CALL r2RecoverySetOverlapPatience(struct R2World *world, uint32_t value);
8495
8500RAPIER_API R2Real RAPIER_CALL r2RecoveryOverlapProgressMargin(const struct R2World *world);
8501
8502#if defined(RAPIER_FEM)
8507RAPIER_API R2Real RAPIER_CALL r2FemLinearTolerance(const struct R2World *world);
8508#endif
8509
8510#if defined(RAPIER_FEM)
8515RAPIER_API size_t RAPIER_CALL r2FemMaxLinearIterations(const struct R2World *world);
8516#endif
8517
8518#if defined(RAPIER_FEM)
8523RAPIER_API size_t RAPIER_CALL r2FemMaxDenseDofs(const struct R2World *world);
8524#endif
8525
8531RAPIER_API size_t RAPIER_CALL r2Collider_ShapeIdentity(struct R2ColliderHandle handle);
8532
8537RAPIER_API size_t RAPIER_CALL r2SoftBody_NumParticles(struct R2SoftBodyHandle handle);
8538
8544RAPIER_API uint32_t RAPIER_CALL r2SoftBody_TopologyVersion(struct R2SoftBodyHandle handle);
8545
8550RAPIER_API R2Real RAPIER_CALL r2SoftBody_Mass(struct R2SoftBodyHandle handle);
8551
8556RAPIER_API R2Real RAPIER_CALL r2SoftBody_Volume(struct R2SoftBodyHandle handle);
8557
8562RAPIER_API R2Real RAPIER_CALL r2SoftBody_RestVolume(struct R2SoftBodyHandle handle);
8563
8568RAPIER_API R2Real RAPIER_CALL r2SoftBody_VolumeFactor(struct R2SoftBodyHandle handle);
8569
8574RAPIER_API struct R2Vector RAPIER_CALL r2SoftBody_CenterOfMass(struct R2SoftBodyHandle handle);
8575
8580RAPIER_API struct R2RigidBodyHandle RAPIER_CALL r2SoftBody_RootBody(struct R2SoftBodyHandle handle);
8581
8586RAPIER_API R2Bool RAPIER_CALL r2SoftBody_IsEnabled(struct R2SoftBodyHandle handle);
8587
8592RAPIER_API R2Bool RAPIER_CALL r2SoftBody_IsSleeping(struct R2SoftBodyHandle handle);
8593
8599RAPIER_API
8600size_t RAPIER_CALL r2SoftBody_ParticleVelocities(struct R2SoftBodyHandle handle,
8601 struct R2Vector *buffer,
8602 size_t capacity);
8603
8609RAPIER_API
8610size_t RAPIER_CALL r2SoftBody_Edges(struct R2SoftBodyHandle handle,
8611 uint32_t *buffer,
8612 size_t capacity);
8613
8619RAPIER_API
8620size_t RAPIER_CALL r2SoftBody_Cells(struct R2SoftBodyHandle handle,
8621 uint32_t *buffer,
8622 size_t capacity);
8623
8629RAPIER_API
8630size_t RAPIER_CALL r2SoftBody_Boundary(struct R2SoftBodyHandle handle,
8631 uint32_t *buffer,
8632 size_t capacity);
8633
8639RAPIER_API
8640size_t RAPIER_CALL r2SoftBody_Pieces(struct R2SoftBodyHandle handle,
8641 struct R2SoftBodyHandle *buffer,
8642 size_t capacity);
8643
8648RAPIER_API
8649R2Status RAPIER_CALL r2SoftBody_SetParticleVelocity(struct R2SoftBodyHandle handle,
8650 size_t index,
8651 struct R2Vector value);
8652
8657RAPIER_API
8658R2Status RAPIER_CALL r2SoftBody_SetParticleKinematicTarget(struct R2SoftBodyHandle handle,
8659 size_t index,
8660 struct R2Vector value);
8661
8666RAPIER_API
8667R2Status RAPIER_CALL r2SoftBody_SetParticlePinned(struct R2SoftBodyHandle handle,
8668 size_t index,
8669 R2Bool value);
8670
8676RAPIER_API
8677R2Status RAPIER_CALL r2SoftBody_ApplyParticleImpulse(struct R2SoftBodyHandle handle,
8678 size_t index,
8679 struct R2Vector value,
8680 R2Bool wake_up);
8681
8687RAPIER_API
8688R2Status RAPIER_CALL r2SoftBody_AddForce(struct R2SoftBodyHandle handle,
8689 struct R2Vector value,
8690 R2Bool wake_up);
8691
8699RAPIER_API
8700R2Status RAPIER_CALL r2SoftBody_ApplyImpulse(struct R2SoftBodyHandle handle,
8701 struct R2Vector value,
8702 R2Bool wake_up);
8703
8709RAPIER_API R2Status RAPIER_CALL r2SoftBody_ResetForces(struct R2SoftBodyHandle handle, R2Bool wake_up);
8710
8715RAPIER_API R2Status RAPIER_CALL r2SoftBody_SetEnabled(struct R2SoftBodyHandle handle, R2Bool value);
8716
8721RAPIER_API
8722R2Status RAPIER_CALL r2SoftBody_SetVolumeFactor(struct R2SoftBodyHandle handle,
8723 R2Real value);
8724
8731RAPIER_API
8732R2Status RAPIER_CALL r2SoftBody_AttachParticle(struct R2SoftBodyHandle handle,
8733 size_t index,
8734 struct R2RigidBodyHandle rigid_body);
8735
8741RAPIER_API R2Bool RAPIER_CALL r2SoftBody_DetachParticle(struct R2SoftBodyHandle handle, size_t index);
8742
8748RAPIER_API
8749size_t RAPIER_CALL r2SoftBody_Clusters(struct R2SoftBodyHandle handle,
8750 uint32_t *buffer,
8751 size_t capacity);
8752
8757RAPIER_API
8758struct R2RigidBodyHandle RAPIER_CALL r2SoftBody_ClusterProxy(struct R2SoftBodyHandle handle,
8759 uint32_t cluster);
8760
8766RAPIER_API
8767size_t RAPIER_CALL r2SoftBody_ClusterParticles(struct R2SoftBodyHandle handle,
8768 uint32_t cluster,
8769 uint32_t *buffer,
8770 size_t capacity);
8771
8776RAPIER_API
8777R2Status RAPIER_CALL r2SoftBody_SetClusterPinned(struct R2SoftBodyHandle handle,
8778 uint32_t cluster,
8779 R2Bool value);
8780
8785RAPIER_API
8786R2Status RAPIER_CALL r2SoftBody_SetClusterKinematicTarget(struct R2SoftBodyHandle handle,
8787 uint32_t cluster,
8788 struct R2Pose value);
8789
8794RAPIER_API
8795R2Status RAPIER_CALL r2SoftBody_SetClusterShapeMatchingEnabled(struct R2SoftBodyHandle handle,
8796 uint32_t cluster,
8797 R2Bool value);
8798
8805RAPIER_API
8806R2Status RAPIER_CALL r2SoftBody_SetClusterStiffnessScale(struct R2SoftBodyHandle handle,
8807 uint32_t cluster,
8808 R2Real value);
8809
8814RAPIER_API
8815R2Status RAPIER_CALL r2SoftBody_SetClusterTearResistance(struct R2SoftBodyHandle handle,
8816 uint32_t cluster,
8817 R2Real value);
8818
8824RAPIER_API
8825size_t RAPIER_CALL r2SoftBody_Meshes(struct R2SoftBodyHandle handle,
8826 struct R2SoftMeshInfo *buffer,
8827 size_t capacity);
8828
8834RAPIER_API
8835size_t RAPIER_CALL r2SoftBody_MeshVerticesById(struct R2SoftBodyHandle handle,
8836 struct R2SoftMeshId id,
8837 struct R2Vector *buffer,
8838 size_t capacity);
8839
8845RAPIER_API
8846size_t RAPIER_CALL r2SoftBody_MeshIndicesById(struct R2SoftBodyHandle handle,
8847 struct R2SoftMeshId id,
8848 uint32_t *buffer,
8849 size_t capacity);
8850
8856RAPIER_API
8857size_t RAPIER_CALL r2SoftBody_MeshColliders(struct R2SoftBodyHandle handle,
8858 struct R2ColliderHandle *buffer,
8859 size_t capacity);
8860
8866RAPIER_API
8867size_t RAPIER_CALL r2SoftBody_MeshVertices(struct R2SoftBodyHandle handle,
8868 struct R2ColliderHandle collider,
8869 struct R2Vector *buffer,
8870 size_t capacity);
8871
8877RAPIER_API
8878size_t RAPIER_CALL r2SoftBody_MeshIndices(struct R2SoftBodyHandle handle,
8879 struct R2ColliderHandle collider,
8880 uint32_t *buffer,
8881 size_t capacity);
8882
8887RAPIER_API
8888size_t RAPIER_CALL r2SoftBody_MeshArity(struct R2SoftBodyHandle handle,
8889 struct R2ColliderHandle collider);
8890
8895RAPIER_API
8896uint32_t RAPIER_CALL r2SoftBody_MeshTopologyVersion(struct R2SoftBodyHandle handle,
8897 struct R2ColliderHandle collider);
8898
8899#if defined(RAPIER_FEM)
8904RAPIER_API R2Status RAPIER_CALL r2SoftBody_SetSolver(struct R2SoftBodyHandle handle, uint32_t solver);
8905#endif
8906
8911RAPIER_API
8912R2Status RAPIER_CALL r2SoftBody_SetClusterShapeMatchingTarget(struct R2SoftBodyHandle handle,
8913 uint32_t cluster,
8914 const struct R2Pose *target);
8915
8920RAPIER_API
8921R2Status RAPIER_CALL r2SoftBody_SetEdgeTearResistance(struct R2SoftBodyHandle handle,
8922 size_t index,
8923 R2Real resistance);
8924
8929RAPIER_API
8930R2Bool RAPIER_CALL r2SoftBody_MeshIsClosed(struct R2SoftBodyHandle handle,
8931 struct R2ColliderHandle collider);
8932
8938RAPIER_API
8939R2Status RAPIER_CALL r2RigidBody_SetAdditionalMassProperties(struct R2RigidBodyHandle handle,
8940 struct R2MassProperties properties,
8941 R2Bool wake_up);
8942
8947RAPIER_API
8948R2Status RAPIER_CALL r2RigidBody_RecomputeMassPropertiesFromColliders(struct R2RigidBodyHandle handle);
8949
8954RAPIER_API
8955R2Status RAPIER_CALL r2Collider_SetMassProperties(struct R2ColliderHandle handle,
8956 struct R2MassProperties properties);
8957
8962RAPIER_API struct R2MassProperties RAPIER_CALL r2Collider_MassProperties(struct R2ColliderHandle handle);
8963
8969RAPIER_API
8970R2Status RAPIER_CALL r2RigidBody_SetLockedAxes(struct R2RigidBodyHandle handle,
8971 uint8_t axes,
8972 R2Bool wake_up);
8973
8978RAPIER_API uint8_t RAPIER_CALL r2RigidBody_LockedAxes(struct R2RigidBodyHandle handle);
8979
8984RAPIER_API R2Bool RAPIER_CALL r2Collider_IsVoxels(struct R2ColliderHandle handle);
8985
8990RAPIER_API
8991struct R2VoxelQuery RAPIER_CALL r2Collider_VoxelAtFlatId(struct R2ColliderHandle handle,
8992 uint32_t id);
8993
8998RAPIER_API
8999R2Status RAPIER_CALL r2Collider_SetVoxel(struct R2ColliderHandle handle,
9000 struct R2VoxelKey key,
9001 R2Bool filled);
9002
9007RAPIER_API struct R2Pose RAPIER_CALL r2RigidBody_NextPosition(struct R2RigidBodyHandle handle);
9008
9013RAPIER_API struct R2Rotation RAPIER_CALL r2RigidBody_Rotation(struct R2RigidBodyHandle handle);
9014
9019RAPIER_API struct R2Vector RAPIER_CALL r2RigidBody_CenterOfMass(struct R2RigidBodyHandle handle);
9020
9025RAPIER_API struct R2Vector RAPIER_CALL r2RigidBody_LocalCenterOfMass(struct R2RigidBodyHandle handle);
9026
9031RAPIER_API struct R2Vector RAPIER_CALL r2RigidBody_UserForce(struct R2RigidBodyHandle handle);
9032
9037RAPIER_API R2AngVector RAPIER_CALL r2RigidBody_UserTorque(struct R2RigidBodyHandle handle);
9038
9043RAPIER_API uint32_t RAPIER_CALL r2RigidBody_BodyType(struct R2RigidBodyHandle handle);
9044
9049RAPIER_API R2Real RAPIER_CALL r2RigidBody_Mass(struct R2RigidBodyHandle handle);
9050
9055RAPIER_API R2Real RAPIER_CALL r2RigidBody_GravityScale(struct R2RigidBodyHandle handle);
9056
9061RAPIER_API R2Real RAPIER_CALL r2RigidBody_LinearDamping(struct R2RigidBodyHandle handle);
9062
9067RAPIER_API R2Real RAPIER_CALL r2RigidBody_AngularDamping(struct R2RigidBodyHandle handle);
9068
9073RAPIER_API R2Real RAPIER_CALL r2RigidBody_KineticEnergy(struct R2RigidBodyHandle handle);
9074
9079RAPIER_API R2Real RAPIER_CALL r2RigidBody_SoftCcdPrediction(struct R2RigidBodyHandle handle);
9080
9085RAPIER_API R2Bool RAPIER_CALL r2RigidBody_IsCcdEnabled(struct R2RigidBodyHandle handle);
9086
9091RAPIER_API R2Bool RAPIER_CALL r2RigidBody_IsDynamic(struct R2RigidBodyHandle handle);
9092
9097RAPIER_API struct R2SoftBodyHandle RAPIER_CALL r2RigidBody_SoftBody(struct R2RigidBodyHandle handle);
9098
9103RAPIER_API R2Bool RAPIER_CALL r2RigidBody_IsSoftFrame(struct R2RigidBodyHandle handle);
9104
9109RAPIER_API R2Bool RAPIER_CALL r2RigidBody_IsFixed(struct R2RigidBodyHandle handle);
9110
9115RAPIER_API R2Bool RAPIER_CALL r2RigidBody_IsKinematic(struct R2RigidBodyHandle handle);
9116
9121RAPIER_API R2Bool RAPIER_CALL r2RigidBody_IsMoving(struct R2RigidBodyHandle handle);
9122
9127RAPIER_API R2Bool RAPIER_CALL r2RigidBody_IsCcdActive(struct R2RigidBodyHandle handle);
9128
9134RAPIER_API
9135R2Status RAPIER_CALL r2RigidBody_SetRotation(struct R2RigidBodyHandle handle,
9136 struct R2Rotation value,
9137 R2Bool wake_up);
9138
9144RAPIER_API
9145R2Status RAPIER_CALL r2RigidBody_SetBodyType(struct R2RigidBodyHandle handle,
9146 uint32_t value,
9147 R2Bool wake_up);
9148
9153RAPIER_API
9154R2Status RAPIER_CALL r2RigidBody_SetNextKinematicRotation(struct R2RigidBodyHandle handle,
9155 struct R2Rotation value);
9156
9162RAPIER_API
9163R2Status RAPIER_CALL r2RigidBody_SetAdditionalMass(struct R2RigidBodyHandle handle,
9164 R2Real value,
9165 R2Bool wake_up);
9166
9171RAPIER_API
9172R2Status RAPIER_CALL r2RigidBody_SetSoftCcdPrediction(struct R2RigidBodyHandle handle,
9173 R2Real value);
9174
9179RAPIER_API
9180R2Status RAPIER_CALL r2RigidBody_SetCcdEnabled(struct R2RigidBodyHandle handle,
9181 R2Bool value);
9182
9188RAPIER_API
9189R2Status RAPIER_CALL r2RigidBody_SetTranslationsLocked(struct R2RigidBodyHandle handle,
9190 R2Bool value,
9191 R2Bool wake_up);
9192
9198RAPIER_API
9199R2Status RAPIER_CALL r2RigidBody_SetRotationsLocked(struct R2RigidBodyHandle handle,
9200 R2Bool value,
9201 R2Bool wake_up);
9202
9207RAPIER_API
9208R2Status RAPIER_CALL r2RigidBody_SetDominanceGroup(struct R2RigidBodyHandle handle,
9209 int8_t value);
9210
9215RAPIER_API
9216R2Status RAPIER_CALL r2RigidBody_SetAdditionalSolverIterations(struct R2RigidBodyHandle handle,
9217 size_t value);
9218
9223RAPIER_API
9224R2Status RAPIER_CALL r2RigidBody_SetAdditionalPgsIterations(struct R2RigidBodyHandle handle,
9225 size_t value);
9226
9232RAPIER_API
9233R2Status RAPIER_CALL r2RigidBody_AddTorque(struct R2RigidBodyHandle handle,
9234 R2AngVector value,
9235 R2Bool wake_up);
9236
9242RAPIER_API
9243R2Status RAPIER_CALL r2RigidBody_ApplyTorqueImpulse(struct R2RigidBodyHandle handle,
9244 R2AngVector value,
9245 R2Bool wake_up);
9246
9252RAPIER_API
9253R2Status RAPIER_CALL r2RigidBody_AddForceAtPoint(struct R2RigidBodyHandle handle,
9254 struct R2Vector value,
9255 struct R2Vector point,
9256 R2Bool wake_up);
9257
9263RAPIER_API
9264R2Status RAPIER_CALL r2RigidBody_ResetTorques(struct R2RigidBodyHandle handle,
9265 R2Bool wake_up);
9266
9271RAPIER_API
9272struct R2Vector RAPIER_CALL r2RigidBody_VelocityAtPoint(struct R2RigidBodyHandle handle,
9273 struct R2Vector point);
9274
9280RAPIER_API
9281size_t RAPIER_CALL r2RigidBody_Colliders(struct R2RigidBodyHandle handle,
9282 struct R2ColliderHandle *buffer,
9283 size_t capacity);
9284
9285#if defined(RAPIER_DIM3)
9290RAPIER_API R2Bool RAPIER_CALL r2RigidBody_GyroscopicForcesEnabled(struct R2RigidBodyHandle handle);
9291#endif
9292
9293#if defined(RAPIER_DIM3)
9298RAPIER_API
9299R2Status RAPIER_CALL r2RigidBody_SetGyroscopicForcesEnabled(struct R2RigidBodyHandle handle,
9300 R2Bool enabled);
9301#endif
9302
9307RAPIER_API R2Status RAPIER_CALL r2Collider_SetDensity(struct R2ColliderHandle handle, R2Real value);
9308
9313RAPIER_API R2Status RAPIER_CALL r2Collider_SetMass(struct R2ColliderHandle handle, R2Real value);
9314
9319RAPIER_API R2Status RAPIER_CALL r2Collider_SetEnabled(struct R2ColliderHandle handle, R2Bool value);
9320
9325RAPIER_API
9326R2Status RAPIER_CALL r2Collider_SetSolverGroups(struct R2ColliderHandle handle,
9327 struct R2InteractionGroups value);
9328
9333RAPIER_API
9334R2Status RAPIER_CALL r2Collider_SetFrictionCombineRule(struct R2ColliderHandle handle,
9335 uint32_t value);
9336
9341RAPIER_API
9342R2Status RAPIER_CALL r2Collider_SetRestitutionCombineRule(struct R2ColliderHandle handle,
9343 uint32_t value);
9344
9349RAPIER_API R2Status RAPIER_CALL r2Collider_SetContactSkin(struct R2ColliderHandle handle, R2Real value);
9350
9355RAPIER_API
9356R2Status RAPIER_CALL r2Collider_SetContactForceEventThreshold(struct R2ColliderHandle handle,
9357 R2Real value);
9358
9363RAPIER_API
9364R2Status RAPIER_CALL r2Collider_SetActiveEvents(struct R2ColliderHandle handle,
9365 uint32_t value);
9366
9371RAPIER_API R2Status RAPIER_CALL r2Collider_SetActiveHooks(struct R2ColliderHandle handle, uint32_t value);
9372
9377RAPIER_API
9378R2Status RAPIER_CALL r2Collider_SetActiveCollisionTypes(struct R2ColliderHandle handle,
9379 uint16_t value);
9380
9385RAPIER_API struct R2Rotation RAPIER_CALL r2Collider_Rotation(struct R2ColliderHandle handle);
9386
9391RAPIER_API
9392struct R2InteractionGroups RAPIER_CALL r2Collider_CollisionGroups(struct R2ColliderHandle handle);
9393
9398RAPIER_API struct R2InteractionGroups RAPIER_CALL r2Collider_SolverGroups(struct R2ColliderHandle handle);
9399
9404RAPIER_API struct R2UserData RAPIER_CALL r2Collider_UserData(struct R2ColliderHandle handle);
9405
9411RAPIER_API uint32_t RAPIER_CALL r2Collider_ActiveEvents(struct R2ColliderHandle handle);
9412
9417RAPIER_API R2Real RAPIER_CALL r2Collider_Mass(struct R2ColliderHandle handle);
9418
9423RAPIER_API R2Real RAPIER_CALL r2Collider_Density(struct R2ColliderHandle handle);
9424
9429RAPIER_API R2Real RAPIER_CALL r2Collider_Volume(struct R2ColliderHandle handle);
9430
9435RAPIER_API R2Real RAPIER_CALL r2Collider_ContactSkin(struct R2ColliderHandle handle);
9436
9441RAPIER_API R2Real RAPIER_CALL r2Collider_ContactForceEventThreshold(struct R2ColliderHandle handle);
9442
9447RAPIER_API R2Bool RAPIER_CALL r2Collider_IsEnabled(struct R2ColliderHandle handle);
9448
9453RAPIER_API struct R2Aabb RAPIER_CALL r2Collider_ComputeAabb(struct R2ColliderHandle handle);
9454
9459RAPIER_API R2SharedShape *RAPIER_CALL r2Collider_CloneShape(struct R2ColliderHandle handle);
9460
9465RAPIER_API
9466R2Status RAPIER_CALL r2Collider_SetShape(struct R2ColliderHandle handle,
9467 const R2SharedShape *shape);
9468
9473RAPIER_API
9474R2Status RAPIER_CALL r2Collider_SetPositionWrtParent(struct R2ColliderHandle handle,
9475 struct R2Pose value);
9476
9482RAPIER_API R2Status RAPIER_CALL r2RigidBody_ValidateHandle(struct R2RigidBodyHandle handle);
9483
9489RAPIER_API R2Status RAPIER_CALL r2Collider_ValidateHandle(struct R2ColliderHandle handle);
9490
9496RAPIER_API R2Status RAPIER_CALL r2SoftBody_ValidateHandle(struct R2SoftBodyHandle handle);
9497
9502RAPIER_API
9503R2Status RAPIER_CALL r2JointDesc_SetLocalFrame1(struct R2JointDesc *desc,
9504 struct R2Pose value);
9505
9511RAPIER_API
9512R2Status RAPIER_CALL r2ImpulseJoint_SetLocalFrame1(struct R2ImpulseJointHandle handle,
9513 struct R2Pose value,
9514 R2Bool wake_up);
9515
9520RAPIER_API
9521R2Status RAPIER_CALL r2JointDesc_SetLocalFrame2(struct R2JointDesc *desc,
9522 struct R2Pose value);
9523
9529RAPIER_API
9530R2Status RAPIER_CALL r2ImpulseJoint_SetLocalFrame2(struct R2ImpulseJointHandle handle,
9531 struct R2Pose value,
9532 R2Bool wake_up);
9533
9538RAPIER_API
9539R2Status RAPIER_CALL r2JointDesc_SetLocalAnchor1(struct R2JointDesc *desc,
9540 struct R2Vector value);
9541
9547RAPIER_API
9548R2Status RAPIER_CALL r2ImpulseJoint_SetLocalAnchor1(struct R2ImpulseJointHandle handle,
9549 struct R2Vector value,
9550 R2Bool wake_up);
9551
9556RAPIER_API
9557R2Status RAPIER_CALL r2JointDesc_SetLocalAnchor2(struct R2JointDesc *desc,
9558 struct R2Vector value);
9559
9565RAPIER_API
9566R2Status RAPIER_CALL r2ImpulseJoint_SetLocalAnchor2(struct R2ImpulseJointHandle handle,
9567 struct R2Vector value,
9568 R2Bool wake_up);
9569
9574RAPIER_API R2Status RAPIER_CALL r2JointDesc_SetContactsEnabled(struct R2JointDesc *desc, R2Bool value);
9575
9581RAPIER_API
9582R2Status RAPIER_CALL r2ImpulseJoint_SetContactsEnabled(struct R2ImpulseJointHandle handle,
9583 R2Bool value,
9584 R2Bool wake_up);
9585
9590RAPIER_API R2Status RAPIER_CALL r2JointDesc_SetEnabled(struct R2JointDesc *desc, R2Bool value);
9591
9597RAPIER_API
9598R2Status RAPIER_CALL r2ImpulseJoint_SetEnabled(struct R2ImpulseJointHandle handle,
9599 R2Bool value,
9600 R2Bool wake_up);
9601
9606RAPIER_API
9607R2Status RAPIER_CALL r2JointDesc_SetSoftness(struct R2JointDesc *desc,
9608 struct R2SpringCoefficients value);
9609
9615RAPIER_API
9616R2Status RAPIER_CALL r2ImpulseJoint_SetSoftness(struct R2ImpulseJointHandle handle,
9617 struct R2SpringCoefficients value,
9618 R2Bool wake_up);
9619
9624RAPIER_API R2Status RAPIER_CALL r2JointDesc_SetLockedAxes(struct R2JointDesc *desc, uint8_t value);
9625
9631RAPIER_API
9632R2Status RAPIER_CALL r2ImpulseJoint_SetLockedAxes(struct R2ImpulseJointHandle handle,
9633 uint8_t value,
9634 R2Bool wake_up);
9635
9640RAPIER_API R2Status RAPIER_CALL r2JointDesc_SetLimitAxes(struct R2JointDesc *desc, uint8_t value);
9641
9647RAPIER_API
9648R2Status RAPIER_CALL r2ImpulseJoint_SetLimitAxes(struct R2ImpulseJointHandle handle,
9649 uint8_t value,
9650 R2Bool wake_up);
9651
9656RAPIER_API R2Status RAPIER_CALL r2JointDesc_SetMotorAxes(struct R2JointDesc *desc, uint8_t value);
9657
9663RAPIER_API
9664R2Status RAPIER_CALL r2ImpulseJoint_SetMotorAxes(struct R2ImpulseJointHandle handle,
9665 uint8_t value,
9666 R2Bool wake_up);
9667
9672RAPIER_API R2Status RAPIER_CALL r2JointDesc_SetCoupledAxes(struct R2JointDesc *desc, uint8_t value);
9673
9679RAPIER_API
9680R2Status RAPIER_CALL r2ImpulseJoint_SetCoupledAxes(struct R2ImpulseJointHandle handle,
9681 uint8_t value,
9682 R2Bool wake_up);
9683
9688RAPIER_API
9689R2Status RAPIER_CALL r2JointDesc_SetLocalAxis1(struct R2JointDesc *desc,
9690 struct R2Vector value);
9691
9697RAPIER_API
9698R2Status RAPIER_CALL r2ImpulseJoint_SetLocalAxis1(struct R2ImpulseJointHandle handle,
9699 struct R2Vector value,
9700 R2Bool wake_up);
9701
9706RAPIER_API
9707R2Status RAPIER_CALL r2JointDesc_SetLocalAxis2(struct R2JointDesc *desc,
9708 struct R2Vector value);
9709
9715RAPIER_API
9716R2Status RAPIER_CALL r2ImpulseJoint_SetLocalAxis2(struct R2ImpulseJointHandle handle,
9717 struct R2Vector value,
9718 R2Bool wake_up);
9719
9724RAPIER_API
9725R2Status RAPIER_CALL r2JointDesc_SetLimits(struct R2JointDesc *desc,
9726 uint32_t joint_axis,
9727 R2Real min,
9728 R2Real max);
9729
9736RAPIER_API
9737R2Status RAPIER_CALL r2ImpulseJoint_SetLimits(struct R2ImpulseJointHandle handle,
9738 uint32_t joint_axis,
9739 R2Real min,
9740 R2Real max,
9741 R2Bool wake_up);
9742
9747RAPIER_API
9748R2Status RAPIER_CALL r2JointDesc_SetMotor(struct R2JointDesc *desc,
9749 uint32_t joint_axis,
9750 R2Real target_position,
9751 R2Real target_velocity,
9752 R2Real stiffness,
9753 R2Real damping);
9754
9760RAPIER_API
9761R2Status RAPIER_CALL r2ImpulseJoint_SetMotor(struct R2ImpulseJointHandle handle,
9762 uint32_t joint_axis,
9763 R2Real target_position,
9764 R2Real target_velocity,
9765 R2Real stiffness,
9766 R2Real damping,
9767 R2Bool wake_up);
9768
9773RAPIER_API
9774R2Status RAPIER_CALL r2JointDesc_SetMotorMaxForce(struct R2JointDesc *desc,
9775 uint32_t joint_axis,
9776 R2Real max_force);
9777
9783RAPIER_API
9784R2Status RAPIER_CALL r2ImpulseJoint_SetMotorMaxForce(struct R2ImpulseJointHandle handle,
9785 uint32_t joint_axis,
9786 R2Real max_force,
9787 R2Bool wake_up);
9788
9793RAPIER_API
9794R2Status RAPIER_CALL r2JointDesc_SetMotorModel(struct R2JointDesc *desc,
9795 uint32_t joint_axis,
9796 uint32_t model);
9797
9803RAPIER_API
9804R2Status RAPIER_CALL r2ImpulseJoint_SetMotorModel(struct R2ImpulseJointHandle handle,
9805 uint32_t joint_axis,
9806 uint32_t model,
9807 R2Bool wake_up);
9808
9813RAPIER_API
9814R2Status RAPIER_CALL r2JointDesc_SetUserData(struct R2JointDesc *desc,
9815 struct R2UserData value);
9816
9822RAPIER_API
9823R2Status RAPIER_CALL r2ImpulseJoint_SetUserData(struct R2ImpulseJointHandle handle,
9824 struct R2UserData value,
9825 R2Bool wake_up);
9826
9831RAPIER_API
9832R2Status RAPIER_CALL r2JointDesc_SetMotorPosition(struct R2JointDesc *desc,
9833 uint32_t joint_axis,
9834 R2Real target_position,
9835 R2Real stiffness,
9836 R2Real damping);
9837
9843RAPIER_API
9844R2Status RAPIER_CALL r2ImpulseJoint_SetMotorPosition(struct R2ImpulseJointHandle handle,
9845 uint32_t joint_axis,
9846 R2Real target_position,
9847 R2Real stiffness,
9848 R2Real damping,
9849 R2Bool wake_up);
9850
9855RAPIER_API
9856R2Status RAPIER_CALL r2JointDesc_SetMotorVelocity(struct R2JointDesc *desc,
9857 uint32_t joint_axis,
9858 R2Real target_velocity,
9859 R2Real factor);
9860
9866RAPIER_API
9867R2Status RAPIER_CALL r2ImpulseJoint_SetMotorVelocity(struct R2ImpulseJointHandle handle,
9868 uint32_t joint_axis,
9869 R2Real target_velocity,
9870 R2Real factor,
9871 R2Bool wake_up);
9872
9878RAPIER_API struct R2JointImpulses RAPIER_CALL r2ImpulseJoint_Impulses(struct R2ImpulseJointHandle handle);
9879
9884RAPIER_API struct R2UserData RAPIER_CALL r2ImpulseJoint_UserData(struct R2ImpulseJointHandle handle);
9885
9890RAPIER_API size_t RAPIER_CALL r2ImpulseJointCount(const struct R2World *world);
9891
9897RAPIER_API size_t RAPIER_CALL r2MultibodyJointCount(const struct R2World *world);
9898
9903RAPIER_API struct R2JointDesc RAPIER_CALL r2MultibodyJoint_Desc(struct R2MultibodyJointHandle handle);
9904
9911RAPIER_API
9912R2Status RAPIER_CALL r2MultibodyJoint_SetDesc(struct R2MultibodyJointHandle handle,
9913 const struct R2JointDesc *desc,
9914 R2Bool wake_up);
9915
9920RAPIER_API struct R2JointBodies RAPIER_CALL r2MultibodyJoint_Bodies(struct R2MultibodyJointHandle handle);
9921
9928RAPIER_API
9929R2SharedShape *RAPIER_CALL r2ConvexDecompositionSharedShape(struct R2VectorView vertices,
9930 R2SurfaceElementView indices);
9931
9938RAPIER_API
9939R2SharedShape *RAPIER_CALL r2VoxelsSharedShapeFromPoints(struct R2Vector voxel_size,
9940 struct R2VectorView points);
9941
9948RAPIER_API
9949R2SharedShape *RAPIER_CALL r2VoxelizedMeshSharedShape(struct R2VectorView vertices,
9950 R2SurfaceElementView indices,
9951 R2Real voxel_size);
9952
9958RAPIER_API R2SharedShape *RAPIER_CALL r2ConvexHullSharedShape(struct R2VectorView vertices);
9959
9960#if defined(RAPIER_DIM3)
9967RAPIER_API
9968R2SharedShape *RAPIER_CALL r2ConvexMeshSharedShape(struct R2VectorView vertices,
9969 struct R2TriangleView indices);
9970#endif
9971
9978RAPIER_API
9979R2SharedShape *RAPIER_CALL r2TrimeshSharedShape(struct R2VectorView vertices,
9980 struct R2TriangleView indices);
9981
9988RAPIER_API
9989R2SharedShape *RAPIER_CALL r2PolylineSharedShape(struct R2VectorView vertices,
9990 struct R2EdgeView indices);
9991
9992#if defined(RAPIER_DIM2)
9999RAPIER_API
10000R2SharedShape *RAPIER_CALL r2OrientedPolylineSharedShape(struct R2VectorView vertices,
10001 struct R2EdgeView indices);
10002#endif
10003
10004#if defined(RAPIER_DIM2)
10011RAPIER_API R2SharedShape *RAPIER_CALL r2ConvexPolylineSharedShape(struct R2VectorView vertices);
10012#endif
10013
10019RAPIER_API
10020R2SharedShape *RAPIER_CALL r2RoundConvexHullSharedShape(struct R2VectorView vertices,
10021 R2Real border_radius);
10022
10029RAPIER_API
10030R2SharedShape *RAPIER_CALL r2TrimeshSharedShapeWithFlags(struct R2VectorView vertices,
10031 struct R2TriangleView indices,
10032 uint32_t flags);
10033
10038RAPIER_API struct R2World *RAPIER_CALL r2NewWorld(void);
10039
10045RAPIER_API R2Status RAPIER_CALL r2FreeWorld(struct R2World *world);
10046
10052RAPIER_API
10053struct R2VelocityCorrection RAPIER_CALL r2ReadPidController_RigidBodyCorrection(const struct R2ReadContext *context,
10054 struct R2PidController *controller,
10055 R2Real dt,
10056 struct R2RigidBodyHandle body,
10057 struct R2Pose target_pose,
10058 struct R2Vector target_linvel,
10059 R2AngVector target_angvel);
10060
10066RAPIER_API
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);
10073
10079RAPIER_API size_t RAPIER_CALL r2ReadRigidBodyCount(const struct R2ReadContext *context);
10080
10086RAPIER_API
10087size_t RAPIER_CALL r2ReadRigidBodyHandles(const struct R2ReadContext *context,
10088 struct R2RigidBodyHandle *buffer,
10089 size_t capacity);
10090
10096RAPIER_API
10097R2Bool RAPIER_CALL r2ReadRigidBody_Contains(const struct R2ReadContext *context,
10098 struct R2RigidBodyHandle handle);
10099
10105RAPIER_API size_t RAPIER_CALL r2ReadColliderCount(const struct R2ReadContext *context);
10106
10112RAPIER_API
10113size_t RAPIER_CALL r2ReadColliderHandles(const struct R2ReadContext *context,
10114 struct R2ColliderHandle *buffer,
10115 size_t capacity);
10116
10122RAPIER_API
10123R2Bool RAPIER_CALL r2ReadCollider_Contains(const struct R2ReadContext *context,
10124 struct R2ColliderHandle handle);
10125
10132RAPIER_API
10133size_t RAPIER_CALL r2ReadCollider_ShapeIdentity(const struct R2ReadContext *context,
10134 struct R2ColliderHandle handle);
10135
10141RAPIER_API
10142struct R2MassProperties RAPIER_CALL r2ReadCollider_MassProperties(const struct R2ReadContext *context,
10143 struct R2ColliderHandle handle);
10144
10150RAPIER_API
10151uint8_t RAPIER_CALL r2ReadRigidBody_LockedAxes(const struct R2ReadContext *context,
10152 struct R2RigidBodyHandle handle);
10153
10159RAPIER_API
10160R2Bool RAPIER_CALL r2ReadCollider_IsVoxels(const struct R2ReadContext *context,
10161 struct R2ColliderHandle handle);
10162
10168RAPIER_API
10169struct R2VoxelQuery RAPIER_CALL r2ReadCollider_VoxelAtFlatId(const struct R2ReadContext *context,
10170 struct R2ColliderHandle handle,
10171 uint32_t id);
10172
10178RAPIER_API
10179struct R2Pose RAPIER_CALL r2ReadRigidBody_NextPosition(const struct R2ReadContext *context,
10180 struct R2RigidBodyHandle handle);
10181
10187RAPIER_API
10188struct R2Rotation RAPIER_CALL r2ReadRigidBody_Rotation(const struct R2ReadContext *context,
10189 struct R2RigidBodyHandle handle);
10190
10196RAPIER_API
10197struct R2Vector RAPIER_CALL r2ReadRigidBody_CenterOfMass(const struct R2ReadContext *context,
10198 struct R2RigidBodyHandle handle);
10199
10205RAPIER_API
10206struct R2Vector RAPIER_CALL r2ReadRigidBody_LocalCenterOfMass(const struct R2ReadContext *context,
10207 struct R2RigidBodyHandle handle);
10208
10214RAPIER_API
10215struct R2Vector RAPIER_CALL r2ReadRigidBody_UserForce(const struct R2ReadContext *context,
10216 struct R2RigidBodyHandle handle);
10217
10223RAPIER_API
10224R2AngVector RAPIER_CALL r2ReadRigidBody_UserTorque(const struct R2ReadContext *context,
10225 struct R2RigidBodyHandle handle);
10226
10232RAPIER_API
10233uint32_t RAPIER_CALL r2ReadRigidBody_BodyType(const struct R2ReadContext *context,
10234 struct R2RigidBodyHandle handle);
10235
10241RAPIER_API
10242R2Real RAPIER_CALL r2ReadRigidBody_Mass(const struct R2ReadContext *context,
10243 struct R2RigidBodyHandle handle);
10244
10250RAPIER_API
10251R2Real RAPIER_CALL r2ReadRigidBody_GravityScale(const struct R2ReadContext *context,
10252 struct R2RigidBodyHandle handle);
10253
10259RAPIER_API
10260R2Real RAPIER_CALL r2ReadRigidBody_LinearDamping(const struct R2ReadContext *context,
10261 struct R2RigidBodyHandle handle);
10262
10268RAPIER_API
10269R2Real RAPIER_CALL r2ReadRigidBody_AngularDamping(const struct R2ReadContext *context,
10270 struct R2RigidBodyHandle handle);
10271
10277RAPIER_API
10278R2Real RAPIER_CALL r2ReadRigidBody_KineticEnergy(const struct R2ReadContext *context,
10279 struct R2RigidBodyHandle handle);
10280
10286RAPIER_API
10287R2Real RAPIER_CALL r2ReadRigidBody_SoftCcdPrediction(const struct R2ReadContext *context,
10288 struct R2RigidBodyHandle handle);
10289
10295RAPIER_API
10296R2Bool RAPIER_CALL r2ReadRigidBody_IsCcdEnabled(const struct R2ReadContext *context,
10297 struct R2RigidBodyHandle handle);
10298
10304RAPIER_API
10305R2Bool RAPIER_CALL r2ReadRigidBody_IsDynamic(const struct R2ReadContext *context,
10306 struct R2RigidBodyHandle handle);
10307
10313RAPIER_API
10314struct R2SoftBodyHandle RAPIER_CALL r2ReadRigidBody_SoftBody(const struct R2ReadContext *context,
10315 struct R2RigidBodyHandle handle);
10316
10322RAPIER_API
10323R2Bool RAPIER_CALL r2ReadRigidBody_IsSoftFrame(const struct R2ReadContext *context,
10324 struct R2RigidBodyHandle handle);
10325
10331RAPIER_API
10332R2Bool RAPIER_CALL r2ReadRigidBody_IsFixed(const struct R2ReadContext *context,
10333 struct R2RigidBodyHandle handle);
10334
10340RAPIER_API
10341R2Bool RAPIER_CALL r2ReadRigidBody_IsKinematic(const struct R2ReadContext *context,
10342 struct R2RigidBodyHandle handle);
10343
10349RAPIER_API
10350R2Bool RAPIER_CALL r2ReadRigidBody_IsMoving(const struct R2ReadContext *context,
10351 struct R2RigidBodyHandle handle);
10352
10358RAPIER_API
10359R2Bool RAPIER_CALL r2ReadRigidBody_IsCcdActive(const struct R2ReadContext *context,
10360 struct R2RigidBodyHandle handle);
10361
10367RAPIER_API
10368struct R2Vector RAPIER_CALL r2ReadRigidBody_VelocityAtPoint(const struct R2ReadContext *context,
10369 struct R2RigidBodyHandle handle,
10370 struct R2Vector point);
10371
10378RAPIER_API
10379size_t RAPIER_CALL r2ReadRigidBody_Colliders(const struct R2ReadContext *context,
10380 struct R2RigidBodyHandle handle,
10381 struct R2ColliderHandle *buffer,
10382 size_t capacity);
10383
10384#if defined(RAPIER_DIM3)
10390RAPIER_API
10391R2Bool RAPIER_CALL r2ReadRigidBody_GyroscopicForcesEnabled(const struct R2ReadContext *context,
10392 struct R2RigidBodyHandle handle);
10393#endif
10394
10400RAPIER_API
10401struct R2Rotation RAPIER_CALL r2ReadCollider_Rotation(const struct R2ReadContext *context,
10402 struct R2ColliderHandle handle);
10403
10409RAPIER_API
10410struct R2InteractionGroups RAPIER_CALL r2ReadCollider_CollisionGroups(const struct R2ReadContext *context,
10411 struct R2ColliderHandle handle);
10412
10418RAPIER_API
10419struct R2InteractionGroups RAPIER_CALL r2ReadCollider_SolverGroups(const struct R2ReadContext *context,
10420 struct R2ColliderHandle handle);
10421
10427RAPIER_API
10428struct R2UserData RAPIER_CALL r2ReadCollider_UserData(const struct R2ReadContext *context,
10429 struct R2ColliderHandle handle);
10430
10436RAPIER_API
10437uint32_t RAPIER_CALL r2ReadCollider_ActiveEvents(const struct R2ReadContext *context,
10438 struct R2ColliderHandle handle);
10439
10444RAPIER_API
10445R2Real RAPIER_CALL r2ReadCollider_Mass(const struct R2ReadContext *context,
10446 struct R2ColliderHandle handle);
10447
10453RAPIER_API
10454R2Real RAPIER_CALL r2ReadCollider_Density(const struct R2ReadContext *context,
10455 struct R2ColliderHandle handle);
10456
10462RAPIER_API
10463R2Real RAPIER_CALL r2ReadCollider_Volume(const struct R2ReadContext *context,
10464 struct R2ColliderHandle handle);
10465
10471RAPIER_API
10472R2Real RAPIER_CALL r2ReadCollider_ContactSkin(const struct R2ReadContext *context,
10473 struct R2ColliderHandle handle);
10474
10480RAPIER_API
10481R2Real RAPIER_CALL r2ReadCollider_ContactForceEventThreshold(const struct R2ReadContext *context,
10482 struct R2ColliderHandle handle);
10483
10489RAPIER_API
10490R2Bool RAPIER_CALL r2ReadCollider_IsEnabled(const struct R2ReadContext *context,
10491 struct R2ColliderHandle handle);
10492
10498RAPIER_API
10499struct R2Aabb RAPIER_CALL r2ReadCollider_ComputeAabb(const struct R2ReadContext *context,
10500 struct R2ColliderHandle handle);
10501
10508RAPIER_API
10509R2SharedShape *RAPIER_CALL r2ReadCollider_CloneShape(const struct R2ReadContext *context,
10510 struct R2ColliderHandle handle);
10511
10517RAPIER_API
10518R2Status RAPIER_CALL r2ReadRigidBody_ValidateHandle(const struct R2ReadContext *context,
10519 struct R2RigidBodyHandle handle);
10520
10526RAPIER_API
10527R2Status RAPIER_CALL r2ReadCollider_ValidateHandle(const struct R2ReadContext *context,
10528 struct R2ColliderHandle handle);
10529
10535RAPIER_API
10536struct R2Pose RAPIER_CALL r2ReadRigidBody_Position(const struct R2ReadContext *context,
10537 struct R2RigidBodyHandle handle);
10538
10544RAPIER_API
10545struct R2Vector RAPIER_CALL r2ReadRigidBody_Translation(const struct R2ReadContext *context,
10546 struct R2RigidBodyHandle handle);
10547
10553RAPIER_API
10554struct R2Vector RAPIER_CALL r2ReadRigidBody_Linvel(const struct R2ReadContext *context,
10555 struct R2RigidBodyHandle handle);
10556
10562RAPIER_API
10563R2AngVector RAPIER_CALL r2ReadRigidBody_Angvel(const struct R2ReadContext *context,
10564 struct R2RigidBodyHandle handle);
10565
10571RAPIER_API
10572R2Bool RAPIER_CALL r2ReadRigidBody_IsSleeping(const struct R2ReadContext *context,
10573 struct R2RigidBodyHandle handle);
10574
10580RAPIER_API
10581R2Bool RAPIER_CALL r2ReadRigidBody_IsEnabled(const struct R2ReadContext *context,
10582 struct R2RigidBodyHandle handle);
10583
10589RAPIER_API
10590struct R2UserData RAPIER_CALL r2ReadRigidBody_UserData(const struct R2ReadContext *context,
10591 struct R2RigidBodyHandle handle);
10592
10598RAPIER_API
10599struct R2Pose RAPIER_CALL r2ReadCollider_Position(const struct R2ReadContext *context,
10600 struct R2ColliderHandle handle);
10601
10607RAPIER_API
10608struct R2Vector RAPIER_CALL r2ReadCollider_Translation(const struct R2ReadContext *context,
10609 struct R2ColliderHandle handle);
10610
10616RAPIER_API
10617R2Real RAPIER_CALL r2ReadCollider_Friction(const struct R2ReadContext *context,
10618 struct R2ColliderHandle handle);
10619
10625RAPIER_API
10626R2Real RAPIER_CALL r2ReadCollider_Restitution(const struct R2ReadContext *context,
10627 struct R2ColliderHandle handle);
10628
10634RAPIER_API
10635R2Bool RAPIER_CALL r2ReadCollider_IsSensor(const struct R2ReadContext *context,
10636 struct R2ColliderHandle handle);
10637
10643RAPIER_API
10644struct R2RigidBodyHandle RAPIER_CALL r2ReadCollider_Parent(const struct R2ReadContext *context,
10645 struct R2ColliderHandle handle);
10646
10653RAPIER_API
10654size_t RAPIER_CALL r2ReadRigidBodyReadStates(const struct R2ReadContext *context,
10655 const struct R2RigidBodyHandle *handles,
10656 size_t handle_count,
10657 struct R2RigidBodyState *states,
10658 size_t capacity);
10659
10665RAPIER_API
10666uint16_t RAPIER_CALL r2ReadCollider_ActiveCollisionTypes(const struct R2ReadContext *context,
10667 struct R2ColliderHandle handle);
10668
10674RAPIER_API
10675uint32_t RAPIER_CALL r2ReadCollider_ActiveHooks(const struct R2ReadContext *context,
10676 struct R2ColliderHandle handle);
10677
10683RAPIER_API
10684uint32_t RAPIER_CALL r2ReadCollider_FrictionCombineRule(const struct R2ReadContext *context,
10685 struct R2ColliderHandle handle);
10686
10692RAPIER_API
10693uint32_t RAPIER_CALL r2ReadCollider_RestitutionCombineRule(const struct R2ReadContext *context,
10694 struct R2ColliderHandle handle);
10695
10702RAPIER_API
10703struct R2Pose RAPIER_CALL r2ReadCollider_PositionWrtParent(const struct R2ReadContext *context,
10704 struct R2ColliderHandle handle);
10705
10711RAPIER_API
10712int8_t RAPIER_CALL r2ReadRigidBody_DominanceGroup(const struct R2ReadContext *context,
10713 struct R2RigidBodyHandle handle);
10714
10720RAPIER_API
10721size_t RAPIER_CALL r2ReadRigidBody_AdditionalSolverIterations(const struct R2ReadContext *context,
10722 struct R2RigidBodyHandle handle);
10723
10729RAPIER_API
10730size_t RAPIER_CALL r2ReadRigidBody_AdditionalPgsIterations(const struct R2ReadContext *context,
10731 struct R2RigidBodyHandle handle);
10732
10738RAPIER_API
10739R2Bool RAPIER_CALL r2ReadRigidBody_IsFastRotationAllowed(const struct R2ReadContext *context,
10740 struct R2RigidBodyHandle handle);
10741
10751RAPIER_API
10752size_t RAPIER_CALL r2IntersectRay(const struct R2World *world,
10753 const struct R2QueryOptions *query_options,
10754 struct R2Vector origin,
10755 struct R2Vector direction,
10756 R2Real max_toi,
10757 R2Bool solid,
10758 struct R2RayHit *buffer,
10759 size_t capacity);
10760
10768RAPIER_API
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);
10775
10783RAPIER_API
10784struct R2OptionalPointProjection RAPIER_CALL r2TryProjectPoint(const struct R2World *world,
10785 const struct R2QueryOptions *query_options,
10786 struct R2Vector point,
10787 R2Real max_distance,
10788 R2Bool solid);
10789
10794RAPIER_API
10795struct R2Pose RAPIER_CALL r2NonlinearRigidMotion_PositionAtTime(const struct R2NonlinearRigidMotion *motion,
10796 R2Real time);
10797
10808RAPIER_API
10809struct R2OptionalShapeCastHit RAPIER_CALL r2TryCastShapeNonlinear(const struct R2World *world,
10810 const struct R2QueryOptions *query_options,
10811 const struct R2NonlinearRigidMotion *motion,
10812 const R2SharedShape *shape,
10813 R2Real start_time,
10814 R2Real end_time,
10815 R2Bool stop_at_penetration);
10816
10823RAPIER_API
10824struct R2OptionalContactPair RAPIER_CALL r2TryContactPair(struct R2ColliderHandle collider1,
10825 struct R2ColliderHandle collider2);
10826
10832RAPIER_API
10833struct R2IntersectionPair RAPIER_CALL r2IntersectionPair(struct R2ColliderHandle collider1,
10834 struct R2ColliderHandle collider2);
10835
10841RAPIER_API
10842struct R2OptionalIntersectionPair RAPIER_CALL r2TryIntersectionPair(struct R2ColliderHandle collider1,
10843 struct R2ColliderHandle collider2);
10844
10851RAPIER_API
10852size_t RAPIER_CALL r2Collider_ContactPairs(struct R2ColliderHandle handle,
10853 struct R2ContactPair *buffer,
10854 size_t capacity);
10855
10862RAPIER_API
10863size_t RAPIER_CALL r2Collider_IntersectionPairs(struct R2ColliderHandle handle,
10864 struct R2IntersectionPair *buffer,
10865 size_t capacity);
10866
10874RAPIER_API
10875size_t RAPIER_CALL r2ContactManifolds(struct R2ColliderHandle collider1,
10876 struct R2ColliderHandle collider2,
10877 struct R2ContactManifold *buffer,
10878 size_t capacity);
10879
10887RAPIER_API
10888size_t RAPIER_CALL r2SolverContacts(struct R2ColliderHandle collider1,
10889 struct R2ColliderHandle collider2,
10890 size_t manifold_index,
10891 struct R2SolverContact *buffer,
10892 size_t capacity);
10893
10899RAPIER_API
10900R2Bool RAPIER_CALL r2ContactModificationContext_IsSoft(const struct R2ContactModificationContext *context);
10901
10906RAPIER_API
10907size_t RAPIER_CALL r2ContactModificationContext_SolverContactCount(const struct R2ContactModificationContext *context);
10908
10913RAPIER_API
10914struct R2SolverContact RAPIER_CALL r2ContactModificationContext_SolverContact(const struct R2ContactModificationContext *context,
10915 size_t index);
10916
10922RAPIER_API
10923R2Status RAPIER_CALL r2ContactModificationContext_SetSolverContact(struct R2ContactModificationContext *context,
10924 size_t index,
10925 const struct R2SolverContact *contact);
10926
10931RAPIER_API
10932R2Status RAPIER_CALL r2ContactModificationContext_RemoveSolverContact(struct R2ContactModificationContext *context,
10933 size_t index);
10934
10940RAPIER_API
10941R2Status RAPIER_CALL r2EventCollector_SetCallbacks(struct R2EventCollector *events,
10942 const struct R2EventCallbacks *callbacks);
10943
10948RAPIER_API struct R2DebugRenderStyle RAPIER_CALL r2DefaultDebugRenderStyle(void);
10949
10956RAPIER_API
10957size_t RAPIER_CALL r2DebugRenderWithStyle(const struct R2World *world,
10958 uint32_t mode,
10959 const struct R2DebugRenderStyle *style,
10960 struct R2DebugLine *buffer,
10961 size_t capacity);
10962
10963#ifdef __cplusplus
10964} // extern "C"
10965#endif // __cplusplus
10966
10967#else /* RAPIER_DIM3 */
10968
10969#if defined(RAPIER_DIM3)
10975#define R3_FRICTION_MODEL_SIMPLIFIED 0
10976#endif
10977
10978#if defined(RAPIER_DIM3)
10983#define R3_FRICTION_MODEL_COULOMB 1
10984#endif
10985
10986#if defined(RAPIER_DIM2)
10991#define R3_JOINT_DOF_COUNT 3
10992#endif
10993
10994#if defined(RAPIER_DIM3)
10999#define R3_JOINT_DOF_COUNT 6
11000#endif
11001
11006#define R3_SOFT_DESC_PARTICLES 0
11007
11012#define R3_SOFT_DESC_ROPE 1
11013
11018#define R3_SOFT_DESC_GRID 2
11019
11024#define R3_SOFT_DESC_CLOTH 3
11025
11030#define R3_SOFT_DESC_CUBOID 4
11031
11036#define R3_SOFT_DESC_SURFACE 5
11037
11042#define R3_SOFT_DESC_DISK 6
11043
11048#define R3_SOFT_DESC_SPHERE 7
11049
11054#define R3_SOFT_DESC_CLOTH_TUBE 8
11055
11060#define R3_SOFT_DESC_VOLUMETRIC 9
11061
11062#if defined(RAPIER_DIM2)
11067#define R3_SOFT_DESC_POLYGON 10
11068#endif
11069
11070#if defined(RAPIER_DIM2)
11075#define R3_SOFT_DESC_TRIMESH 11
11076#endif
11077
11078#if defined(RAPIER_DIM3)
11083#define R3_SOFT_DESC_CLOTH_ANISOTROPIC 12
11084#endif
11085
11090#define R3_SOFT_BINDING_SKINNED 0
11091
11096#define R3_SOFT_BINDING_DIRECT 1
11097
11102#define R3_SOFT_BINDING_DIRECT_BY_POSITION 2
11103
11104#if defined(RAPIER_DIM2)
11109#define R3_POLYLINE_ORIENTED 1
11110#endif
11111
11116#define R3_POLYLINE_DEFORMABLE 2
11117
11122#define R3_SHAPE_DESC_BALL 0
11123
11128#define R3_SHAPE_DESC_CUBOID 1
11129
11134#define R3_SHAPE_DESC_ROUND_CUBOID 2
11135
11140#define R3_SHAPE_DESC_CAPSULE 3
11141
11146#define R3_SHAPE_DESC_SEGMENT 4
11147
11152#define R3_SHAPE_DESC_TRIANGLE 5
11153
11158#define R3_SHAPE_DESC_HALFSPACE 6
11159
11164#define R3_SHAPE_DESC_CONVEX_HULL 7
11165
11170#define R3_SHAPE_DESC_TRIMESH 8
11171
11176#define R3_SHAPE_DESC_POLYLINE 9
11177
11182#define R3_SHAPE_DESC_SHARED 10
11183
11188#define R3_SHAPE_DESC_HEIGHTFIELD 11
11189
11194#define R3_SHAPE_DESC_CYLINDER 12
11195
11200#define R3_SHAPE_DESC_CONE 13
11201
11206#define R3_SHAPE_DESC_COMPOUND 14
11207
11212#define R3_SHAPE_DESC_ROUND_CYLINDER 15
11213
11218#define R3_SHAPE_DESC_ROUND_CONE 16
11219
11224#define R3_MASS_DENSITY 0
11225
11230#define R3_MASS_TOTAL 1
11231
11236#define R3_MASS_PROPERTIES 2
11237
11242#define R3_ABI_VERSION 1
11243
11248#define R3_DYNAMIC 0
11249
11254#define R3_FIXED 1
11255
11260#define R3_KINEMATIC_POSITION_BASED 2
11261
11266#define R3_KINEMATIC_VELOCITY_BASED 3
11267
11272#define R3_COLLISION_EVENTS 1
11273
11278#define R3_CONTACT_FORCE_EVENTS 2
11279
11284#define R3_COMBINE_AVERAGE 0
11285
11290#define R3_COMBINE_MIN 1
11291
11296#define R3_COMBINE_MULTIPLY 2
11297
11302#define R3_COMBINE_MAX 3
11303
11308#define R3_COMBINE_CLAMPED_SUM 4
11309
11314#define R3_COMBINE_GEOMETRIC_MEAN 5
11315
11320#define R3_COLLISION_TYPES_DYNAMIC_DYNAMIC 1
11321
11326#define R3_COLLISION_TYPES_DYNAMIC_KINEMATIC 12
11327
11332#define R3_COLLISION_TYPES_DYNAMIC_FIXED 2
11333
11338#define R3_COLLISION_TYPES_KINEMATIC_KINEMATIC 52224
11339
11344#define R3_COLLISION_TYPES_KINEMATIC_FIXED 8704
11345
11350#define R3_COLLISION_TYPES_FIXED_FIXED 32
11351
11356#define R3_COLLISION_TYPES_DEFAULT 15
11357
11362#define R3_FILTER_CONTACT_PAIRS 1
11363
11368#define R3_FILTER_INTERSECTION_PAIR 2
11369
11374#define R3_MODIFY_SOLVER_CONTACTS 4
11375
11380#define R3_QUERY_EXCLUDE_FIXED 1
11381
11386#define R3_QUERY_EXCLUDE_KINEMATIC 2
11387
11392#define R3_QUERY_EXCLUDE_DYNAMIC 4
11393
11398#define R3_QUERY_EXCLUDE_SENSORS 8
11399
11404#define R3_QUERY_EXCLUDE_SOLIDS 16
11405
11410#define R3_QUERY_ONLY_DYNAMIC 3
11411
11416#define R3_QUERY_ONLY_KINEMATIC 5
11417
11422#define R3_QUERY_ONLY_FIXED 6
11423
11428#define R3_DEBUG_COLLIDER_SHAPES 1
11429
11434#define R3_DEBUG_RIGID_BODY_AXES 2
11435
11440#define R3_DEBUG_MULTIBODY_JOINTS 4
11441
11446#define R3_DEBUG_IMPULSE_JOINTS 8
11447
11452#define R3_DEBUG_SOLVER_CONTACTS 16
11453
11458#define R3_DEBUG_CONTACTS 32
11459
11464#define R3_DEBUG_COLLIDER_AABBS 64
11465
11470#define R3_DEBUG_SOFT_BODIES 128
11471
11476#define R3_DEBUG_PSEUDO_NORMALS 256
11477
11482#define R3_DEBUG_SOFT_VOLUME_CONTACTS 512
11483
11488#define R3_DEBUG_SOFT_BODY_STRESS 1024
11489
11494#define R3_GROUPS_AND 0
11495
11500#define R3_GROUPS_OR 1
11501
11506#define R3_MOTOR_ACCELERATION_BASED 0
11507
11512#define R3_MOTOR_FORCE_BASED 1
11513
11518#define R3_SOFT_CELL_VOLUME 0
11519
11524#define R3_SOFT_CELL_COROTATIONAL 1
11525
11530#define R3_SOFT_CELL_NEO_HOOKEAN 2
11531
11536#define R3_SOFT_SOLVER_CONSTRAINTS 0
11537
11542#define R3_SOFT_SOLVER_FEM 1
11543
11548#define R3_SOFT_EDGE_PLASTIC_FLOW_BOTH 0
11549
11554#define R3_SOFT_EDGE_PLASTIC_FLOW_COMPRESSION 1
11555
11560#define R3_SOFT_EDGE_PLASTIC_FLOW_TENSION 2
11561
11566#define R3_SOFT_PATCH_CONSTRAINTS_KEEP 0
11567
11572#define R3_SOFT_PATCH_CONSTRAINTS_STAND_DOWN 1
11573
11578#define R3_SOFT_PATCH_CONSTRAINTS_ALONG_NORMAL 2
11579
11584#define R3_AXIS_LIN_X 0
11585
11590#define R3_AXIS_LIN_Y 1
11591
11596#define R3_LOCK_TRANSLATION_X 1
11597
11602#define R3_LOCK_TRANSLATION_Y 2
11603
11608#define R3_LOCK_TRANSLATION_Z 4
11609
11614#define R3_LOCK_ROTATION_X 8
11615
11620#define R3_LOCK_ROTATION_Y 16
11621
11626#define R3_LOCK_ROTATION_Z 32
11627
11628#if defined(RAPIER_DIM2)
11633#define R3_AXIS_ANG_X 2
11634#endif
11635
11636#if defined(RAPIER_DIM3)
11641#define R3_AXIS_ANG_X 3
11642#endif
11643
11644#if defined(RAPIER_DIM2)
11649#define R3_JOINT_FIXED_AXES 7
11650#endif
11651
11652#if defined(RAPIER_DIM3)
11657#define R3_JOINT_FIXED_AXES 63
11658#endif
11659
11660#if defined(RAPIER_DIM2)
11665#define R3_JOINT_REVOLUTE_AXES 3
11666#endif
11667
11668#if defined(RAPIER_DIM3)
11673#define R3_JOINT_REVOLUTE_AXES 55
11674#endif
11675
11676#if defined(RAPIER_DIM2)
11681#define R3_JOINT_PRISMATIC_AXES 6
11682#endif
11683
11684#if defined(RAPIER_DIM3)
11689#define R3_JOINT_PRISMATIC_AXES 62
11690#endif
11691
11692#if defined(RAPIER_DIM3)
11697#define R3_AXIS_LIN_Z 2
11698#endif
11699
11700#if defined(RAPIER_DIM3)
11705#define R3_AXIS_ANG_Y 4
11706#endif
11707
11708#if defined(RAPIER_DIM3)
11713#define R3_AXIS_ANG_Z 5
11714#endif
11715
11716#if defined(RAPIER_DIM3)
11721#define R3_JOINT_SPHERICAL_AXES 7
11722#endif
11723
11728#define R3_SOFT_FRAME 4
11729
11734#define R3_SHAPE_CAST_OUT_OF_ITERATIONS 0
11735
11740#define R3_SHAPE_CAST_CONVERGED 1
11741
11746#define R3_SHAPE_CAST_FAILED 2
11747
11752#define R3_SHAPE_CAST_PENETRATING 3
11753
11758#define R3_FEATURE_UNKNOWN 0
11759
11764#define R3_FEATURE_VERTEX 1
11765
11770#define R3_FEATURE_EDGE 2
11771
11776#define R3_FEATURE_FACE 3
11777
11782#define R3_MULTIBODY_JOINTS_ARE_KINEMATIC 1
11783
11788#define R3_MULTIBODY_DISABLE_SELF_CONTACTS 2
11789
11795#define R3_MULTIBODY_SKIP_LOOP_CLOSURES 4
11796
11801#define R3_MULTIBODY_SKIP_JOINT_MOTORS 8
11802
11807#define R3_MULTIBODY_SKIP_JOINT_LIMITS 16
11808
11813#define R3_MULTIBODY_SKIP_JOINT_SPRINGS 32
11814
11819#define R3_TRIMESH_HALF_EDGE_TOPOLOGY 1
11820
11825#define R3_TRIMESH_CONNECTED_COMPONENTS 2
11826
11831#define R3_TRIMESH_DELETE_BAD_TOPOLOGY_TRIANGLES 4
11832
11837#define R3_TRIMESH_ORIENTED 8
11838
11843#define R3_TRIMESH_MERGE_DUPLICATE_VERTICES 16
11844
11849#define R3_TRIMESH_DELETE_DEGENERATE_TRIANGLES 32
11850
11855#define R3_TRIMESH_DELETE_DUPLICATE_TRIANGLES 64
11856
11861#define R3_TRIMESH_FIX_INTERNAL_EDGES 144
11862
11867#define R3_TRIMESH_DEFORMABLE 256
11868
11873#define R3_TRIMESH_FIX_INTERNAL_EDGES_TWO_SIDED 656
11874
11879#define R3_HEIGHTFIELD_FIX_INTERNAL_EDGES 1
11880
11885#define R3_AXES_MASK_LIN_X 1
11886
11891#define R3_AXES_MASK_LIN_Y 2
11892
11893#if defined(RAPIER_DIM3)
11898#define R3_AXES_MASK_LIN_Z 4
11899#endif
11900
11901#if defined(RAPIER_DIM3)
11906#define R3_AXES_MASK_ANG_X 8
11907#endif
11908
11909#if defined(RAPIER_DIM3)
11914#define R3_AXES_MASK_ANG_Y 16
11915#endif
11916
11921#define R3_AXES_MASK_ANG_Z 32
11922
11927#define R3_ABI_FEATURE_FEM 1
11928
11933#define R3_ABI_FEATURE_ROBOTICS 2
11934
11935#if (defined(RAPIER_FEM) && defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
11940#define R3_ABI_FEATURES 3
11941#endif
11942
11943#if (defined(RAPIER_FEM) && !(defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32)))
11948#define R3_ABI_FEATURES 1
11949#endif
11950
11951#if (!defined(RAPIER_FEM) && defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
11956#define R3_ABI_FEATURES 2
11957#endif
11958
11959#if (!defined(RAPIER_FEM) && !(defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32)))
11964#define R3_ABI_FEATURES 0
11965#endif
11966
11967#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
11972#define R3_MESH_CONVERTER_TRIMESH 0
11973#endif
11974
11975#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
11980#define R3_MESH_CONVERTER_OBB 1
11981#endif
11982
11983#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
11988#define R3_MESH_CONVERTER_AABB 2
11989#endif
11990
11991#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
11996#define R3_MESH_CONVERTER_CONVEX_HULL 3
11997#endif
11998
11999#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
12004#define R3_MESH_CONVERTER_CONVEX_DECOMPOSITION 4
12005#endif
12006
12011#define R3_COLLISION_EVENT_SENSOR 1
12012
12017#define R3_COLLISION_EVENT_REMOVED 2
12018
12023typedef struct R3Bytes R3Bytes;
12024
12030
12031#if defined(RAPIER_DIM3)
12037#endif
12038
12046
12054
12055#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
12062#endif
12063
12064#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
12071#endif
12072
12073#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
12079#endif
12080
12081#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
12088#endif
12089
12096
12103
12111
12117
12118#if defined(RAPIER_DIM3)
12124#endif
12125
12126#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
12133#endif
12134
12135#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
12142#endif
12143
12150typedef struct R3World R3World;
12151
12152#if defined(RAPIER_F32)
12157typedef float R3Real;
12158#endif
12159
12160#if defined(RAPIER_F64)
12165typedef double R3Real;
12166#endif
12167
12182
12187typedef uint32_t R3Bool;
12188
12203
12218
12309
12425
12426#if defined(RAPIER_FEM)
12445#endif
12446
12475
12568
12573typedef uint32_t R3Status;
12574
12579typedef struct R3Vector {
12588#if defined(RAPIER_DIM3)
12593#endif
12595
12600typedef struct R3Rotation {
12601#if defined(RAPIER_DIM2)
12605 R3Real angle;
12606#endif
12607#if defined(RAPIER_DIM3)
12612#endif
12613#if defined(RAPIER_DIM3)
12618#endif
12619#if defined(RAPIER_DIM3)
12624#endif
12625#if defined(RAPIER_DIM3)
12630#endif
12632
12648
12663
12694
12699typedef struct R3UserData {
12703 uint64_t low;
12707 uint64_t high;
12709
12765
12786
12793typedef struct R3RigidBodyHandle {
12801 uint32_t index;
12805 uint32_t generation;
12807
12828
12838#if defined(RAPIER_DIM2)
12842 R3Real min_angle;
12843#endif
12844#if defined(RAPIER_DIM3)
12848 uint32_t enclosure;
12849#endif
12850#if defined(RAPIER_DIM3)
12855#endif
12856#if defined(RAPIER_DIM3)
12861#endif
12862#if defined(RAPIER_DIM3)
12867#endif
12869
12877typedef struct R3VectorView {
12881 const struct R3Vector *data;
12885 size_t count;
12887
12895typedef struct R3RealView {
12899 const R3Real *data;
12903 size_t count;
12905
12913typedef struct R3IndexView {
12917 const uint32_t *data;
12921 size_t count;
12923
12928typedef struct R3Edge {
12932 uint32_t a;
12936 uint32_t b;
12938
12946typedef struct R3EdgeView {
12950 const struct R3Edge *data;
12954 size_t count;
12956
12971
12986
13001
13016
13021typedef struct R3Triangle {
13025 uint32_t a;
13029 uint32_t b;
13033 uint32_t c;
13035
13043typedef struct R3TriangleView {
13047 const struct R3Triangle *data;
13051 size_t count;
13053
13058typedef struct R3Tetrahedron {
13062 uint32_t a;
13066 uint32_t b;
13070 uint32_t c;
13074 uint32_t d;
13076
13084typedef struct R3TetrahedronView {
13088 const struct R3Tetrahedron *data;
13092 size_t count;
13094
13095#if defined(RAPIER_DIM2)
13100typedef struct R3TriangleView R3CellView;
13101#endif
13102
13103#if defined(RAPIER_DIM3)
13109#endif
13110
13111#if defined(RAPIER_DIM2)
13116typedef struct R3EdgeView R3SurfaceElementView;
13117#endif
13118
13119#if defined(RAPIER_DIM3)
13125#endif
13126
13131typedef struct R3Dihedral {
13135 uint32_t a;
13139 uint32_t b;
13143 uint32_t c;
13147 uint32_t d;
13149
13157typedef struct R3DihedralView {
13161 const struct R3Dihedral *data;
13165 size_t count;
13167
13184
13199
13205
13206
13221
13300
13315
13316
13317#if defined(RAPIER_DIM2)
13322typedef R3Real R3AngVector;
13323#endif
13324
13325#if defined(RAPIER_DIM3)
13330typedef struct R3Vector R3AngVector;
13331#endif
13332
13358
13377
13464
13475typedef struct R3SoftBodyDesc {
13479 uint32_t kind;
13483 struct R3Vector a;
13487 struct R3Vector b;
13491 struct R3Vector du;
13495 struct R3Vector dv;
13496#if defined(RAPIER_DIM3)
13501#endif
13502#if defined(RAPIER_DIM3)
13507#endif
13508#if defined(RAPIER_DIM3)
13513#endif
13517 size_t nx;
13521 size_t ny;
13525 size_t nz;
13586#if defined(RAPIER_DIM3)
13591#endif
13592#if defined(RAPIER_DIM3)
13597#endif
13625 uint32_t cellModel;
13629 uint32_t solver;
13700
13707typedef struct R3SoftBodyHandle {
13715 uint32_t index;
13719 uint32_t generation;
13721
13744
13751typedef struct R3ColliderHandle {
13759 uint32_t index;
13763 uint32_t generation;
13765
13792
13798typedef R3Bool (RAPIER_CALL *R3QueryPredicate)(void *user_data,
13799 const struct R3ReadContext *read,
13800 struct R3ColliderHandle handle);
13801
13820
13848
13867
13903
13926
13931typedef struct R3Aabb {
13941
13960
13975
14072
14123
14140
14163
14182
14209
14240
14268
14283
14310
14311#if defined(RAPIER_DIM3)
14346#endif
14347
14348#if defined(RAPIER_DIM3)
14395#endif
14396
14404typedef void (RAPIER_CALL *R3ErrorCallback)(R3Status, const char*, void*);
14405
14421
14436
14463
14469
14492
14528
14535typedef int32_t (RAPIER_CALL *R3PairFilter)(void *user_data,
14536 const struct R3ReadContext *read,
14537 struct R3ColliderHandle collider1,
14538 struct R3ColliderHandle collider2,
14539 struct R3RigidBodyHandle body1,
14540 struct R3RigidBodyHandle body2);
14541
14568
14573typedef void (RAPIER_CALL *R3ModifyContacts)(void *user_data,
14574 const struct R3ReadContext *read,
14575 struct R3ColliderHandle collider1,
14576 struct R3ColliderHandle collider2,
14577 struct R3ContactModification *contact);
14578
14583typedef void (RAPIER_CALL *R3ModifyContactContext)(void *user_data,
14584 const struct R3ReadContext *read,
14585 struct R3ColliderHandle collider1,
14586 struct R3ColliderHandle collider2,
14587 struct R3ContactModificationContext *context);
14588
14619
14624typedef struct R3ByteView {
14628 const uint8_t *data;
14632 size_t count;
14634
14639typedef struct R3DebugLine {
14643 struct R3Vector a;
14647 struct R3Vector b;
14651 float color[4];
14653
14668
14695
14714
14733
14738typedef struct R3BuildInfo {
14742 uint32_t abi_version;
14746 uint32_t dimension;
14750 uint32_t real_size;
14756
14780
14815
14834
14839typedef struct R3ContactPoint {
14864#if defined(RAPIER_DIM2)
14869#endif
14870#if defined(RAPIER_DIM3)
14875#endif
14877
14878#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
14926#endif
14927
14928#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
14980#endif
14981
14982#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
14988#endif
14989
14990#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
15013#endif
15014
15015#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
15046#endif
15047
15078
15083typedef struct R3SoftMeshId {
15087 uint32_t cluster;
15091 uint32_t mesh;
15093
15120
15121#if defined(RAPIER_F32)
15126typedef int32_t R3VoxelCoord;
15127#endif
15128
15129#if defined(RAPIER_F64)
15134typedef int64_t R3VoxelCoord;
15135#endif
15136
15141typedef struct R3VoxelKey {
15150#if defined(RAPIER_DIM3)
15155#endif
15157
15180
15203
15218
15233
15257
15272
15287
15327
15350
15357typedef void (RAPIER_CALL *R3CollisionEventCallback)(void *user_data,
15358 const struct R3ReadContext *read,
15359 const struct R3CollisionEvent *event,
15360 const struct R3ContactPoint *contacts,
15361 size_t contact_count);
15362
15367typedef void (RAPIER_CALL *R3ContactForceEventCallback)(void *user_data,
15368 const struct R3ReadContext *read,
15369 const struct R3ContactForceEvent *event);
15370
15392
15509
15514#define R3_OK 0
15515
15520#define R3_NULL_POINTER 1
15521
15526#define R3_INVALID_ARGUMENT 2
15527
15532#define R3_INVALID_HANDLE 3
15533
15538#define R3_BUFFER_TOO_SMALL 4
15539
15544#define R3_UNSUPPORTED 5
15545
15550#define R3_PANIC 6
15551
15556#define R3_NOT_FOUND 7
15557
15562#define R3_WORLD_BUSY 8
15563
15564#ifdef __cplusplus
15565extern "C" {
15566#endif // __cplusplus
15567
15573
15579
15580#if defined(RAPIER_FEM)
15586#endif
15587
15593
15599
15605
15610RAPIER_API
15612 const struct R3IntegrationParameters *data);
15613
15619
15625
15626#if defined(RAPIER_DIM2)
15631RAPIER_API struct R3JointDesc RAPIER_CALL r3RevoluteJointDesc(void);
15632#endif
15633
15634#if defined(RAPIER_DIM3)
15639RAPIER_API struct R3JointDesc RAPIER_CALL r3RevoluteJointDesc(struct R3Vector axis_vector);
15640#endif
15641
15646RAPIER_API struct R3JointDesc RAPIER_CALL r3PrismaticJointDesc(struct R3Vector axis_vector);
15647
15653
15658RAPIER_API
15660 R3Real stiffness,
15661 R3Real damping);
15662
15663#if defined(RAPIER_DIM3)
15669#endif
15670
15671#if defined(RAPIER_DIM2)
15676RAPIER_API struct R3JointDesc RAPIER_CALL r3PinSlotJointDesc(struct R3Vector axis_vector);
15677#endif
15678
15684RAPIER_API
15686 struct R3RigidBodyHandle body2,
15687 const struct R3JointDesc *joint);
15688
15694RAPIER_API
15696 struct R3RigidBodyHandle body2,
15697 const struct R3JointDesc *joint);
15698
15704
15709RAPIER_API
15711 const struct R3SoftBodyDesc *desc);
15712
15718
15724RAPIER_API
15726 const struct R3SoftMeshBindingDesc *binding,
15727 struct R3RigidBodyHandle parent);
15728
15734
15743RAPIER_API
15744struct R3RayHit RAPIER_CALL r3CastRay(const struct R3World *world,
15745 const struct R3QueryOptions *query_options,
15746 struct R3Vector origin,
15747 struct R3Vector direction,
15748 R3Real max_toi,
15749 R3Bool solid);
15750
15758RAPIER_API
15760 const struct R3QueryOptions *query_options,
15761 struct R3Vector point,
15762 R3Real max_distance,
15763 R3Bool solid);
15764
15772RAPIER_API
15774 const struct R3QueryOptions *query_options,
15775 struct R3Pose pose,
15776 struct R3Vector velocity,
15777 const R3SharedShape *shape,
15778 struct R3ShapeCastOptions options);
15779
15787RAPIER_API
15788size_t RAPIER_CALL r3IntersectPoint(const struct R3World *world,
15789 const struct R3QueryOptions *query_options,
15790 struct R3Vector point,
15791 struct R3ColliderHandle *buffer,
15792 size_t capacity);
15793
15802RAPIER_API
15803size_t RAPIER_CALL r3IntersectShape(const struct R3World *world,
15804 const struct R3QueryOptions *query_options,
15805 struct R3Pose pose,
15806 const R3SharedShape *shape,
15807 struct R3ColliderHandle *buffer,
15808 size_t capacity);
15809
15818RAPIER_API
15820 const struct R3QueryOptions *query_options,
15821 struct R3Aabb aabb,
15822 struct R3ColliderHandle *buffer,
15823 size_t capacity);
15824
15832RAPIER_API
15833struct R3RayToi RAPIER_CALL r3CastRayToi(const struct R3World *world,
15834 const struct R3QueryOptions *query_options,
15835 struct R3Vector origin,
15836 struct R3Vector direction,
15837 R3Real max_toi,
15838 R3Bool solid);
15839
15847RAPIER_API
15849 const struct R3QueryOptions *query_options,
15850 struct R3Vector origin,
15851 struct R3Vector direction,
15852 R3Real max_toi,
15853 R3Bool solid);
15854
15860
15866
15872
15878
15884
15891
15897
15904
15910RAPIER_API struct R3ColliderDesc RAPIER_CALL r3CuboidColliderDesc(struct R3Vector half_extents);
15911
15916RAPIER_API
15918 const struct R3RigidBodyDesc *desc);
15919
15926RAPIER_API
15928 const struct R3ColliderDesc *desc);
15929
15935RAPIER_API
15937 const struct R3ColliderDesc *desc);
15938
15943RAPIER_API struct R3PodLayout RAPIER_CALL r3PodLayout(void);
15944
15951
15957RAPIER_API
15959
15964RAPIER_API
15966 struct R3Vector up);
15967
15972RAPIER_API
15974 struct R3CharacterLength offset);
15975
15980RAPIER_API
15982 R3Bool enabled);
15983
15988RAPIER_API
15990 R3Real max_climb_angle,
15991 R3Real min_slide_angle);
15992
15997RAPIER_API
15999 R3Bool enabled,
16000 struct R3CharacterLength max_height,
16001 struct R3CharacterLength min_width,
16002 R3Bool include_dynamic_bodies);
16003
16008RAPIER_API
16010 R3Bool enabled,
16011 struct R3CharacterLength distance);
16012
16017RAPIER_API
16019
16024RAPIER_API
16026
16032RAPIER_API
16034
16040RAPIER_API
16042 R3Real value);
16043
16048RAPIER_API
16050
16058RAPIER_API
16060 const struct R3QueryOptions *options,
16061 struct R3KinematicCharacterController *controller,
16062 R3Real dt,
16063 const R3SharedShape *shape,
16064 struct R3Pose pose,
16065 struct R3Vector desired_translation);
16066
16072RAPIER_API
16074 struct R3CharacterCollision *buffer,
16075 size_t capacity);
16076
16084RAPIER_API
16086 const R3SharedShape *shape,
16087 R3Real dt,
16088 R3Real mass,
16089 const struct R3QueryOptions *options);
16090
16097
16104
16109RAPIER_API struct R3PidGains RAPIER_CALL r3PidController_Gains(const struct R3PidController *controller);
16110
16115RAPIER_API
16117 struct R3PidGains gains);
16118
16124RAPIER_API
16126 uint32_t axes);
16127
16132RAPIER_API uint32_t RAPIER_CALL r3PidController_Axes(const struct R3PidController *controller);
16133
16139
16146
16152RAPIER_API
16154 struct R3RigidBodyHandle body,
16155 struct R3Pose target_pose,
16156 struct R3Vector target_linvel,
16157 R3AngVector target_angvel);
16158
16163RAPIER_API
16165 R3Real dt,
16166 struct R3RigidBodyHandle body,
16167 struct R3Pose target_pose,
16168 struct R3Vector target_linvel,
16169 R3AngVector target_angvel);
16170
16175RAPIER_API
16177
16178#if defined(RAPIER_DIM3)
16184#endif
16185
16186#if defined(RAPIER_DIM3)
16192RAPIER_API
16194#endif
16195
16196#if defined(RAPIER_DIM3)
16202RAPIER_API
16204#endif
16205
16206#if defined(RAPIER_DIM3)
16212RAPIER_API
16214 struct R3Vector connection,
16215 struct R3Vector direction,
16216 struct R3Vector axle,
16217 R3Real rest_length,
16218 R3Real radius,
16219 const struct R3WheelTuning *tuning);
16220#endif
16221
16222#if defined(RAPIER_DIM3)
16227RAPIER_API
16229 size_t up,
16230 size_t forward);
16231#endif
16232
16233#if defined(RAPIER_DIM3)
16238RAPIER_API
16240 size_t index,
16241 R3Real steering,
16242 R3Real engine_force,
16243 R3Real brake);
16244#endif
16245
16246#if defined(RAPIER_DIM3)
16255RAPIER_API
16257 R3Real dt,
16258 const struct R3QueryOptions *options);
16259#endif
16260
16261#if defined(RAPIER_DIM3)
16266RAPIER_API
16268#endif
16269
16270#if defined(RAPIER_DIM3)
16276RAPIER_API
16278 struct R3WheelState *buffer,
16279 size_t capacity);
16280#endif
16281
16287RAPIER_API
16289
16295RAPIER_API
16296size_t RAPIER_CALL r3ActiveRigidBodies(const struct R3World *world,
16297 struct R3RigidBodyHandle *buffer,
16298 size_t capacity);
16299
16305
16314
16323
16328RAPIER_API const char *RAPIER_CALL r3LastError(void);
16329
16335
16341
16346RAPIER_API
16348 R3Real border_radius);
16349
16354RAPIER_API
16356 struct R3Vector b,
16357 R3Real radius);
16358
16364
16369RAPIER_API
16371 struct R3Vector b,
16372 struct R3Vector c);
16373
16379
16380#if defined(RAPIER_DIM3)
16386#endif
16387
16388#if defined(RAPIER_DIM3)
16394#endif
16395
16402
16408
16414
16420RAPIER_API
16421size_t RAPIER_CALL r3ImpulseJointHandles(const struct R3World *world,
16422 struct R3ImpulseJointHandle *buffer,
16423 size_t capacity);
16424
16429RAPIER_API
16431 R3Bool wake_up);
16432
16438RAPIER_API
16440 struct R3MultibodyJointHandle *buffer,
16441 size_t capacity);
16442
16448
16454
16462
16467RAPIER_API
16469 const struct R3InverseKinematicsOptions *options,
16470 struct R3Pose target,
16471 R3IkJointCanMove can_move,
16472 void *user_data,
16473 R3Real *displacements,
16474 size_t count);
16475
16480RAPIER_API
16482 const R3Real *displacements,
16483 size_t count);
16484
16490
16497
16502RAPIER_API size_t RAPIER_CALL r3RigidBodyCount(const struct R3World *world);
16503
16509RAPIER_API
16510size_t RAPIER_CALL r3RigidBodyHandles(const struct R3World *world,
16511 struct R3RigidBodyHandle *buffer,
16512 size_t capacity);
16513
16520
16525RAPIER_API size_t RAPIER_CALL r3ColliderCount(const struct R3World *world);
16526
16532RAPIER_API
16533size_t RAPIER_CALL r3ColliderHandles(const struct R3World *world,
16534 struct R3ColliderHandle *buffer,
16535 size_t capacity);
16536
16542
16547RAPIER_API size_t RAPIER_CALL r3SoftBodyCount(const struct R3World *world);
16548
16554RAPIER_API
16555size_t RAPIER_CALL r3SoftBodyHandles(const struct R3World *world,
16556 struct R3SoftBodyHandle *buffer,
16557 size_t capacity);
16558
16565
16573RAPIER_API
16575 R3Bool remove_attached_colliders);
16576
16581RAPIER_API R3Real RAPIER_CALL r3TimeStep(const struct R3World *world);
16582
16587RAPIER_API R3Status RAPIER_CALL r3SetTimeStep(struct R3World *world, R3Real value);
16588
16593RAPIER_API R3Real RAPIER_CALL r3MinCcdDt(const struct R3World *world);
16594
16599RAPIER_API R3Status RAPIER_CALL r3SetMinCcdDt(struct R3World *world, R3Real value);
16600
16605RAPIER_API R3Real RAPIER_CALL r3LengthUnit(const struct R3World *world);
16606
16611RAPIER_API R3Status RAPIER_CALL r3SetLengthUnit(struct R3World *world, R3Real value);
16612
16617RAPIER_API R3Real RAPIER_CALL r3WarmstartCoefficient(const struct R3World *world);
16618
16624
16630
16636
16643
16648RAPIER_API
16650 R3Real value);
16651
16657
16663
16669
16675
16682
16687RAPIER_API
16689 R3Real value);
16690
16695RAPIER_API size_t RAPIER_CALL r3NumSolverIterations(const struct R3World *world);
16696
16701RAPIER_API R3Status RAPIER_CALL r3SetNumSolverIterations(struct R3World *world, size_t value);
16702
16707RAPIER_API size_t RAPIER_CALL r3NumInternalPgsIterations(const struct R3World *world);
16708
16713RAPIER_API R3Status RAPIER_CALL r3SetNumInternalPgsIterations(struct R3World *world, size_t value);
16714
16720RAPIER_API size_t RAPIER_CALL r3NumInternalStabilizationIterations(const struct R3World *world);
16721
16727RAPIER_API
16729 size_t value);
16730
16735RAPIER_API size_t RAPIER_CALL r3MaxCcdSubsteps(const struct R3World *world);
16736
16741RAPIER_API R3Status RAPIER_CALL r3SetMaxCcdSubsteps(struct R3World *world, size_t value);
16742
16747RAPIER_API R3Bool RAPIER_CALL r3ContactClustering(const struct R3World *world);
16748
16754
16759RAPIER_API R3Bool RAPIER_CALL r3ContactRecycling(const struct R3World *world);
16760
16766
16771RAPIER_API R3Bool RAPIER_CALL r3FrictionInBiasPass(const struct R3World *world);
16772
16778
16783RAPIER_API R3Bool RAPIER_CALL r3WarmstartJoints(const struct R3World *world);
16784
16789RAPIER_API R3Status RAPIER_CALL r3SetWarmstartJoints(struct R3World *world, R3Bool value);
16790
16795RAPIER_API struct R3SpringCoefficients RAPIER_CALL r3ContactSoftness(const struct R3World *world);
16796
16801RAPIER_API
16803 struct R3SpringCoefficients value);
16804
16810
16815RAPIER_API
16817 struct R3SpringCoefficients value);
16818
16823RAPIER_API
16825 struct R3Vector allowed_local_n1,
16826 R3Real allowed_angle);
16827
16832RAPIER_API
16834 struct R3Vector velocity);
16835
16841
16848
16854
16860RAPIER_API
16862 struct R3CollisionEvent *buffer,
16863 size_t capacity);
16864
16870RAPIER_API
16872 struct R3ContactForceEvent *buffer,
16873 size_t capacity);
16874
16879RAPIER_API size_t RAPIER_CALL r3EventCollector_TearEventCount(const struct R3EventCollector *events);
16880
16886RAPIER_API
16888 size_t index);
16889
16894RAPIER_API struct R3Vector RAPIER_CALL r3Gravity(const struct R3World *world);
16895
16900RAPIER_API R3Status RAPIER_CALL r3SetGravity(struct R3World *world, struct R3Vector value);
16901
16908RAPIER_API
16910 const struct R3PhysicsHooks *hooks,
16911 const struct R3EventCollector *events);
16912
16918RAPIER_API
16920 const struct R3PhysicsHooks *hooks,
16921 const struct R3EventCollector *events);
16922
16928RAPIER_API struct R3ByteView RAPIER_CALL r3Bytes_Data(const struct R3Bytes *bytes);
16929
16935RAPIER_API R3Status RAPIER_CALL r3FreeBytes(struct R3Bytes *bytes);
16936
16942RAPIER_API struct R3Bytes *RAPIER_CALL r3SerializeWorld(const struct R3World *world);
16943
16949RAPIER_API struct R3World *RAPIER_CALL r3DeserializeWorld(const uint8_t *data, size_t count);
16950
16957RAPIER_API
16958size_t RAPIER_CALL r3DebugRender(const struct R3World *world,
16959 uint32_t mode,
16960 struct R3DebugLine *buffer,
16961 size_t capacity);
16962
16968
16973RAPIER_API R3Real RAPIER_CALL r3SoftBodiesResweepStrain(const struct R3World *world);
16974
16980
16986
16991RAPIER_API R3Status RAPIER_CALL r3SoftBodiesSetMaxExtraSubsteps(struct R3World *world, size_t value);
16992
16997RAPIER_API size_t RAPIER_CALL r3SoftBodiesMaxExtraSubsteps(const struct R3World *world);
16998
17003RAPIER_API
17005 R3Bool value);
17006
17012
17017RAPIER_API
17019 R3Bool value);
17020
17025RAPIER_API
17027 R3Bool value);
17028
17033RAPIER_API
17035 R3Bool value);
17036
17042
17048
17054
17060
17066
17071RAPIER_API
17073 R3Bool value);
17074
17079RAPIER_API
17081 R3Bool value);
17082
17088
17094
17100
17105RAPIER_API
17107 R3Bool value);
17108
17113RAPIER_API
17115 R3Bool value);
17116
17121RAPIER_API
17123 R3Real value);
17124
17130
17136
17142
17148
17154
17159RAPIER_API
17161 R3Real value);
17162
17163#if defined(RAPIER_FEM)
17169#endif
17170
17171#if defined(RAPIER_FEM)
17176RAPIER_API R3Status RAPIER_CALL r3FemSetMaxLinearIterations(struct R3World *world, size_t value);
17177#endif
17178
17179#if defined(RAPIER_FEM)
17184RAPIER_API R3Status RAPIER_CALL r3FemSetMaxDenseDofs(struct R3World *world, size_t value);
17185#endif
17186
17194RAPIER_API R3Status RAPIER_CALL r3SetNumThreads(struct R3World *world, size_t num_threads);
17195
17203
17209RAPIER_API size_t RAPIER_CALL r3NumThreads(const struct R3World *world);
17210
17216RAPIER_API R3Status RAPIER_CALL r3SetCountersEnabled(struct R3World *world, R3Bool enabled);
17217
17224RAPIER_API double RAPIER_CALL r3StepTimeMs(const struct R3World *world);
17225
17234RAPIER_API struct R3World *RAPIER_CALL r3DeserializeRigidState(const uint8_t *data, size_t count);
17235
17241
17247
17253
17259
17266
17271RAPIER_API
17273
17281RAPIER_API
17283 struct R3SoftBodyHandle *buffer,
17284 size_t capacity);
17285
17290RAPIER_API
17292 uint32_t particle);
17293
17299RAPIER_API
17301 uint32_t *buffer,
17302 size_t capacity);
17303
17309RAPIER_API
17311 uint32_t *buffer,
17312 size_t capacity);
17313
17319RAPIER_API
17321 uint32_t *buffer,
17322 size_t capacity);
17323
17329RAPIER_API
17331 uint32_t *buffer,
17332 size_t capacity);
17333
17339RAPIER_API
17341 uint32_t *buffer,
17342 size_t capacity);
17343
17351RAPIER_API
17353 size_t piece_index,
17354 uint32_t *buffer,
17355 size_t capacity);
17356
17362RAPIER_API
17364 struct R3SoftClusterSplit *buffer,
17365 size_t capacity);
17366
17372RAPIER_API
17374 struct R3SoftJointMove *buffer,
17375 size_t capacity);
17376
17382RAPIER_API
17384 const uint32_t *edges,
17385 size_t edge_count,
17386 const uint32_t *cells,
17387 size_t cell_count);
17388
17393RAPIER_API
17395 const uint32_t *particles,
17396 size_t count);
17397
17402RAPIER_API
17404 uint32_t cluster);
17405
17411RAPIER_API
17413 uint32_t particle);
17414
17420RAPIER_API
17422 const struct R3Vector *blade);
17423
17430
17435RAPIER_API struct R3BuildInfo RAPIER_CALL r3BuildInfo(void);
17436
17444RAPIER_API const char *RAPIER_CALL r3Version(void);
17445
17453RAPIER_API const char *RAPIER_CALL r3BuildProfile(void);
17454
17460
17466RAPIER_API
17468 size_t rows,
17469 size_t columns,
17470 struct R3Vector scale);
17471
17476RAPIER_API
17478 struct R3Pose pose);
17479
17484RAPIER_API
17486 R3Real density);
17487
17492RAPIER_API
17494 struct R3Pose pose,
17495 struct R3Vector point);
17496
17502RAPIER_API
17503size_t RAPIER_CALL r3ContactPairs(const struct R3World *world,
17504 struct R3ContactPair *buffer,
17505 size_t capacity);
17506
17512RAPIER_API
17515
17521RAPIER_API
17522size_t RAPIER_CALL r3IntersectionPairs(const struct R3World *world,
17523 struct R3IntersectionPair *buffer,
17524 size_t capacity);
17525
17535RAPIER_API
17538 struct R3ContactPoint *buffer,
17539 size_t capacity);
17540
17546RAPIER_API
17548 R3Real *buffer,
17549 size_t capacity);
17550
17555RAPIER_API
17557 const R3Real *values,
17558 size_t count);
17559
17568RAPIER_API
17570 uint32_t dimension,
17571 size_t real_size,
17572 size_t vector_size,
17573 size_t pose_size,
17574 uint32_t features);
17575
17584RAPIER_API
17586 struct R3RigidBodyHandle *buffer,
17587 size_t capacity);
17588
17597RAPIER_API
17598size_t RAPIER_CALL r3QuarantinedColliders(const struct R3World *world,
17599 struct R3ColliderHandle *buffer,
17600 size_t capacity);
17601
17610RAPIER_API
17612 struct R3SoftBodyHandle *buffer,
17613 size_t capacity);
17614
17615#if defined(RAPIER_DIM3)
17620RAPIER_API uint32_t RAPIER_CALL r3FrictionModel(const struct R3World *world);
17621#endif
17622
17623#if defined(RAPIER_DIM3)
17628RAPIER_API R3Status RAPIER_CALL r3SetFrictionModel(struct R3World *world, uint32_t value);
17629#endif
17630
17637
17643
17649
17655
17661
17668
17674
17680
17685RAPIER_API R3Real RAPIER_CALL r3Powf(R3Real base, R3Real exponent);
17686
17692RAPIER_API
17694 uint32_t subdivisions);
17695
17701RAPIER_API
17703 struct R3Vector *buffer,
17704 size_t capacity);
17705
17711RAPIER_API
17713 struct R3Vector *buffer,
17714 size_t capacity);
17715
17722
17723#if defined(RAPIER_DIM3)
17728RAPIER_API
17730 R3Real radius,
17731 R3Real border_radius);
17732#endif
17733
17734#if defined(RAPIER_DIM3)
17739RAPIER_API
17741 R3Real radius,
17742 R3Real border_radius);
17743#endif
17744
17745#if defined(RAPIER_DIM3)
17753RAPIER_API
17755 uint32_t ntheta,
17756 uint32_t nphi);
17757#endif
17758
17759#if defined(RAPIER_DIM3)
17765RAPIER_API
17767 struct R3Vector *buffer,
17768 size_t capacity);
17769#endif
17770
17771#if defined(RAPIER_DIM3)
17777RAPIER_API
17779 uint32_t *buffer,
17780 size_t capacity);
17781#endif
17782
17783#if defined(RAPIER_DIM3)
17790#endif
17791
17792#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17798#endif
17799
17800#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17807#endif
17808
17809#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17815RAPIER_API
17817 const struct R3UrdfLoaderOptions *options);
17818#endif
17819
17820#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17825RAPIER_API
17827 struct R3Pose transform);
17828#endif
17829
17830#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17837#endif
17838
17839#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17844RAPIER_API
17846 const struct R3UrdfRobot *robot);
17847#endif
17848
17849#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17854RAPIER_API
17856 const struct R3UrdfRobot *robot,
17857 uint8_t options);
17858#endif
17859
17860#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17867RAPIER_API
17869 struct R3RigidBodyHandle *buffer,
17870 size_t capacity);
17871#endif
17872
17873#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17879#endif
17880
17881#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17888#endif
17889
17890#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17896RAPIER_API
17898 const struct R3MjcfLoaderOptions *options);
17899#endif
17900
17901#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17906RAPIER_API
17908 struct R3Pose transform);
17909#endif
17910
17911#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17918#endif
17919
17920#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17925RAPIER_API
17927 const struct R3MjcfRobot *robot);
17928#endif
17929
17930#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17935RAPIER_API
17937 const struct R3MjcfRobot *robot,
17938 uint8_t options);
17939#endif
17940
17941#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17947RAPIER_API
17949 struct R3RigidBodyHandle *buffer,
17950 size_t capacity);
17951#endif
17952
17953#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17958RAPIER_API struct R3Vector RAPIER_CALL r3MjcfRobot_Gravity(const struct R3MjcfRobot *robot);
17959#endif
17960
17961#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17966RAPIER_API size_t RAPIER_CALL r3MjcfRobot_BodyCount(const struct R3MjcfRobot *robot);
17967#endif
17968
17969#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17974RAPIER_API size_t RAPIER_CALL r3MjcfRobot_BodyColliderCount(const struct R3MjcfRobot *robot, size_t body);
17975#endif
17976
17977#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17982RAPIER_API
17984 size_t body,
17985 size_t collider,
17986 struct R3InteractionGroups groups);
17987#endif
17988
17989#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
17994RAPIER_API size_t RAPIER_CALL r3MjcfRobot_KeyframeCount(const struct R3MjcfRobot *robot);
17995#endif
17996
17997#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18003RAPIER_API
18005 size_t key,
18006 char *buffer,
18007 size_t capacity);
18008#endif
18009
18010#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18015RAPIER_API
18017 const struct R3MjcfRobot *source,
18018 size_t key);
18019#endif
18020
18021#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18027RAPIER_API
18029 size_t key,
18030 R3Real *buffer,
18031 size_t capacity);
18032#endif
18033
18034#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18039RAPIER_API size_t RAPIER_CALL r3MjcfRobotHandles_ActuatorCount(const struct R3MjcfRobotHandles *handles);
18040#endif
18041
18042#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18047RAPIER_API
18049 const struct R3MjcfRobot *robot,
18050 size_t key);
18051#endif
18052
18053#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18058RAPIER_API
18060 const R3Real *controls,
18061 size_t count,
18062 R3Real gain);
18063#endif
18064
18065#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18070RAPIER_API size_t RAPIER_CALL r3MjcfRobot_BodyVisualCount(const struct R3MjcfRobot *robot, size_t body);
18071#endif
18072
18073#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18079RAPIER_API
18081 size_t body,
18082 size_t visual);
18083#endif
18084
18085#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18091#endif
18092
18093#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18100#endif
18101
18102#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18108RAPIER_API
18110 float *buffer,
18111 size_t capacity);
18112#endif
18113
18114#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18120RAPIER_API
18122 float *buffer,
18123 size_t capacity);
18124#endif
18125
18126#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18132RAPIER_API
18134 char *buffer,
18135 size_t capacity);
18136#endif
18137
18138#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18145RAPIER_API
18147 const char *mesh_dir,
18148 const struct R3UrdfLoaderOptions *options);
18149#endif
18150
18151#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18158#endif
18159
18160#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18166RAPIER_API
18168 const struct R3MjcfRobot *robot);
18169#endif
18170
18171#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18178RAPIER_API
18180#endif
18181
18182#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18189#endif
18190
18191#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18199RAPIER_API
18201 uint32_t converter,
18202 uint32_t trimesh_flags,
18203 struct R3Vector scale);
18204#endif
18205
18206#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18211RAPIER_API size_t RAPIER_CALL r3LoadedMeshes_Count(const struct R3LoadedMeshes *meshes);
18212#endif
18213
18214#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18221RAPIER_API
18223 size_t index);
18224#endif
18225
18226#if (defined(RAPIER_ROBOTICS) && defined(RAPIER_DIM3) && defined(RAPIER_F32))
18232RAPIER_API
18234 size_t index);
18235#endif
18236
18242
18248
18254
18260
18266
18272
18278
18284RAPIER_API
18286 struct R3Pose value,
18287 R3Bool wake_up);
18288
18294RAPIER_API
18296 struct R3Vector value,
18297 R3Bool wake_up);
18298
18304RAPIER_API
18306 struct R3Vector value,
18307 R3Bool wake_up);
18308
18314RAPIER_API
18316 R3AngVector value,
18317 R3Bool wake_up);
18318
18323RAPIER_API
18325 struct R3Pose value);
18326
18331RAPIER_API
18333 struct R3Vector value);
18334
18340RAPIER_API
18342 R3Real value,
18343 R3Bool wake_up);
18344
18349RAPIER_API
18351 R3Real value);
18352
18357RAPIER_API
18359 R3Real value);
18360
18366
18371RAPIER_API
18373 struct R3UserData value);
18374
18380RAPIER_API
18382 struct R3Vector value,
18383 R3Bool wake_up);
18384
18390RAPIER_API
18392 struct R3Vector value,
18393 struct R3Vector point,
18394 R3Bool wake_up);
18395
18401RAPIER_API
18403 struct R3Vector value,
18404 R3Bool wake_up);
18405
18412
18418
18424
18430
18436
18442
18448
18454
18460RAPIER_API
18462 struct R3Pose value);
18463
18469RAPIER_API
18471 struct R3Vector value);
18472
18478
18484
18490
18495RAPIER_API
18497 struct R3InteractionGroups value);
18498
18503RAPIER_API
18505 struct R3UserData value);
18506
18511RAPIER_API
18513 size_t index);
18514
18520RAPIER_API
18522 struct R3Vector *buffer,
18523 size_t capacity);
18524
18530
18535RAPIER_API
18537 size_t index,
18538 struct R3Vector value);
18539
18544RAPIER_API
18546 const struct R3SoftBodyMaterial *data);
18547
18553RAPIER_API
18555 size_t index,
18556 struct R3Vector value,
18557 R3Bool wake_up);
18558
18565RAPIER_API
18566size_t RAPIER_CALL r3RigidBodyReadStates(const struct R3World *world,
18567 const struct R3RigidBodyHandle *handles,
18568 size_t handle_count,
18569 struct R3RigidBodyState *states,
18570 size_t capacity);
18571
18577
18583RAPIER_API
18585 const struct R3JointDesc *desc,
18586 R3Bool wake_up);
18587
18593
18598RAPIER_API uint32_t RAPIER_CALL r3Collider_ActiveHooks(struct R3ColliderHandle handle);
18599
18605
18611
18618
18624
18630
18636
18642
18648RAPIER_API
18650 struct R3Rotation value);
18651
18657RAPIER_API
18659 R3Bool value);
18660
18667RAPIER_API
18669 struct R3VectorView vertices,
18670 struct R3TriangleView indices,
18671 uint32_t flags);
18672
18679RAPIER_API
18681 struct R3VectorView vertices,
18682 struct R3EdgeView indices,
18683 uint32_t flags);
18684
18689RAPIER_API
18691 struct R3VectorView vertices);
18692
18697RAPIER_API
18699 struct R3VectorView positions);
18700
18705RAPIER_API
18707 struct R3VectorView vertices,
18708 R3SurfaceElementView elements);
18709
18710#if defined(RAPIER_DIM2)
18717RAPIER_API
18718R3Status RAPIER_CALL r3SoftBodyDesc_SetTrimesh(struct R3SoftBodyDesc *desc,
18719 struct R3VectorView vertices,
18720 struct R3TriangleView triangles);
18721#endif
18722
18729RAPIER_API
18731 struct R3SoftBodyDescView view);
18732
18739RAPIER_API
18741 struct R3EdgeView view);
18742
18747RAPIER_API
18749 struct R3VectorView vertices,
18750 R3SurfaceElementView elements);
18751
18759RAPIER_API
18761 struct R3RealView view);
18762
18770RAPIER_API
18772 struct R3IndexView view);
18773
18781RAPIER_API
18783 struct R3EdgeView view);
18784
18792RAPIER_API
18794 struct R3EdgeView view);
18795
18804
18812RAPIER_API
18815
18823RAPIER_API
18825 struct R3IndexView view);
18826
18827#if defined(RAPIER_DIM3)
18835RAPIER_API
18837 struct R3DihedralView view);
18838#endif
18839
18840#if defined(RAPIER_DIM3)
18848RAPIER_API
18850 struct R3EdgeView view);
18851#endif
18852
18858RAPIER_API
18860 R3Real border_radius);
18861
18867RAPIER_API
18869 struct R3Vector b,
18870 R3Real radius);
18871
18878
18884RAPIER_API
18886 struct R3Vector b,
18887 struct R3Vector c);
18888
18895
18896#if defined(RAPIER_DIM3)
18902RAPIER_API struct R3ColliderDesc RAPIER_CALL r3CylinderColliderDesc(R3Real half_height, R3Real radius);
18903#endif
18904
18905#if defined(RAPIER_DIM3)
18911RAPIER_API struct R3ColliderDesc RAPIER_CALL r3ConeColliderDesc(R3Real half_height, R3Real radius);
18912#endif
18913
18914#if defined(RAPIER_DIM3)
18920RAPIER_API
18922 R3Real radius,
18923 R3Real border_radius);
18924#endif
18925
18926#if defined(RAPIER_DIM3)
18932RAPIER_API
18934 R3Real radius,
18935 R3Real border_radius);
18936#endif
18937
18943RAPIER_API struct R3ColliderDesc RAPIER_CALL r3CapsuleXColliderDesc(R3Real half_height, R3Real radius);
18944
18950RAPIER_API struct R3ColliderDesc RAPIER_CALL r3CapsuleYColliderDesc(R3Real half_height, R3Real radius);
18951
18952#if defined(RAPIER_DIM3)
18958RAPIER_API struct R3ColliderDesc RAPIER_CALL r3CapsuleZColliderDesc(R3Real half_height, R3Real radius);
18959#endif
18960
18966RAPIER_API
18968 struct R3Vector b,
18969 size_t particles);
18970
18971#if defined(RAPIER_DIM2)
18977RAPIER_API
18978struct R3SoftBodyDesc RAPIER_CALL r3GridSoftBodyDesc(struct R3Vector center,
18979 struct R3Vector half_extents,
18980 size_t nx,
18981 size_t ny);
18982#endif
18983
18984#if defined(RAPIER_DIM3)
18990RAPIER_API
18992 struct R3Vector half_extents,
18993 size_t nx,
18994 size_t ny,
18995 size_t nz);
18996#endif
18997
18998#if defined(RAPIER_DIM3)
19004RAPIER_API
19006 struct R3Vector du,
19007 struct R3Vector dv,
19008 size_t nu,
19009 size_t nv);
19010#endif
19011
19012#if defined(RAPIER_DIM3)
19020RAPIER_API
19022 struct R3Vector du,
19023 struct R3Vector dv,
19024 size_t nu,
19025 size_t nv,
19026 struct R3SpringCoefficients warp,
19027 struct R3SpringCoefficients weft,
19028 struct R3SpringCoefficients shear);
19029#endif
19030
19031#if defined(RAPIER_DIM2)
19039RAPIER_API struct R3SoftBodyDesc RAPIER_CALL r3PolygonSoftBodyDesc(struct R3VectorView points);
19040#endif
19041
19042#if defined(RAPIER_DIM2)
19049RAPIER_API
19050struct R3SoftBodyDesc RAPIER_CALL r3DiskSoftBodyDesc(struct R3Vector center,
19051 R3Real radius,
19052 size_t particles);
19053#endif
19054
19055#if defined(RAPIER_DIM3)
19061RAPIER_API
19063 R3Real radius,
19064 uint32_t subdivisions);
19065#endif
19066
19067#if defined(RAPIER_DIM3)
19074RAPIER_API
19076 struct R3Vector axis,
19077 R3Real radius_start,
19078 R3Real radius_end,
19079 size_t num_around,
19080 size_t num_along);
19081#endif
19082
19087RAPIER_API
19090 struct R3VolumeMeshParameters parameters);
19091
19096RAPIER_API
19098
19104RAPIER_API
19106 struct R3Vector *buffer,
19107 size_t capacity);
19108
19114RAPIER_API
19116 uint32_t *buffer,
19117 size_t capacity);
19118
19123RAPIER_API
19125 size_t index);
19126
19132RAPIER_API uint32_t RAPIER_CALL r3SoftBody_Solver(struct R3SoftBodyHandle handle);
19133
19139RAPIER_API
19141 uint32_t cluster,
19142 const struct R3SpringCoefficients *softness);
19143
19152RAPIER_API
19154 struct R3Vector impulse,
19155 struct R3Vector point,
19156 R3Real falloff_radius,
19157 R3Bool wake_up);
19158
19168RAPIER_API
19170 struct R3Vector center,
19171 R3Real magnitude,
19172 R3Real falloff_radius,
19173 R3Bool wake_up);
19174
19182
19188RAPIER_API R3Status RAPIER_CALL r3SoftBody_TearEdge(struct R3SoftBodyHandle handle, size_t index);
19189
19196RAPIER_API R3Status RAPIER_CALL r3SoftBody_TearCell(struct R3SoftBodyHandle handle, size_t index);
19197
19204
19210RAPIER_API
19212 struct R3ColliderHandle handle);
19213
19221
19227
19233
19239
19245
19251
19257
19263
19269
19275
19281
19287
19293
19299
19305
19311
19317
19323
19329
19335
19340RAPIER_API
19342 uint32_t value);
19343
19349
19355
19361
19367
19373
19378RAPIER_API uint32_t RAPIER_CALL r3RecoveryOverlapSplit(const struct R3World *world);
19379
19384RAPIER_API R3Status RAPIER_CALL r3RecoverySetOverlapSplit(struct R3World *world, uint32_t value);
19385
19390RAPIER_API uint32_t RAPIER_CALL r3RecoveryOverlapPatience(const struct R3World *world);
19391
19397
19403
19404#if defined(RAPIER_FEM)
19410#endif
19411
19412#if defined(RAPIER_FEM)
19417RAPIER_API size_t RAPIER_CALL r3FemMaxLinearIterations(const struct R3World *world);
19418#endif
19419
19420#if defined(RAPIER_FEM)
19425RAPIER_API size_t RAPIER_CALL r3FemMaxDenseDofs(const struct R3World *world);
19426#endif
19427
19434
19440
19447
19453
19459
19465
19471
19477
19483
19489
19495
19501RAPIER_API
19503 struct R3Vector *buffer,
19504 size_t capacity);
19505
19511RAPIER_API
19513 uint32_t *buffer,
19514 size_t capacity);
19515
19521RAPIER_API
19523 uint32_t *buffer,
19524 size_t capacity);
19525
19531RAPIER_API
19533 uint32_t *buffer,
19534 size_t capacity);
19535
19541RAPIER_API
19543 struct R3SoftBodyHandle *buffer,
19544 size_t capacity);
19545
19550RAPIER_API
19552 size_t index,
19553 struct R3Vector value);
19554
19559RAPIER_API
19561 size_t index,
19562 struct R3Vector value);
19563
19568RAPIER_API
19570 size_t index,
19571 R3Bool value);
19572
19578RAPIER_API
19580 size_t index,
19581 struct R3Vector value,
19582 R3Bool wake_up);
19583
19589RAPIER_API
19591 struct R3Vector value,
19592 R3Bool wake_up);
19593
19601RAPIER_API
19603 struct R3Vector value,
19604 R3Bool wake_up);
19605
19612
19618
19623RAPIER_API
19625 R3Real value);
19626
19633RAPIER_API
19635 size_t index,
19636 struct R3RigidBodyHandle rigid_body);
19637
19644
19650RAPIER_API
19652 uint32_t *buffer,
19653 size_t capacity);
19654
19659RAPIER_API
19661 uint32_t cluster);
19662
19668RAPIER_API
19670 uint32_t cluster,
19671 uint32_t *buffer,
19672 size_t capacity);
19673
19678RAPIER_API
19680 uint32_t cluster,
19681 R3Bool value);
19682
19687RAPIER_API
19689 uint32_t cluster,
19690 struct R3Pose value);
19691
19696RAPIER_API
19698 uint32_t cluster,
19699 R3Bool value);
19700
19707RAPIER_API
19709 uint32_t cluster,
19710 R3Real value);
19711
19716RAPIER_API
19718 uint32_t cluster,
19719 R3Real value);
19720
19726RAPIER_API
19728 struct R3SoftMeshInfo *buffer,
19729 size_t capacity);
19730
19736RAPIER_API
19738 struct R3SoftMeshId id,
19739 struct R3Vector *buffer,
19740 size_t capacity);
19741
19747RAPIER_API
19749 struct R3SoftMeshId id,
19750 uint32_t *buffer,
19751 size_t capacity);
19752
19758RAPIER_API
19760 struct R3ColliderHandle *buffer,
19761 size_t capacity);
19762
19768RAPIER_API
19770 struct R3ColliderHandle collider,
19771 struct R3Vector *buffer,
19772 size_t capacity);
19773
19779RAPIER_API
19781 struct R3ColliderHandle collider,
19782 uint32_t *buffer,
19783 size_t capacity);
19784
19789RAPIER_API
19791 struct R3ColliderHandle collider);
19792
19797RAPIER_API
19799 struct R3ColliderHandle collider);
19800
19801#if defined(RAPIER_FEM)
19806RAPIER_API R3Status RAPIER_CALL r3SoftBody_SetSolver(struct R3SoftBodyHandle handle, uint32_t solver);
19807#endif
19808
19813RAPIER_API
19815 uint32_t cluster,
19816 const struct R3Pose *target);
19817
19822RAPIER_API
19824 size_t index,
19825 R3Real resistance);
19826
19831RAPIER_API
19833 struct R3ColliderHandle collider);
19834
19840RAPIER_API
19842 struct R3MassProperties properties,
19843 R3Bool wake_up);
19844
19849RAPIER_API
19851
19856RAPIER_API
19858 struct R3MassProperties properties);
19859
19865
19871RAPIER_API
19873 uint8_t axes,
19874 R3Bool wake_up);
19875
19880RAPIER_API uint8_t RAPIER_CALL r3RigidBody_LockedAxes(struct R3RigidBodyHandle handle);
19881
19887
19892RAPIER_API
19894 uint32_t id);
19895
19900RAPIER_API
19902 struct R3VoxelKey key,
19903 R3Bool filled);
19904
19910
19916
19922
19928
19934
19940
19945RAPIER_API uint32_t RAPIER_CALL r3RigidBody_BodyType(struct R3RigidBodyHandle handle);
19946
19952
19958
19964
19970
19976
19982
19988
19994
20000
20006
20012
20018
20024
20030
20036RAPIER_API
20038 struct R3Rotation value,
20039 R3Bool wake_up);
20040
20046RAPIER_API
20048 uint32_t value,
20049 R3Bool wake_up);
20050
20055RAPIER_API
20057 struct R3Rotation value);
20058
20064RAPIER_API
20066 R3Real value,
20067 R3Bool wake_up);
20068
20073RAPIER_API
20075 R3Real value);
20076
20081RAPIER_API
20083 R3Bool value);
20084
20090RAPIER_API
20092 R3Bool value,
20093 R3Bool wake_up);
20094
20100RAPIER_API
20102 R3Bool value,
20103 R3Bool wake_up);
20104
20109RAPIER_API
20111 int8_t value);
20112
20117RAPIER_API
20119 size_t value);
20120
20125RAPIER_API
20127 size_t value);
20128
20134RAPIER_API
20136 R3AngVector value,
20137 R3Bool wake_up);
20138
20144RAPIER_API
20146 R3AngVector value,
20147 R3Bool wake_up);
20148
20154RAPIER_API
20156 struct R3Vector value,
20157 struct R3Vector point,
20158 R3Bool wake_up);
20159
20165RAPIER_API
20167 R3Bool wake_up);
20168
20173RAPIER_API
20175 struct R3Vector point);
20176
20182RAPIER_API
20184 struct R3ColliderHandle *buffer,
20185 size_t capacity);
20186
20187#if defined(RAPIER_DIM3)
20193#endif
20194
20195#if defined(RAPIER_DIM3)
20200RAPIER_API
20202 R3Bool enabled);
20203#endif
20204
20210
20216
20222
20227RAPIER_API
20229 struct R3InteractionGroups value);
20230
20235RAPIER_API
20237 uint32_t value);
20238
20243RAPIER_API
20245 uint32_t value);
20246
20252
20257RAPIER_API
20259 R3Real value);
20260
20265RAPIER_API
20267 uint32_t value);
20268
20273RAPIER_API R3Status RAPIER_CALL r3Collider_SetActiveHooks(struct R3ColliderHandle handle, uint32_t value);
20274
20279RAPIER_API
20281 uint16_t value);
20282
20288
20293RAPIER_API
20295
20301
20307
20313RAPIER_API uint32_t RAPIER_CALL r3Collider_ActiveEvents(struct R3ColliderHandle handle);
20314
20320
20326
20332
20338
20344
20350
20356
20362
20367RAPIER_API
20369 const R3SharedShape *shape);
20370
20375RAPIER_API
20377 struct R3Pose value);
20378
20385
20392
20399
20404RAPIER_API
20406 struct R3Pose value);
20407
20413RAPIER_API
20415 struct R3Pose value,
20416 R3Bool wake_up);
20417
20422RAPIER_API
20424 struct R3Pose value);
20425
20431RAPIER_API
20433 struct R3Pose value,
20434 R3Bool wake_up);
20435
20440RAPIER_API
20442 struct R3Vector value);
20443
20449RAPIER_API
20451 struct R3Vector value,
20452 R3Bool wake_up);
20453
20458RAPIER_API
20460 struct R3Vector value);
20461
20467RAPIER_API
20469 struct R3Vector value,
20470 R3Bool wake_up);
20471
20477
20483RAPIER_API
20485 R3Bool value,
20486 R3Bool wake_up);
20487
20493
20499RAPIER_API
20501 R3Bool value,
20502 R3Bool wake_up);
20503
20508RAPIER_API
20510 struct R3SpringCoefficients value);
20511
20517RAPIER_API
20519 struct R3SpringCoefficients value,
20520 R3Bool wake_up);
20521
20526RAPIER_API R3Status RAPIER_CALL r3JointDesc_SetLockedAxes(struct R3JointDesc *desc, uint8_t value);
20527
20533RAPIER_API
20535 uint8_t value,
20536 R3Bool wake_up);
20537
20542RAPIER_API R3Status RAPIER_CALL r3JointDesc_SetLimitAxes(struct R3JointDesc *desc, uint8_t value);
20543
20549RAPIER_API
20551 uint8_t value,
20552 R3Bool wake_up);
20553
20558RAPIER_API R3Status RAPIER_CALL r3JointDesc_SetMotorAxes(struct R3JointDesc *desc, uint8_t value);
20559
20565RAPIER_API
20567 uint8_t value,
20568 R3Bool wake_up);
20569
20574RAPIER_API R3Status RAPIER_CALL r3JointDesc_SetCoupledAxes(struct R3JointDesc *desc, uint8_t value);
20575
20581RAPIER_API
20583 uint8_t value,
20584 R3Bool wake_up);
20585
20590RAPIER_API
20592 struct R3Vector value);
20593
20599RAPIER_API
20601 struct R3Vector value,
20602 R3Bool wake_up);
20603
20608RAPIER_API
20610 struct R3Vector value);
20611
20617RAPIER_API
20619 struct R3Vector value,
20620 R3Bool wake_up);
20621
20626RAPIER_API
20628 uint32_t joint_axis,
20629 R3Real min,
20630 R3Real max);
20631
20638RAPIER_API
20640 uint32_t joint_axis,
20641 R3Real min,
20642 R3Real max,
20643 R3Bool wake_up);
20644
20649RAPIER_API
20651 uint32_t joint_axis,
20652 R3Real target_position,
20653 R3Real target_velocity,
20654 R3Real stiffness,
20655 R3Real damping);
20656
20662RAPIER_API
20664 uint32_t joint_axis,
20665 R3Real target_position,
20666 R3Real target_velocity,
20667 R3Real stiffness,
20668 R3Real damping,
20669 R3Bool wake_up);
20670
20675RAPIER_API
20677 uint32_t joint_axis,
20678 R3Real max_force);
20679
20685RAPIER_API
20687 uint32_t joint_axis,
20688 R3Real max_force,
20689 R3Bool wake_up);
20690
20695RAPIER_API
20697 uint32_t joint_axis,
20698 uint32_t model);
20699
20705RAPIER_API
20707 uint32_t joint_axis,
20708 uint32_t model,
20709 R3Bool wake_up);
20710
20715RAPIER_API
20717 struct R3UserData value);
20718
20724RAPIER_API
20726 struct R3UserData value,
20727 R3Bool wake_up);
20728
20733RAPIER_API
20735 uint32_t joint_axis,
20736 R3Real target_position,
20737 R3Real stiffness,
20738 R3Real damping);
20739
20745RAPIER_API
20747 uint32_t joint_axis,
20748 R3Real target_position,
20749 R3Real stiffness,
20750 R3Real damping,
20751 R3Bool wake_up);
20752
20757RAPIER_API
20759 uint32_t joint_axis,
20760 R3Real target_velocity,
20761 R3Real factor);
20762
20768RAPIER_API
20770 uint32_t joint_axis,
20771 R3Real target_velocity,
20772 R3Real factor,
20773 R3Bool wake_up);
20774
20781
20787
20792RAPIER_API size_t RAPIER_CALL r3ImpulseJointCount(const struct R3World *world);
20793
20799RAPIER_API size_t RAPIER_CALL r3MultibodyJointCount(const struct R3World *world);
20800
20806
20813RAPIER_API
20815 const struct R3JointDesc *desc,
20816 R3Bool wake_up);
20817
20823
20830RAPIER_API
20832 R3SurfaceElementView indices);
20833
20840RAPIER_API
20842 struct R3VectorView points);
20843
20850RAPIER_API
20852 R3SurfaceElementView indices,
20853 R3Real voxel_size);
20854
20861
20862#if defined(RAPIER_DIM3)
20869RAPIER_API
20871 struct R3TriangleView indices);
20872#endif
20873
20880RAPIER_API
20882 struct R3TriangleView indices);
20883
20890RAPIER_API
20892 struct R3EdgeView indices);
20893
20894#if defined(RAPIER_DIM2)
20901RAPIER_API
20902R3SharedShape *RAPIER_CALL r3OrientedPolylineSharedShape(struct R3VectorView vertices,
20903 struct R3EdgeView indices);
20904#endif
20905
20906#if defined(RAPIER_DIM2)
20913RAPIER_API R3SharedShape *RAPIER_CALL r3ConvexPolylineSharedShape(struct R3VectorView vertices);
20914#endif
20915
20921RAPIER_API
20923 R3Real border_radius);
20924
20931RAPIER_API
20933 struct R3TriangleView indices,
20934 uint32_t flags);
20935
20940RAPIER_API struct R3World *RAPIER_CALL r3NewWorld(void);
20941
20947RAPIER_API R3Status RAPIER_CALL r3FreeWorld(struct R3World *world);
20948
20954RAPIER_API
20956 struct R3PidController *controller,
20957 R3Real dt,
20958 struct R3RigidBodyHandle body,
20959 struct R3Pose target_pose,
20960 struct R3Vector target_linvel,
20961 R3AngVector target_angvel);
20962
20968RAPIER_API
20970 const struct R3PdController *controller,
20971 struct R3RigidBodyHandle body,
20972 struct R3Pose target_pose,
20973 struct R3Vector target_linvel,
20974 R3AngVector target_angvel);
20975
20981RAPIER_API size_t RAPIER_CALL r3ReadRigidBodyCount(const struct R3ReadContext *context);
20982
20988RAPIER_API
20990 struct R3RigidBodyHandle *buffer,
20991 size_t capacity);
20992
20998RAPIER_API
21000 struct R3RigidBodyHandle handle);
21001
21007RAPIER_API size_t RAPIER_CALL r3ReadColliderCount(const struct R3ReadContext *context);
21008
21014RAPIER_API
21016 struct R3ColliderHandle *buffer,
21017 size_t capacity);
21018
21024RAPIER_API
21026 struct R3ColliderHandle handle);
21027
21034RAPIER_API
21036 struct R3ColliderHandle handle);
21037
21043RAPIER_API
21045 struct R3ColliderHandle handle);
21046
21052RAPIER_API
21054 struct R3RigidBodyHandle handle);
21055
21061RAPIER_API
21063 struct R3ColliderHandle handle);
21064
21070RAPIER_API
21072 struct R3ColliderHandle handle,
21073 uint32_t id);
21074
21080RAPIER_API
21082 struct R3RigidBodyHandle handle);
21083
21089RAPIER_API
21091 struct R3RigidBodyHandle handle);
21092
21098RAPIER_API
21100 struct R3RigidBodyHandle handle);
21101
21107RAPIER_API
21109 struct R3RigidBodyHandle handle);
21110
21116RAPIER_API
21118 struct R3RigidBodyHandle handle);
21119
21125RAPIER_API
21127 struct R3RigidBodyHandle handle);
21128
21134RAPIER_API
21136 struct R3RigidBodyHandle handle);
21137
21143RAPIER_API
21145 struct R3RigidBodyHandle handle);
21146
21152RAPIER_API
21154 struct R3RigidBodyHandle handle);
21155
21161RAPIER_API
21163 struct R3RigidBodyHandle handle);
21164
21170RAPIER_API
21172 struct R3RigidBodyHandle handle);
21173
21179RAPIER_API
21181 struct R3RigidBodyHandle handle);
21182
21188RAPIER_API
21190 struct R3RigidBodyHandle handle);
21191
21197RAPIER_API
21199 struct R3RigidBodyHandle handle);
21200
21206RAPIER_API
21208 struct R3RigidBodyHandle handle);
21209
21215RAPIER_API
21217 struct R3RigidBodyHandle handle);
21218
21224RAPIER_API
21226 struct R3RigidBodyHandle handle);
21227
21233RAPIER_API
21235 struct R3RigidBodyHandle handle);
21236
21242RAPIER_API
21244 struct R3RigidBodyHandle handle);
21245
21251RAPIER_API
21253 struct R3RigidBodyHandle handle);
21254
21260RAPIER_API
21262 struct R3RigidBodyHandle handle);
21263
21269RAPIER_API
21271 struct R3RigidBodyHandle handle,
21272 struct R3Vector point);
21273
21280RAPIER_API
21282 struct R3RigidBodyHandle handle,
21283 struct R3ColliderHandle *buffer,
21284 size_t capacity);
21285
21286#if defined(RAPIER_DIM3)
21292RAPIER_API
21294 struct R3RigidBodyHandle handle);
21295#endif
21296
21302RAPIER_API
21304 struct R3ColliderHandle handle);
21305
21311RAPIER_API
21313 struct R3ColliderHandle handle);
21314
21320RAPIER_API
21322 struct R3ColliderHandle handle);
21323
21329RAPIER_API
21331 struct R3ColliderHandle handle);
21332
21338RAPIER_API
21340 struct R3ColliderHandle handle);
21341
21346RAPIER_API
21348 struct R3ColliderHandle handle);
21349
21355RAPIER_API
21357 struct R3ColliderHandle handle);
21358
21364RAPIER_API
21366 struct R3ColliderHandle handle);
21367
21373RAPIER_API
21375 struct R3ColliderHandle handle);
21376
21382RAPIER_API
21384 struct R3ColliderHandle handle);
21385
21391RAPIER_API
21393 struct R3ColliderHandle handle);
21394
21400RAPIER_API
21402 struct R3ColliderHandle handle);
21403
21410RAPIER_API
21412 struct R3ColliderHandle handle);
21413
21419RAPIER_API
21421 struct R3RigidBodyHandle handle);
21422
21428RAPIER_API
21430 struct R3ColliderHandle handle);
21431
21437RAPIER_API
21439 struct R3RigidBodyHandle handle);
21440
21446RAPIER_API
21448 struct R3RigidBodyHandle handle);
21449
21455RAPIER_API
21457 struct R3RigidBodyHandle handle);
21458
21464RAPIER_API
21466 struct R3RigidBodyHandle handle);
21467
21473RAPIER_API
21475 struct R3RigidBodyHandle handle);
21476
21482RAPIER_API
21484 struct R3RigidBodyHandle handle);
21485
21491RAPIER_API
21493 struct R3RigidBodyHandle handle);
21494
21500RAPIER_API
21502 struct R3ColliderHandle handle);
21503
21509RAPIER_API
21511 struct R3ColliderHandle handle);
21512
21518RAPIER_API
21520 struct R3ColliderHandle handle);
21521
21527RAPIER_API
21529 struct R3ColliderHandle handle);
21530
21536RAPIER_API
21538 struct R3ColliderHandle handle);
21539
21545RAPIER_API
21547 struct R3ColliderHandle handle);
21548
21555RAPIER_API
21557 const struct R3RigidBodyHandle *handles,
21558 size_t handle_count,
21559 struct R3RigidBodyState *states,
21560 size_t capacity);
21561
21567RAPIER_API
21569 struct R3ColliderHandle handle);
21570
21576RAPIER_API
21578 struct R3ColliderHandle handle);
21579
21585RAPIER_API
21587 struct R3ColliderHandle handle);
21588
21594RAPIER_API
21596 struct R3ColliderHandle handle);
21597
21604RAPIER_API
21606 struct R3ColliderHandle handle);
21607
21613RAPIER_API
21615 struct R3RigidBodyHandle handle);
21616
21622RAPIER_API
21624 struct R3RigidBodyHandle handle);
21625
21631RAPIER_API
21633 struct R3RigidBodyHandle handle);
21634
21640RAPIER_API
21642 struct R3RigidBodyHandle handle);
21643
21653RAPIER_API
21655 const struct R3QueryOptions *query_options,
21656 struct R3Vector origin,
21657 struct R3Vector direction,
21658 R3Real max_toi,
21659 R3Bool solid,
21660 struct R3RayHit *buffer,
21661 size_t capacity);
21662
21670RAPIER_API
21672 const struct R3QueryOptions *query_options,
21673 struct R3Pose pose,
21674 struct R3Vector velocity,
21675 const R3SharedShape *shape,
21676 struct R3ShapeCastOptions options);
21677
21685RAPIER_API
21687 const struct R3QueryOptions *query_options,
21688 struct R3Vector point,
21689 R3Real max_distance,
21690 R3Bool solid);
21691
21696RAPIER_API
21698 R3Real time);
21699
21710RAPIER_API
21712 const struct R3QueryOptions *query_options,
21713 const struct R3NonlinearRigidMotion *motion,
21714 const R3SharedShape *shape,
21715 R3Real start_time,
21716 R3Real end_time,
21717 R3Bool stop_at_penetration);
21718
21725RAPIER_API
21727 struct R3ColliderHandle collider2);
21728
21734RAPIER_API
21737
21743RAPIER_API
21745 struct R3ColliderHandle collider2);
21746
21753RAPIER_API
21755 struct R3ContactPair *buffer,
21756 size_t capacity);
21757
21764RAPIER_API
21766 struct R3IntersectionPair *buffer,
21767 size_t capacity);
21768
21776RAPIER_API
21778 struct R3ColliderHandle collider2,
21779 struct R3ContactManifold *buffer,
21780 size_t capacity);
21781
21789RAPIER_API
21791 struct R3ColliderHandle collider2,
21792 size_t manifold_index,
21793 struct R3SolverContact *buffer,
21794 size_t capacity);
21795
21801RAPIER_API
21803
21808RAPIER_API
21810
21815RAPIER_API
21817 size_t index);
21818
21824RAPIER_API
21826 size_t index,
21827 const struct R3SolverContact *contact);
21828
21833RAPIER_API
21835 size_t index);
21836
21842RAPIER_API
21844 const struct R3EventCallbacks *callbacks);
21845
21851
21858RAPIER_API
21859size_t RAPIER_CALL r3DebugRenderWithStyle(const struct R3World *world,
21860 uint32_t mode,
21861 const struct R3DebugRenderStyle *style,
21862 struct R3DebugLine *buffer,
21863 size_t capacity);
21864
21865#ifdef __cplusplus
21866} // extern "C"
21867#endif // __cplusplus
21868
21869#endif
21870
21871#endif /* RAPIER_H */
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
Contact-force event, enabled by flags and the collider force threshold.
Definition rapier.h:14497
R3Real total_force_magnitude
Sum of contact force magnitudes.
Definition rapier.h:14513
struct R3ColliderHandle collider1
First collider in the pair.
Definition rapier.h:14501
struct R3ColliderHandle collider2
Second collider in the pair.
Definition rapier.h:14505
R3Real max_force_magnitude
Magnitude of the strongest contact force.
Definition rapier.h:14521
R3Bool started
1 for the first step the total force magnitude exceeds the threshold, 0 on the following steps while ...
Definition rapier.h:14526
struct R3Vector total_force
Sum of world-space contact forces.
Definition rapier.h:14509
struct R3Vector max_force_direction
World-space direction of the strongest contact force.
Definition rapier.h:14517
Geometric contact manifold of a contact pair: contacts sharing one normal.
Definition rapier.h:15293
size_t num_points
Number of geometric contact points; see r3ContactPoints.
Definition rapier.h:15317
uint32_t user_data
Application data, persistent across steps and editable by contact-modification hooks.
Definition rapier.h:15325
uint32_t subshape2
Index of the subshape of collider 2 (for composite shapes), zero otherwise.
Definition rapier.h:15313
uint32_t subshape1
Index of the subshape of collider 1 (for composite shapes), zero otherwise.
Definition rapier.h:15309
size_t num_solver_contacts
Number of solver contacts; see r3SolverContacts.
Definition rapier.h:15321
struct R3Vector local_n2
Contact normal in collider 2 local coordinates, pointing outward from it.
Definition rapier.h:15301
struct R3Vector normal
World-space contact normal, pointing from collider 1 toward collider 2.
Definition rapier.h:15305
struct R3Vector local_n1
Contact normal in collider 1 local coordinates, pointing outward from it.
Definition rapier.h:15297
Mutable per-manifold properties.
Definition rapier.h:14546
struct R3Vector normal
World-space contact or surface normal.
Definition rapier.h:14550
R3Real restitution
Nonnegative restitution coefficient.
Definition rapier.h:14558
R3Real friction
Nonnegative friction coefficient.
Definition rapier.h:14554
uint32_t user_data
Application data; Rapier does not own pointers encoded in it.
Definition rapier.h:14562
R3Bool enabled
Whether this setting/object is enabled (0 or 1).
Definition rapier.h:14566
Current narrow-phase pair and accumulated solver impulse summary.
Definition rapier.h:14785
struct R3ColliderHandle collider2
Second collider in the pair.
Definition rapier.h:14793
R3Real max_impulse
Largest contact impulse magnitude.
Definition rapier.h:14809
struct R3Vector max_impulse_direction
World-space direction of the largest contact impulse.
Definition rapier.h:14813
R3Bool has_any_active_contact
Whether the pair has an active solver contact.
Definition rapier.h:14797
struct R3ColliderHandle collider1
First collider in the pair.
Definition rapier.h:14789
struct R3Vector total_impulse
Sum of world-space contact impulse vectors.
Definition rapier.h:14801
R3Real total_impulse_magnitude
Sum of contact impulse magnitudes.
Definition rapier.h:14805
One manifold contact and its normal solver impulse.
Definition rapier.h:14839
struct R3Vector local_p2
Contact point in collider 2 local coordinates.
Definition rapier.h:14851
struct R3Vector normal
World-space contact or surface normal.
Definition rapier.h:14855
R3Real impulse
Normal impulse applied at this contact.
Definition rapier.h:14863
size_t manifold_index
Index of the contact manifold within its pair.
Definition rapier.h:14843
R3Real tangent_impulse[2]
Friction impulses along the two tangent basis vectors of the contact.
Definition rapier.h:14874
R3Real distance
Signed separation; negative means penetration.
Definition rapier.h:14859
struct R3Vector local_p1
Contact point in collider 1 local coordinates.
Definition rapier.h:14847
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 contact pair; check found before reading the pair.
Definition rapier.h:15262
R3Bool found
Whether a result exists; other result fields are meaningful only when this is 1.
Definition rapier.h:15270
struct R3ContactPair pair
Contact pair summary.
Definition rapier.h:15266
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
Contact seen by the constraint solver.
Definition rapier.h:15332
R3Real distance
Signed separation along the normal, contact skins deducted; negative means penetration.
Definition rapier.h:15344
struct R3Vector point2
World-space contact point on collider 2's body.
Definition rapier.h:15340
struct R3Vector tangent_velocity
Desired world-space tangent relative velocity, e.g.
Definition rapier.h:15348
struct R3Vector point1
World-space contact point on collider 1's body.
Definition rapier.h:15336
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