Mat4

4x4 float matrix (mat4 in GLSL)

The matrix can be constructed from an array with 4x4 elements, aligned in column-major order. For example, a translation by (x, y, z) looks as follows:

float array[16] =
{
    1, 0, 0, 0,
    0, 1, 0, 0,
    0, 0, 1, 0,
    x, y, z, 1
};

auto matrix = Mat4(array);

$(PARA Mat4 can also be converted from a $(TRANSFORM_LINK Transform).)

Transform transform;
auto matrix = Mat4(transform);
alias Mat4 = Matrix!(4, 4)

Meta