PDA

View Full Version : Rotation



sanjay_ach
09-28-2001, 09:24 AM
Hi

I have a pyramid at a distance (0,0, -z) from (0,0,0). I want to rotate the pyramid about its own axis instead of the origin (0,0,0)...right now when I rotate by say 45 deg...the pyramid rotates around the origin...How can i do that?

Thanks in advance

Sanjay

09-28-2001, 10:30 AM
>I have a pyramid at a distance (0,0, -z) from (0,0,0). I want to rotate the pyramid about its >own axis

well, basic opengl. keep in mind: in GL all transforms are reverse. means:
-first translate (glTranslatef(0,0,-1) or whatever)
-then rotate

--styx