I need to rotate on all axes a terrain. ok but now how to translate for looking from above and at distance?
glTranslatef(0, 70, -250);//distance and above?
glRotatef …pitch heading etc.
Like that the terrain moves but it should not move in relation to the viewer. In other words how to put the viewer into the middle of the rotating terrain?
I think what you are asking for is how to rotate a terrain model around its own local axis.
Should be as simple as:
set up initial camera view
… now rotate the terrain model
… terrain model is by definition in local model space and
… should have been placed in the center (0,0,0), if not
… use glTransalate3f () to place it at the local-space center
glRotate4f (a,b,c, n) … where abc is the axis and n is angle in deg
and that is it