Opening door...

Im trying to rotate an object "“a door in my case”,around his rotation point,in fact im trying to do a door.The probleme is that im trying to move the center of rotation to the door’s axe and I doesn’t seem to get the trick with matrix “operation”.

Thank for any trick you could share.

Between glrotate and your drawDoor() code, you can draw the x,y,z axis .so when application runs , you can get better picture on where the door are placed in the current transformed coordinate system.

maybe you should swap glTranslate and glRotate in your code!
here is how it must be:
glPushMatrix();
glTranslatef(position_of_the_door_in_space)
glRotatef(rot_angle,0,1,0);
glTranslatef(offset_-_this_will_move_axis);
DrawDoor();
glPopMatrix();

here is the values for example if yourdoor at (0,0,0) and its size by x is 2;
offset.x = 1;
position = vec3(0,0,0);

[This message has been edited by gvm (edited 07-04-2003).]

Thank!