Is there a way to set the origin point for a rotation.
I have an object I am rotating and it is only on the screen for angles between 300 and 320 degree rotations.
I have tried transforming the object after the rotation but the numbers I am inputting are just guessed so I still dont have any control over where the object will appear.
Ideally I would like to set the origin point as the bottomleft of my graphic and have it revolve around that.
the code I have tried out is
glPushMatrix();
glRotated(90, 0, 0, 1);
object();
glPopMatrix();
I have also inserted the line glTranslated(); with values for the x and y.
My results so far have been either off screen
On a part of the screen that I dont want them to be on. Or the rest of my scene has rotated and the object I am trying to rotate has remained in the same place.
I have looked through other posts and tried various things but am still having no luck.
Can anybody help me with this?
Thanks