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.
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