PDA

View Full Version : translation



lee
08-23-2000, 09:42 PM
I try to write some code for translate function, but it didn't worked properly. why?

///////////////////////////////////////

float m[16];

void translateDouble(double x, double y, double z)
{
m[12] = m[0] * x + m[4] * y + m[8] * z + m[12];
m[13] = m[1] * x + m[5] * y + m[9] * z + m[13];
m[14] = m[2] * x + m[6] * y + m[10] * z + m[14];
m[15] = m[3] * x + m[7] * y + m[11] * z + m[15];
}