PDA

View Full Version : 3D rotation position



mikethebike
07-05-2010, 12:47 AM
Hi
rotate like below:

x' = x*cos(a) y*sin(a)
y' = x*sin(a) + y*cos(a)
z' = z

y' = y*cos q z*sin q
z' = y*sin q + z*cos q
x' = x

z' = z*cos q x*sin q
x' = z*sin q + x*cos q
y' = y

Now I need x,y,z for openal sound positions. What are the resulting positions as of above? And what if I need one sound in front and one towards the back? I've initial sound positions x,y,z and heading for an airplane.
Many thanks
Michael

mikethebike
07-08-2010, 04:49 AM
I give up. Anyone could help me? I've got camera/listener x,y,z and heading as well as source x,y,z,heading and roll, pitch.
Airplane sounds front and back in OpenAL
Would be great.