PDA

View Full Version : Rotatation and Q3 Model Animation



PerIvar
30-09-2003, 09:49 AM
Hi!

Im not very experienced in OpenGL and GLXTreem, but i must say im really impressed with your work so far Andreas :)

I just have a small question. How do i rotate primitives and the diffrent models in GLXTreem?

I can only find examples with camera rotation.

Another thing also :)
In the Q3 models.. is there a way to see what the current frame number of an animation is? Reason i want to know this is because i want to check if an animation is finished running or not.
Or if you have other tips on how this can be done, it is very appreciated :)

Regards
Per Ivar

Andreaz
30-09-2003, 08:18 PM
Thanks :D

Rotating the model or any other 3d stuff is done via OpenGL;

uses OpenGL;

...

glPushMatrix(); //Save the current world position and rotation

glRotate(45, 0, 1, 0); // Rotates 45 degrees in the Y-axiz (X:0, Y:1 Z:0)

// Draw
glPopMatrix(); //Restore the world position and rotation


You cant in the current version get the frame information, i forgot putting the frame information as a public property. It will be done in the next version, now you can if you want to move the property Frame: TFrame from the private to the public section of the TMD3Model class.

PerIvar
30-09-2003, 09:11 PM
Thank you for a great answer :)