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

◆ CreateScale()

static constexpr Matrix33 SRL::Math::Types::Matrix33::CreateScale ( const Vector3D & scale)
inlinestaticconstexprinherited

Create a scale matrix.

Creates a diagonal matrix that represents a non-uniform scaling transformation. When applied to a vector, each component is multiplied by the corresponding scale factor.

The resulting matrix will be: | sx 0 0 | | 0 sy 0 | | 0 0 sz |

Parameters
scaleVector containing scale factors for each axis.
Returns
A new scale matrix.
Note
Unlike the Scale() method, this creates a fresh matrix that only represents scaling, without affecting rotation.
Matrix33 scaleMatrix = Matrix33::CreateScale(Vector3D(2, 2, 2)); // Uniform scale by 2
Vector3D scaled = scaleMatrix * Vector3D(1, 1, 1); // Results in (2, 2, 2)
static constexpr Matrix33 CreateScale(const Vector3D &scale)
Create a scale matrix.
Definition mat33.hpp:686
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