PDA

View Full Version : rotate question



edwong
11-23-2003, 09:54 PM
hi,

i have defined a new point a = (x,y,z) in my world scene.
i would like to rotate the object wrt the new point a but not the origin (0,0,0)

any ideas how to do?

ed

Bob
11-24-2003, 12:26 AM
Translate the point a to the origin, rotate, and translate back.



glTranslate(a)
glRotate(...)
glTranslate(-a)


[This message has been edited by Bob (edited 11-24-2003).]