Results 1 to 3 of 3

Thread: axis

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2003
    Posts
    26

    axis

    I'm rotating and translating my object with the mousemove in combination with the mousebuttons.
    Now I want to have the axis shown in the lower left corner of the window so it doesn't move with the translations and the rotations(it stays on the same place in the viewport) and it shows the direction of the object.
    Does anybody know how to do it??

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: axis

    Just clear the matrix before you draw it, would look something like this.


    // Draw scene
    insert code here

    // Draw axis
    glLoadIdentity();
    Draw_current_axis();

    Originally posted by fobru:
    I'm rotating and translating my object with the mousemove in combination with the mousebuttons.
    Now I want to have the axis shown in the lower left corner of the window so it doesn't move with the translations and the rotations(it stays on the same place in the viewport) and it shows the direction of the object.
    Does anybody know how to do it??

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2003
    Posts
    26

    Re: axis

    I did so.
    I rotate the axis in (0,0,0) but then I have to translate them to the lower left corner of my screen and I don't know exactly what the coordinates are of this point because of the rotation!

Similar Threads

  1. Replies: 0
    Last Post: 04-30-2018, 09:49 AM
  2. How to rotate objects around global axis not local axis
    By silvermeteor in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 12-04-2017, 11:10 AM
  3. Replies: 5
    Last Post: 08-27-2016, 04:59 PM
  4. Fog along Y axis?
    By lazarijus in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 03-28-2002, 08:02 AM
  5. Axis and Angle to Axis and prepndicular Vector
    By Maku in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-29-2001, 08:44 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