Rapier C — 3D / f64 0.36.0+c.0
Loading...
Searching...
No Matches

Macros

#define R3_PI   ((R3Real)3.14159265358979323846)
 Pi in the selected scalar precision.

Functions

static R3Vector r3Vector (R3Real x, R3Real y, R3Real z)
 Construct a vector from its components.
static R3Rotation r3RotationFromAxisAngle (R3Vector axis, R3Real angle)
 Construct a 3D unit quaternion; normalizes axis, and returns identity for a zero axis.
static R3Vector r3VectorAdd (R3Vector a, R3Vector b)
 Return a + b.
static R3Vector r3VectorSub (R3Vector a, R3Vector b)
 Return a - b.
static R3Vector r3VectorScale (R3Vector vector, R3Real scale)
 Multiply each component by scale.
static R3Real r3VectorDot (R3Vector a, R3Vector b)
 Return the dot product.
static R3Real r3VectorLength (R3Vector vector)
 Return the Euclidean length.
static R3Vector r3VectorNormalize (R3Vector vector)
 Normalize a nonzero vector; a zero vector is returned unchanged.
static R3Vector r3VectorCross (R3Vector a, R3Vector b)
 Return the 3D cross product a x b.
static R3Rotation r3RotationMul (R3Rotation a, R3Rotation b)
 Compose rotations, applying b then a.
static R3Vector r3RotationTransformVector (R3Rotation rotation, R3Vector vector)
 Rotate a vector; rotation must be normalized.
static R3Pose r3Pose (R3Vector translation, R3Rotation rotation)
 Construct a pose from translation and rotation without validation.
static R3Pose r3TranslationPose (R3Vector translation)
 Construct a pose with the supplied translation and identity rotation.
static R3MassProperties r3MassProperties (R3Vector local_com, R3Real mass, R3AngVector principal_inertia)
 Construct mass properties from a local center of mass, a mass, and principal angular inertia (a scalar in 2D); in 3D the principal inertia frame is the identity rotation.
static R3Rotation r3RotationInverse (R3Rotation rotation)
 Return the inverse of a normalized rotation.
static R3Vector r3PoseTransformPoint (R3Pose pose, R3Vector point)
 Transform a point by rotation then translation.
static R3Pose r3PoseInverse (R3Pose pose)
 Return the inverse rigid transform.

Detailed Description

Macro Definition Documentation

◆ R3_PI

#define R3_PI   ((R3Real)3.14159265358979323846)

Pi in the selected scalar precision.

Function Documentation

◆ r3MassProperties()

R3MassProperties r3MassProperties ( R3Vector local_com,
R3Real mass,
R3AngVector principal_inertia )
inlinestatic

Construct mass properties from a local center of mass, a mass, and principal angular inertia (a scalar in 2D); in 3D the principal inertia frame is the identity rotation.

◆ r3Pose()

R3Pose r3Pose ( R3Vector translation,
R3Rotation rotation )
inlinestatic

Construct a pose from translation and rotation without validation.

◆ r3PoseInverse()

R3Pose r3PoseInverse ( R3Pose pose)
inlinestatic

Return the inverse rigid transform.

Rotation must be normalized.

◆ r3PoseTransformPoint()

R3Vector r3PoseTransformPoint ( R3Pose pose,
R3Vector point )
inlinestatic

Transform a point by rotation then translation.

Rotation must be normalized.

◆ r3RotationFromAxisAngle()

R3Rotation r3RotationFromAxisAngle ( R3Vector axis,
R3Real angle )
inlinestatic

Construct a 3D unit quaternion; normalizes axis, and returns identity for a zero axis.

Angle is in radians.

◆ r3RotationInverse()

R3Rotation r3RotationInverse ( R3Rotation rotation)
inlinestatic

Return the inverse of a normalized rotation.

◆ r3RotationMul()

R3Rotation r3RotationMul ( R3Rotation a,
R3Rotation b )
inlinestatic

Compose rotations, applying b then a.

Inputs must be normalized.

◆ r3RotationTransformVector()

R3Vector r3RotationTransformVector ( R3Rotation rotation,
R3Vector vector )
inlinestatic

Rotate a vector; rotation must be normalized.

◆ r3TranslationPose()

R3Pose r3TranslationPose ( R3Vector translation)
inlinestatic

Construct a pose with the supplied translation and identity rotation.

◆ r3Vector()

R3Vector r3Vector ( R3Real x,
R3Real y,
R3Real z )
inlinestatic

Construct a vector from its components.

◆ r3VectorAdd()

R3Vector r3VectorAdd ( R3Vector a,
R3Vector b )
inlinestatic

Return a + b.

◆ r3VectorCross()

R3Vector r3VectorCross ( R3Vector a,
R3Vector b )
inlinestatic

Return the 3D cross product a x b.

◆ r3VectorDot()

R3Real r3VectorDot ( R3Vector a,
R3Vector b )
inlinestatic

Return the dot product.

◆ r3VectorLength()

R3Real r3VectorLength ( R3Vector vector)
inlinestatic

Return the Euclidean length.

◆ r3VectorNormalize()

R3Vector r3VectorNormalize ( R3Vector vector)
inlinestatic

Normalize a nonzero vector; a zero vector is returned unchanged.

◆ r3VectorScale()

R3Vector r3VectorScale ( R3Vector vector,
R3Real scale )
inlinestatic

Multiply each component by scale.

◆ r3VectorSub()

R3Vector r3VectorSub ( R3Vector a,
R3Vector b )
inlinestatic

Return a - b.