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

◆ Matrix33() [2/3]

SRL::Math::Types::Matrix33::Matrix33 ( const Vector3D & up,
const Vector3D & direction )
inlineconstexpr

Creates rotation matrix from up and direction vectors.

This constructor builds a rotation matrix using an up vector and a direction vector. The right vector is automatically computed as the cross product of up and direction.

Parameters
upThe up vector defining the local Y axis.
directionThe direction vector defining the local Z axis.
Note
Ensure that up and direction vectors are not collinear to avoid undefined behavior.
Matrix33 rotation = Matrix33(
Vector3D(0, 1, 0), // Up vector
Vector3D(0, 0, 1) // Direction vector
);
constexpr Matrix33()
Default constructor initializing to a zero matrix.
Definition mat33.hpp:76
A high-performance three-dimensional vector implementation optimized for Saturn hardware.
Definition vector3d.hpp:51