PDA

View Full Version : Rotate and pivot



Reillin
08-14-2004, 08:22 PM
I am trying to rotate and pivot a cyclinder, like a robot arm,

I would pivot at the base of the arm, so the whole arm would move in a clock like behaviour, but i also need to rotate the arm at any time

I need to keep track of the arm rotating so that i can get the vector for rotating the arm

Any tips?
Cheers

dorbie
08-16-2004, 06:47 PM
It sounds like you are doing a tutorial to teach you about hierarchical transformation on the modelview matrix.

Look at pushmatrix, popmatrix, glrotate and gltranslate function calls.

Read the appropriate chapter of the red book instead of asking online.

http://fly.cc.fer.hr/~unreal/theredbook/

See example 3.7 here:

http://fly.cc.fer.hr/~unreal/theredbook/chapter03.html

Ported to glut here:

http://www.sgi.com/software/opengl/examples/redbook/

Reillin
08-25-2004, 03:18 PM
Thanks Dorbie,

that was really helpful.

I'm totally new to this 3D arena and should really be buying a book (as soon as i get some money) :)

Reillin