|
Rapier C — 2D / f32 0.36.0+c.0
|
Plain values and inline arithmetic. More...
Topics | |
| Inline math | |
Files | |
| file | rapier_helpers.h |
| Explicit invalid handle values; no owned resources. | |
Data Structures | |
| struct | R2SpringCoefficients |
| Spring softness expressed as natural frequency and damping ratio. More... | |
| struct | R2OptionalReal |
| Optional scalar override; enabled = 0 selects no override. More... | |
| struct | R2OptionalU32 |
| Optional unsigned integer override; enabled = 0 selects no override. More... | |
| struct | R2Vector |
| Cartesian vector with two or three components. More... | |
| struct | R2Rotation |
| 2D: angle in radians. More... | |
| struct | R2Pose |
| Rigid transform combining translation and rotation. More... | |
| struct | R2UserData |
| Application-defined 128-bit value. More... | |
| struct | R2VectorView |
| Borrowed array of vector elements. More... | |
| struct | R2RealView |
| Borrowed array of real elements. More... | |
| struct | R2IndexView |
| Borrowed array of index elements. More... | |
| struct | R2Edge |
| Vertex indices for one edge; contiguous u32 fields with no padding. More... | |
| struct | R2EdgeView |
| Borrowed array of edge elements. More... | |
| struct | R2Triangle |
| Vertex indices for one triangle; contiguous u32 fields with no padding. More... | |
| struct | R2TriangleView |
| Borrowed array of triangle elements. More... | |
| struct | R2Tetrahedron |
| Vertex indices for one tetrahedron; contiguous u32 fields with no padding. More... | |
| struct | R2TetrahedronView |
| Borrowed array of tetrahedron elements. More... | |
| struct | R2Dihedral |
| Vertex indices for one dihedral; contiguous u32 fields with no padding. More... | |
| struct | R2DihedralView |
| Borrowed array of dihedral elements. More... | |
| struct | R2OptionalBool |
| Optional boolean override. More... | |
| struct | R2MassProperties |
| Explicit mass and principal inertia, matching MassProperties constructors. More... | |
| struct | R2InteractionGroups |
| Collision membership/filter masks and their pairwise combination rule. More... | |
| struct | R2Aabb |
| Axis-aligned bounding box. More... | |
| struct | R2PodLayout |
| Sizes of the POD types in this library build, for foreign-language layout checks. More... | |
| struct | R2InverseKinematicsOptions |
| Damped least-squares inverse-kinematics parameters. More... | |
| struct | R2ByteView |
| Borrowed bytes. More... | |
| struct | R2ParticleDestination |
| Particle remapping after tearing. More... | |
| struct | R2OptionalParticleDestination |
| Optional particle remapping; check found before reading the destination. More... | |
| struct | R2VoxelKey |
| Integer coordinates of a voxel cell. More... | |
Typedefs | |
| typedef float | R2Real |
| Floating-point scalar: float for f32, double for f64. | |
| typedef struct R2SpringCoefficients | R2SpringCoefficients |
| Spring softness expressed as natural frequency and damping ratio. | |
| typedef uint32_t | R2Bool |
| ABI booleans are uint32_t: zero is false, one is true. | |
| typedef struct R2OptionalReal | R2OptionalReal |
| Optional scalar override; enabled = 0 selects no override. | |
| typedef struct R2OptionalU32 | R2OptionalU32 |
| Optional unsigned integer override; enabled = 0 selects no override. | |
| typedef struct R2Vector | R2Vector |
| Cartesian vector with two or three components. | |
| typedef struct R2Rotation | R2Rotation |
| 2D: angle in radians. | |
| typedef struct R2Pose | R2Pose |
| Rigid transform combining translation and rotation. | |
| typedef struct R2UserData | R2UserData |
| Application-defined 128-bit value. | |
| typedef struct R2VectorView | R2VectorView |
| Borrowed array of vector elements. | |
| typedef struct R2RealView | R2RealView |
| Borrowed array of real elements. | |
| typedef struct R2IndexView | R2IndexView |
| Borrowed array of index elements. | |
| typedef struct R2Edge | R2Edge |
| Vertex indices for one edge; contiguous u32 fields with no padding. | |
| typedef struct R2EdgeView | R2EdgeView |
| Borrowed array of edge elements. | |
| typedef struct R2Triangle | R2Triangle |
| Vertex indices for one triangle; contiguous u32 fields with no padding. | |
| typedef struct R2TriangleView | R2TriangleView |
| Borrowed array of triangle elements. | |
| typedef struct R2Tetrahedron | R2Tetrahedron |
| Vertex indices for one tetrahedron; contiguous u32 fields with no padding. | |
| typedef struct R2TetrahedronView | R2TetrahedronView |
| Borrowed array of tetrahedron elements. | |
| typedef struct R2TriangleView | R2CellView |
| Borrowed cell array: triangles in 2D, tetrahedra in 3D. | |
| typedef struct R2EdgeView | R2SurfaceElementView |
| Borrowed surface array: edges in 2D, triangles in 3D. | |
| typedef struct R2Dihedral | R2Dihedral |
| Vertex indices for one dihedral; contiguous u32 fields with no padding. | |
| typedef struct R2DihedralView | R2DihedralView |
| Borrowed array of dihedral elements. | |
| typedef struct R2OptionalBool | R2OptionalBool |
| Optional boolean override. | |
| typedef R2Real | R2AngVector |
| Angular scalar in 2D or vector in 3D, in radians for angular displacement. | |
| typedef struct R2MassProperties | R2MassProperties |
| Explicit mass and principal inertia, matching MassProperties constructors. | |
| typedef struct R2InteractionGroups | R2InteractionGroups |
| Collision membership/filter masks and their pairwise combination rule. | |
| typedef struct R2Aabb | R2Aabb |
| Axis-aligned bounding box. | |
| typedef struct R2PodLayout | R2PodLayout |
| Sizes of the POD types in this library build, for foreign-language layout checks. | |
| typedef struct R2InverseKinematicsOptions | R2InverseKinematicsOptions |
| Damped least-squares inverse-kinematics parameters. | |
| typedef struct R2ByteView | R2ByteView |
| Borrowed bytes. | |
| typedef struct R2ParticleDestination | R2ParticleDestination |
| Particle remapping after tearing. | |
| typedef struct R2OptionalParticleDestination | R2OptionalParticleDestination |
| Optional particle remapping; check found before reading the destination. | |
| typedef int32_t | R2VoxelCoord |
| Voxel coordinates have DIM signed integer components. | |
| typedef struct R2VoxelKey | R2VoxelKey |
| Integer coordinates of a voxel cell. | |
Functions | |
| R2Real | r2Sin (R2Real x) |
| Sine of an angle in radians, computed by Rapier's math backend. | |
| R2Real | r2Cos (R2Real x) |
| Cosine of an angle in radians, computed by Rapier's math backend. | |
| R2Real | r2Tan (R2Real x) |
| Tangent of an angle in radians, computed by Rapier's math backend. | |
| R2Real | r2Asin (R2Real x) |
| Arcsine in radians, computed by Rapier's math backend. | |
| R2Real | r2Acos (R2Real x) |
| Arccosine in radians, computed by Rapier's math backend. | |
| R2Real | r2Atan2 (R2Real y, R2Real x) |
| Angle in radians of the point (x, y), in [-pi, pi], computed by Rapier's math backend. | |
| R2Real | r2Exp (R2Real x) |
| Exponential e^x, computed by Rapier's math backend. | |
| R2Real | r2Ln (R2Real x) |
| Natural logarithm, computed by Rapier's math backend. | |
| R2Real | r2Powf (R2Real base, R2Real exponent) |
| base raised to the power exponent, computed by Rapier's math backend. | |
Plain values and inline arithmetic.
Constructors do not allocate.
| typedef struct R2Aabb R2Aabb |
Axis-aligned bounding box.
| typedef R2Real R2AngVector |
Angular scalar in 2D or vector in 3D, in radians for angular displacement.
| typedef uint32_t R2Bool |
ABI booleans are uint32_t: zero is false, one is true.
| typedef struct R2ByteView R2ByteView |
Borrowed bytes.
Valid while the source Bytes object remains alive; never free data.
| typedef struct R2TriangleView R2CellView |
Borrowed cell array: triangles in 2D, tetrahedra in 3D.
| typedef struct R2Dihedral R2Dihedral |
Vertex indices for one dihedral; contiguous u32 fields with no padding.
| typedef struct R2DihedralView R2DihedralView |
Borrowed array of dihedral elements.
count counts elements of the declared type. Copying this view does not copy its data or extend its lifetime. No Free is needed. Data must remain live through the build/insert call that reads the description. NULL is permitted only when count is zero.
| typedef struct R2Edge R2Edge |
Vertex indices for one edge; contiguous u32 fields with no padding.
| typedef struct R2EdgeView R2EdgeView |
Borrowed array of edge elements.
count counts elements of the declared type. Copying this view does not copy its data or extend its lifetime. No Free is needed. Data must remain live through the build/insert call that reads the description. NULL is permitted only when count is zero.
| typedef struct R2IndexView R2IndexView |
Borrowed array of index elements.
count counts elements of the declared type. Copying this view does not copy its data or extend its lifetime. No Free is needed. Data must remain live through the build/insert call that reads the description. NULL is permitted only when count is zero.
| typedef struct R2InteractionGroups R2InteractionGroups |
Collision membership/filter masks and their pairwise combination rule.
| typedef struct R2InverseKinematicsOptions R2InverseKinematicsOptions |
Damped least-squares inverse-kinematics parameters.
| typedef struct R2MassProperties R2MassProperties |
Explicit mass and principal inertia, matching MassProperties constructors.
Zero mass/inertia means infinite.
| typedef struct R2OptionalBool R2OptionalBool |
Optional boolean override.
When disabled, retain the recipe's native default.
| typedef struct R2OptionalParticleDestination R2OptionalParticleDestination |
Optional particle remapping; check found before reading the destination.
| typedef struct R2OptionalReal R2OptionalReal |
Optional scalar override; enabled = 0 selects no override.
| typedef struct R2OptionalU32 R2OptionalU32 |
Optional unsigned integer override; enabled = 0 selects no override.
| typedef struct R2ParticleDestination R2ParticleDestination |
Particle remapping after tearing.
| typedef struct R2PodLayout R2PodLayout |
Sizes of the POD types in this library build, for foreign-language layout checks.
| typedef struct R2Pose R2Pose |
Rigid transform combining translation and rotation.
Use TranslationPose with a zero vector for identity.
| typedef float R2Real |
Floating-point scalar: float for f32, double for f64.
| typedef struct R2RealView R2RealView |
Borrowed array of real elements.
count counts elements of the declared type. Copying this view does not copy its data or extend its lifetime. No Free is needed. Data must remain live through the build/insert call that reads the description. NULL is permitted only when count is zero.
| typedef struct R2Rotation R2Rotation |
2D: angle in radians.
3D: unit quaternion in x,y,z,w order (normalized on input).
| typedef struct R2SpringCoefficients R2SpringCoefficients |
Spring softness expressed as natural frequency and damping ratio.
| typedef struct R2EdgeView R2SurfaceElementView |
Borrowed surface array: edges in 2D, triangles in 3D.
| typedef struct R2Tetrahedron R2Tetrahedron |
Vertex indices for one tetrahedron; contiguous u32 fields with no padding.
| typedef struct R2TetrahedronView R2TetrahedronView |
Borrowed array of tetrahedron elements.
count counts elements of the declared type. Copying this view does not copy its data or extend its lifetime. No Free is needed. Data must remain live through the build/insert call that reads the description. NULL is permitted only when count is zero.
| typedef struct R2Triangle R2Triangle |
Vertex indices for one triangle; contiguous u32 fields with no padding.
| typedef struct R2TriangleView R2TriangleView |
Borrowed array of triangle elements.
count counts elements of the declared type. Copying this view does not copy its data or extend its lifetime. No Free is needed. Data must remain live through the build/insert call that reads the description. NULL is permitted only when count is zero.
| typedef struct R2UserData R2UserData |
Application-defined 128-bit value.
Contains no owned pointers.
| typedef struct R2Vector R2Vector |
Cartesian vector with two or three components.
| typedef struct R2VectorView R2VectorView |
Borrowed array of vector elements.
count counts elements of the declared type. Copying this view does not copy its data or extend its lifetime. No Free is needed. Data must remain live through the build/insert call that reads the description. NULL is permitted only when count is zero.
| typedef int32_t R2VoxelCoord |
Voxel coordinates have DIM signed integer components.
| typedef struct R2VoxelKey R2VoxelKey |
Integer coordinates of a voxel cell.
Angle in radians of the point (x, y), in [-pi, pi], computed by Rapier's math backend.
See r2Sin.
Cosine of an angle in radians, computed by Rapier's math backend.
See r2Sin.
base raised to the power exponent, computed by Rapier's math backend.
See r2Sin.
Sine of an angle in radians, computed by Rapier's math backend.
With enhanced-determinism (see BuildFeatures), the result is identical on every platform.