I wasn't sure which topic to put this in, it is math but also programming. I was wondering if someone would be good enough to write a little c function, or java, etc. to show me how multiply matrices in this order. My request is please do NOT use an array of arrays. Just a single float[16] or float[4];
Matrices are 4 x 4 column-vector matrices stored in column-major order:
m[offset + 0] m[offset + 4] m[offset + 8] m[offset + 12]
m[offset + 1] m[offset + 5] m[offset + 9] m[offset + 13]
m[offset + 2] m[offset + 6] m[offset + 10] m[offset + 14]
m[offset + 3] m[offset + 7] m[offset + 11] m[offset + 15]
Vectors are 4 x 1 column vectors stored in order: v[offset + 0]
v[offset + 1]
v[offset + 2]
v[offset + 3]
The reason why I need this is because android MatrixMM and MatrixMV are written in native code and I need to reproduce them.
http://developer.android.com/reference/android/opengl/Matrix.html