I have a world coordinate model, which I read from a file (the positon can be anywhere) with me.
I am trying to do 2 things:
To display the entire model.
To rotate the model on it’s own centric axis (ie, rotate about the axis which passes thru the center of the model in any 3 directions).
I have done first one by calling glOrtho()
and glTranslatef() (this is tricky as i have to generalize any data).
After displaying the model in window, when I try to rotate the model around it’s own axis, it rotates as if the origin is in the world coord.
one condition: The model rotates around it’s own axis after translating the model to the origin. But I don’t want to do that as it is expensive to transform all points of the data.
Thanks in advance,