Results 1 to 2 of 2

Thread: rotations//translate

  1. #1
    Member Contributor
    Join Date
    May 2008


    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?
    Many thanks

  2. #2
    Junior Member Newbie
    Join Date
    Jan 2012

    Re: rotations//translate

    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

Similar Threads

  1. Replies: 0
    Last Post: 03-19-2014, 10:11 PM
  2. can i translate
    By 6630 in forum OpenGL: Linux
    Replies: 1
    Last Post: 10-23-2007, 06:52 AM
  3. translate; scale; translate;
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 04-25-2004, 03:28 AM
  4. Represent Rotate and Translate by one Translate
    By Luin in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 07-02-2000, 01:54 PM
  5. translate?
    By CyBBe in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 04-04-2000, 11:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean