Results 1 to 4 of 4

Thread: Rotation question

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2002
    Posts
    6

    Rotation question

    First here is code:

    glPushMatrix
    glRotatef 90, 1, 0, 0
    glRotatef 30, 0, 0, 1
    glRotatef 90, 0, 1, 0 //Point cylinder to the right
    drawCylinder //draws cylinder at (0,0,0) and endpoint (0,0,3)
    glPopMatrix

    The question is: I don't understand why x-axis rotation turns cylinder toward me (clockwise rotation) instead of rotating counterclock-wise??

  2. #2
    Junior Member Newbie
    Join Date
    Jul 2002
    Posts
    13

    Re: Rotation question

    what do you mean by turn to face you?, that the top of the cylinder is facing you?, if thats the case, then its alright, cause the glRotatef is always counter-clockwise, so along the x-axis it will be showing you the top of the cylinder on the positive z-axis and the bottom on the negative z-axis.
    ¿Que es lo imposible, sino el fracaso de los cobardes?

  3. #3
    Senior Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    184

    Re: Rotation question

    I don't understand why x-axis rotation turns cylinder toward me (clockwise rotation) instead of rotating counterclock-wise??
    right hand rule: point the thumb of your right hand in the positive direction of an axis and your fingers will curl in the direction of a positive rotation.

  4. #4
    Junior Member Newbie
    Join Date
    Apr 2002
    Posts
    6

    Re: Rotation question

    Originally posted by coredump:
    I don't understand why x-axis rotation turns cylinder toward me (clockwise rotation) instead of rotating counterclock-wise??
    right hand rule: point the thumb of your right hand in the positive direction of an axis and your fingers will curl in the direction of a positive rotation.
    I obviously have been rotating too much. Thanks.

Similar Threads

  1. rotation question
    By llcoojoe in forum OpenGL: General
    Replies: 2
    Last Post: 05-18-2004, 08:01 AM
  2. rotation question
    By mdog1234 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-13-2003, 01:28 PM
  3. Rotation question
    By Run-E in forum OpenGL: Basic Coding
    Replies: 10
    Last Post: 07-18-2001, 11:10 AM
  4. Rotation question!!
    By mohsin in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 07-07-2001, 03:04 AM
  5. Yet Another Rotation Question :)
    By haust in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 11-02-2000, 02:42 PM

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