Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: I don't like glRotate and glTranslate hehehe :)

  1. #1
    Junior Member Regular Contributor
    Join Date
    Jul 2001
    Location
    Sherbrooke
    Posts
    146

    I don't like glRotate and glTranslate hehehe :)

    Hi. I'm trying to figure out how to move around my 3d world and also place my object and move them independently of the camera...and also without using gluLookAt
    Can anyone help ?
    Let's have a funny day

  2. #2
    Junior Member Regular Contributor
    Join Date
    Jul 2001
    Location
    Sherbrooke
    Posts
    146

    Re: I don't like glRotate and glTranslate hehehe :)

    Precision : If you could enlighten me with how to use glPushMatrix and glPopMatrix and also what is the proper order to draw and transfom( rotate and translate ) object in the 3d world I would be pleased !
    I need the logic of the camera and the object.
    Thanks alot
    Let's have a funny day

  3. #3
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Hannover, Germany
    Posts
    1,258

    Re: I don't like glRotate and glTranslate hehehe :)

    Move the objects around with the ModelView matrix. glRotate, glTranslate and glScale.
    Now your object are placed in the world-coordinate system.

    Then put together a matrix that would represent the camera-object (ie. position of the camera negatively). Matrix 1 is the result.
    Then get the rotation matrix of the camera. Transpose this matrix (orthogonal transpose = inverse) and the resulting one is Matrix 2.
    Take Matrix2 * Matrix1 = Matrix 3.
    Multiply Matrix 3 on the objects modelview matrix. There you go.
    - Michael Steinberg

  4. #4
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,609

    Re: I don't like glRotate and glTranslate hehehe :)

    if u understand gluLookAt(..) then use it, youll pick up linear algebra with time.
    btw carmack used a function called myGluLookAt(..) in quake1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •