Results 1 to 2 of 2

Thread: Global Coordinate System Transformations

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Newcastle, England
    Posts
    2

    Global Coordinate System Transformations

    Anyone know of example code that shows how you can maintain transformations along global coordinates even after rotating an object along one of its axis... (e.g. I rotate about the global X-axis, then want to rotate again, but along the global Z-axis, not local). Preferably this should be possible in a hierarchy of objects... The objcts are stored in display lists... And the program is ment to work like a CAD (3ds-Max) application.

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2000
    Posts
    569

    Re: Global Coordinate System Transformations

    You use glPushMatrix() and glPopMatrix() do to that:

    glPushMatrix();
    Rotate aroundx axis
    //draw
    glPopMatrix(); //old position is used again, so axis are not not rotated
    glPushMatrix();
    Rotate aroundz axis
    //draw
    glPopMatrix();

    etc.

Similar Threads

  1. Object-to-pixel coordinate transformations
    By lucafr in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 09-12-2008, 07:27 AM
  2. Local and global coordinate system
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 10-12-2002, 07:10 PM
  3. Coordinate System
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-19-2002, 06:19 PM
  4. Screen pixel to its location in global coordinate.
    By jxruan in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-26-2001, 09:11 AM
  5. local/global coordinate system problem
    By Dalhia in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 01-29-2001, 05:28 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