This project is read-only.

Rotating an object around certain point

Mar 9, 2012 at 4:43 AM
Hi All, I would like to learn that how can I rotate an object around certain point. Like rotate an object at its axis and then rotate at with respect to some point ?
Mar 26, 2012 at 11:45 AM

Hi Usman,

Here's an example.

Vertex vPoint1 = new Vertex(0,0,0);
Vertex vPoint2 = new Vertex(3,0,5);

gl.Translate(vPoint1);
gl.Rotate(1.0, 1.0, 0, 0);
gl.Translate(vPoint2);
gl.Rotate(0.4, 0.0, 1.0, 0);

That sort of arrangement should do it