PDA

View Full Version : ASE and incremental rotation



fortikur
07-13-2004, 06:56 AM
I created an ASE loader which loads animation too. If I read well, ASE files use incremental rotation. GlRotate uses 'absolute' values.
My question is simple (I even found this on a different forum - without any answer):

How can I increment rotation values?

To clarify this:
(rotation values in the ASE)
1,0,1, 1
1,0,1, 1
doesn't mean a glRotate rotation like this:
glRotate(2,0,2, 2)

I read in the forums about the gimbal lock. As far as I understood, using incremental rotations may cause a gimbal lock. And what about this ase rotations?

07-13-2004, 08:35 AM
What do you mean glRotate() uses absolut values? The rotation will be absolute or incremental depending of if you use it on a identity matrix or not.

fortikur
07-13-2004, 11:51 PM
I think I must have used the wrong terms. I meant, if I use glRotate I have to write precalculated values.
I store the rotation values in pointer arrays, where I precalculate the next rotation value. This is because, if I want to jump to a given frame I don't have to recalculate the rotations from beginning to this frame.
ASE files use this incremental calculation, but I want to calculate the all the rotations for a given frame.
I know, VRML can be used instead, but I prefer ASE. It's a 'clean' stuff for my project.

ZbuffeR
07-14-2004, 12:25 AM
Translations, rotations, and all such transformation are in fact computed as matrices. A single matrix will hold the result of all the incremental transformations.

So you want to accumulate the rotations in a single matrix.
I am not very good at explaining this stuff, you 'd better search some easy tutorial or read this part of the red book :
http://fly.cc.fer.hr/~unreal/theredbook/appendixg.html