Normal Vector Rotations
Alrighty then...
Ive made a quad which has a normal of [0,0,1] and then ive rotated it, shall we say, 56.17 degrees about the y-axis.. this has obviously changed the normal:
glRotatef(56.17,0,1,0); {Please excuse the pascal code}
glNormal3f(0,0,1);
What i was wondering, was how to extract the values of the new normal after undergoing the rotation, WITHOUT all that inaccurate math like X=Z*Cos(56.17)+X*Sin(56.17) or whatever..
is there some way to extract these values from one of openGL''s many matrices? If so, may i ask How?!
Thanks ppl =P
-- Wav
I''m also having no luck trying to figure this exact problem... anyone wanna help?
-Darkness
-Darkness
"You think that''s air your breathing now?"
Hi, I think you need to use rotation matrixes or quaternions.
Go to www.gamasutra.com, they got some tutorials about quaternions, which they suggest to use to solve rotations on the 3 axis.
Good luck !
Go to www.gamasutra.com, they got some tutorials about quaternions, which they suggest to use to solve rotations on the 3 axis.
Good luck !
Why do you need to recalculate it? If you use glRotatef you should not need to recalculate the normal you can just use the old coordinates and the old normal and OpenGL figures out the rest.
Prosser: But the plans were on display.Arthur Dent: On display? I eventually had to go down to the cellar.Prosser: That's the display department.Arthur Dent: With a torch.Prosser: The lights had probably gone.Arthur Dent: So had the stairs.Prosser: But you did see the notice, didn't you?Arthur Dent: Oh, yes. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign outside the door saying "Beware of the Leopard." Ever thought of going into advertising?
That''s not the case. Ive used the normal [0,0,1] for opengl after rotating it, but i need to know the rotated normal for other math calculations - not for opengl.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement