Possible Duplicate:
How to convert Euler angles to directional vector?
I'm using OpenGL to rotate a brick. The brick simulates a phone that has an accelerometer. The initial vector I'm using is (0.0, 0.0,-1.0)
glRotatef(angle.x, 1.0, 0.0, 0.0);
glRotatef(angle.y, 0.0, 1.0, 0.0);
glRotatef(angle.z, 0.0, 0.0, 1.0);
How do I get the accelerometer's vector from the angles above?