compose static method
Composes multiple transformation matrices
Implementation
static Matrix4? compose(
Matrix4? matrix,
Matrix4? translation,
Matrix4? scale,
Matrix4? rotation,
) {
matrix ??= Matrix4.identity();
if (translation != null) matrix = translation * matrix;
if (scale != null) matrix = scale * matrix;
if (rotation != null) matrix = rotation * matrix;
return matrix;
}