Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: How to interchange glTranslate - glRotate

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Newbie Newbie
    Join Date
    Feb 2013

    How to interchange glTranslate - glRotate

    I want to interchange the order of rotation and translation.
    This is the original:


    And this is the changed version that should be the exactly identical transformation:


    Does anyone know the formula, how to calculate x1 y1 z1 from x0 y0 z0 and angle ?
    I need this to combine two translations that almost cancel and produce rounding errors.

  2. #2
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    You need to solve a system of linear equations:
    T(v1)*R(a) = R(a)*T(v0) => T(v1) = R(a)*T(v0)*R(a)^-1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts