Results 1 to 2 of 2

Thread: independent object in environment

  1. #1
    Guest

    independent object in environment

    You guys and girls helped out a lot for my last question, hopefully you all can help me out again! I have an object inside a sphere (a world) by using nested transformations. But how do I get the object to move independently of the world? How do I rotate the object without rotating the whole world?

    Thanks!

  2. #2
    Junior Member Newbie
    Join Date
    Nov 2000
    Location
    Poland
    Posts
    6

    Re: independent object in environment

    You have to use glPushMatrix() and glPopMatrix() to have this object independent. Simply do this:

    glPushMatrix();

    [Here rotate&move your object and draw it]

    glPopMatrix();

    Pushing transformation matrix to the heap
    will effect in having NULL trans. matrix
    so then obejct will look like his moves are independent. Thanks to popping the trans. matrix you can continue your work with other objects.

    see ya

    [This message has been edited by kyokpae (edited 11-29-2000).]

Similar Threads

  1. Trying to move one object keeping the environment still
    By Beginner3452 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-01-2015, 06:20 AM
  2. Transformations: scene/object independent rotation
    By OglNewb in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-18-2010, 04:07 AM
  3. Platform independent
    By viv_slash in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-24-2004, 04:53 PM
  4. independent GUI
    By zotto in forum OpenGL: General
    Replies: 3
    Last Post: 04-13-2003, 07:26 PM
  5. avoiding double includes while using opengl libraries in object oriented environment?
    By wildeyedboyfromfreecloud in forum OpenGL: Basic Coding
    Replies: 13
    Last Post: 10-29-2001, 08:35 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