#### Archived

This topic is now archived and is closed to further replies.

# Degree rotation to normal ???

This topic is 5305 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites
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

##### Share on other sites
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.

##### Share on other sites
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.

##### Share on other sites
Never mind, i''ve decided to use my own modelview matrix for all 3d viewing, this solves a lot difficulties .

1. 1
2. 2
Rutin
19
3. 3
JoeJ
16
4. 4
5. 5

• 35
• 23
• 13
• 13
• 17
• ### Forum Statistics

• Total Topics
631700
• Total Posts
3001808
×