PDA

View Full Version : axis



fobru
07-31-2003, 04:43 AM
I'm rotating and translating my object with the mousemove in combination with the mousebuttons.
Now I want to have the axis shown in the lower left corner of the window so it doesn't move with the translations and the rotations(it stays on the same place in the viewport) and it shows the direction of the object.
Does anybody know how to do it??

nexusone
07-31-2003, 05:19 AM
Just clear the matrix before you draw it, would look something like this.


// Draw scene
insert code here

// Draw axis
glLoadIdentity();
Draw_current_axis();


Originally posted by fobru:
I'm rotating and translating my object with the mousemove in combination with the mousebuttons.
Now I want to have the axis shown in the lower left corner of the window so it doesn't move with the translations and the rotations(it stays on the same place in the viewport) and it shows the direction of the object.
Does anybody know how to do it??

fobru
07-31-2003, 05:46 AM
I did so.
I rotate the axis in (0,0,0) but then I have to translate them to the lower left corner of my screen and I don't know exactly what the coordinates are of this point because of the rotation!