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

◆ RotateZ()

Matrix33 & SRL::Math::Types::Matrix33::RotateZ ( const Angle & angleZ)
inlineconstexprinherited

Apply Z-axis rotation to the current matrix.

Modifies the current matrix by applying a rotation around the Z-axis. This is equivalent to multiplying the current matrix by a rotation matrix.

The Z-axis rotation matrix is: | cos(θ) -sin(θ) 0 | | sin(θ) cos(θ) 0 | | 0 0 1 |

Parameters
angleZRotation angle around Z-axis.
Returns
Reference to this matrix after rotation.
Note
This is ideal for continuous transformations like animation as it modifies the existing matrix rather than creating a new one.
transform.RotateZ(Angle::FromDegrees(45)); // Rotate 45° around Z
static consteval Angle FromDegrees(double degrees)
Creates angle from degrees at compile time.
Definition angle.hpp:204
static consteval Matrix33 Identity()
Create an identity matrix.
Definition mat33.hpp:719
constexpr Matrix33 & RotateZ(const Angle &angleZ)
Apply Z-axis rotation to the current matrix.
Definition mat33.hpp:432
constexpr Matrix33()
Default constructor initializing to a zero matrix.
Definition mat33.hpp:76