Results 1 to 3 of 3

Thread: translation instead rotation

  1. #1
    Junior Member Newbie
    Join Date
    May 2002
    Location
    YU Srbija Valjevo
    Posts
    12

    translation instead rotation

    I have an problem considering
    a simple replacemant of an rotation
    with translation.
    The rotation worked very vell
    but the rotation seems to be dead ?!
    since I can't find any logical exponations it
    might be that I am overlooking something.
    The general kode is from red book so it is ok.
    Here is portion that I changed:

    glPushMatrix();
    glTranslatef((GLfloat) move,0,0);
    glutSolidCube (1.0);
    glPopMatrix();
    *******************************************
    void keyboard (unsigned char key, int x, int y)
    {
    switch (key) {
    case 's': /* s key translira objekat */
    move = move + .5 ;
    glutPostRedisplay();
    break;
    Thank U in advance
    maxmagnus
    Martin Miljkovic

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    653

    Re: translation instead rotation

    You mean the translation is dead? Do a check to see that you move variable is being updated, i.e. use a printf or something

  3. #3
    Junior Member Newbie
    Join Date
    May 2002
    Location
    YU Srbija Valjevo
    Posts
    12

    Re: translation instead rotation

    Thanks for
    answer it was the begining
    of solution.
    Now problem is gone.
    Maxmagnus
    Martin Miljkovic

Similar Threads

  1. rotation after translation
    By nemolionak3 in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 12-16-2018, 03:30 PM
  2. Translation after rotation
    By jalepo in forum OpenGL: General
    Replies: 3
    Last Post: 08-08-2014, 02:04 PM
  3. Rotation and Translation
    By in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 10-21-2003, 05:07 AM
  4. rotation and translation
    By joeyx in forum OpenGL: Basic Coding
    Replies: 14
    Last Post: 04-23-2001, 12:32 PM
  5. Rotation & Translation
    By Giotto in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 04-21-2001, 03:50 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