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

◆ CreateTransform()

static constexpr Matrix43 SRL::Math::Types::Matrix43::CreateTransform ( const Vector3D & translation,
const EulerAngles & rotation,
const Vector3D & scale = Vector3D(1, 1, 1) )
inlinestaticconstexpr

Creates transformation matrix.

This static method generates a transformation matrix that combines translation, rotation, and scale. The resulting matrix can be used to transform points in world space by applying the specified translation, rotation angles, and scale factors.

Template Parameters
PPrecision level for calculation, allowing users to choose the desired precision for the calculations.
Parameters
translationThe position offset as a Vector3D.
rotationThe rotation as EulerAngles (pitch, yaw, roll).
scaleThe scale factors as a Vector3D (default: 1, 1, 1).
Returns
A new Matrix43 object representing the combined transformation.
Vector3D(1, 2, 3), // Translation
EulerAngles(Angle::Zero(), Angle::HalfPi(), Angle::Zero()), // 90° rotation around Y axis
Vector3D(2, 2, 2) // Scale
);
static consteval Angle HalfPi()
90° (0x4000)
Definition angle.hpp:62
static consteval Angle Zero()
0° (0x0000)
Definition angle.hpp:60
Represents three rotation angles in Euler angle format.
Definition angle.hpp:612
constexpr Matrix43()
Default constructor initializing to a zero matrix.
Definition mat43.hpp:85
static constexpr Matrix43 CreateTransform(const Vector3D &translation, const EulerAngles &rotation, const Vector3D &scale=Vector3D(1, 1, 1))
Creates transformation matrix.
Definition mat43.hpp:477
A high-performance three-dimensional vector implementation optimized for Saturn hardware.
Definition vector3d.hpp:51