Original Post
what does the matrix look like for the functions glRotatef() and glTranslatef()?
1 , 0 , 0 , 0
0 , 1 , 0 , 0
0 , 0 , 1 , 0
x , y , z , 1
float c = cosf(theta);
float s = sinf(theta);
x*x(1-c)+c , y*x(1-c)+z*s , x*z(1-c)-y*s, 0
x*y(1-c)-z*s , y*y(1-c)+c , y*z(1-c)+x*s, 0
x*z(1-c)+y*s , y*z(1-c)-x*s , z*z(1-c)+c , 0
0 , 0 , 0 , 1
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more