Degree rotation to normal ???
Hi, i am building a camera class and i now need the normal of a rotation so i can determine exactly what''s viewed and what''s not. For rotation i''ve got two doubles (xrot and yrot) and i use those to rotate the scene with the camera as the origin using glRotated.
So, does anyone know how to calculate this normal?
Thanks in advance, TP
Hello!
For determinig what is visible or not, you should use the direction of the camera, not the normal of the rotation. Or maybe i have something misunderstood? (my english is u know...)
Btw what is the normal of a rotation? I can calculate it for you, if you explain your problem more detailed.
cu
"Knowledge is no more expensive than ignorance, and at least as satisfying." -Barrin
For determinig what is visible or not, you should use the direction of the camera, not the normal of the rotation. Or maybe i have something misunderstood? (my english is u know...)
Btw what is the normal of a rotation? I can calculate it for you, if you explain your problem more detailed.
cu
"Knowledge is no more expensive than ignorance, and at least as satisfying." -Barrin
"Knowledge is no more expensive than ignorance, and at least as satisfying." -Barrin
Well ok, what i mean with the normal of a rotation is the directional vector (=normal) of the direction the camera is looking in.
Lets say the camera is rotated 32.0 degrees around the x axis and 172.7 degrees around the y axis, how do i calculate the direction it''s looking in.
Lets say the camera is rotated 32.0 degrees around the x axis and 172.7 degrees around the y axis, how do i calculate the direction it''s looking in.
January 06, 2004 09:37 AM
You should keep a vector that represents the initial direction which is down the Z axis (can''t remember if positive or negative). Then you just rotate that vector manually by the same amount as your camera.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement