SaturnRingLibrary 0.9.1
SGL wrapper
 
Loading...
Searching...
No Matches

◆ CreateRotation()

static constexpr Matrix33 SRL::Math::Types::Matrix33::CreateRotation ( const Angle & angleX,
const Angle & angleY,
const Angle & angleZ )
inlinestaticconstexprinherited

Create a rotation matrix from Euler angles.

Creates a fresh matrix representing a combined rotation around all three axes. The rotations are applied in the order: Z, then Y, then X (intrinsic rotations).

The resulting matrix is a combination of three rotations: M = Rx * Ry * Rz, where:

  • Rx is rotation around X-axis
  • Ry is rotation around Y-axis
  • Rz is rotation around Z-axis
Parameters
angleXRotation angle around X-axis (pitch).
angleYRotation angle around Y-axis (yaw).
angleZRotation angle around Z-axis (roll).
Returns
A new rotation matrix.
Note
The order of rotations matters. Changing the order will result in a different final orientation.
Angle::FromDegrees(30), // X rotation (pitch)
Angle::FromDegrees(45), // Y rotation (yaw)
Angle::FromDegrees(60) // Z rotation (roll)
);
static consteval Angle FromDegrees(double degrees)
Creates angle from degrees at compile time.
Definition angle.hpp:204
static constexpr Matrix33 CreateRotation(const Angle &angleX, const Angle &angleY, const Angle &angleZ)
Create a rotation matrix from Euler angles.
Definition mat33.hpp:517
constexpr Matrix33()
Default constructor initializing to a zero matrix.
Definition mat33.hpp:76