<<< Homogeneous coordinates     Index     Matrix and vector math >>>

3. Matrix


  • Mathematically, a matrix is a set of numbers arranged in uniform rows and columns

  • OpenGL understands column-primary layout for matrices: in a 4x4 matrix, the first four elements of an array provide the first column of the matrix, followed by second column, and so on.

    4x4 matrix
  • 
        float matrix4x4[] = {
            a, e, i, 0,   // 1st column
            b, f, j, 0,   // 2nd column
            c, g, k, 0,   // 3rd column
            d, h, l, 1    // 4th column
        };
    
    

<<< Homogeneous coordinates     Index     Matrix and vector math >>>