occ
Loading...
Searching...
No Matches
occ::mults::rotation_utils Namespace Reference

Utility functions for rotation matrix creation. More...

Functions

RotationMatrix euler_to_rotation (double alpha, double beta, double gamma)
 Create rotation matrix from Euler angles (ZYZ convention)
 
RotationMatrix axis_angle_to_rotation (const Vec3 &axis, double angle)
 Create rotation matrix from axis-angle representation.
 
RotationMatrix quaternion_to_rotation (const Vec4 &q)
 Create rotation matrix from quaternion.
 
bool is_rotation_matrix (const RotationMatrix &R, double tolerance=1e-10)
 Validate that a matrix is a proper rotation matrix.
 

Detailed Description

Utility functions for rotation matrix creation.

Function Documentation

◆ axis_angle_to_rotation()

RotationMatrix occ::mults::rotation_utils::axis_angle_to_rotation ( const Vec3 axis,
double  angle 
)

Create rotation matrix from axis-angle representation.

Parameters
axisRotation axis (will be normalized)
angleRotation angle in radians
Returns
3x3 rotation matrix

◆ euler_to_rotation()

RotationMatrix occ::mults::rotation_utils::euler_to_rotation ( double  alpha,
double  beta,
double  gamma 
)

Create rotation matrix from Euler angles (ZYZ convention)

Parameters
alphaFirst rotation around Z axis (radians)
betaRotation around Y axis (radians)
gammaFinal rotation around Z axis (radians)
Returns
3x3 rotation matrix

◆ is_rotation_matrix()

bool occ::mults::rotation_utils::is_rotation_matrix ( const RotationMatrix R,
double  tolerance = 1e-10 
)

Validate that a matrix is a proper rotation matrix.

Parameters
RMatrix to check
Returns
true if R is a valid rotation matrix

◆ quaternion_to_rotation()

RotationMatrix occ::mults::rotation_utils::quaternion_to_rotation ( const Vec4 q)

Create rotation matrix from quaternion.

Parameters
qQuaternion as [w, x, y, z] (will be normalized)
Returns
3x3 rotation matrix