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:

1 float array[16] =
2 {
3    1, 0, 0, 0,
4    0, 1, 0, 0,
5    0, 0, 1, 0,
6    x, y, z, 1
7 };
8 
9 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