PDA

View Full Version : Matrix math vs glRotate, glTranslate, etc...



jpummill
05-16-2002, 10:47 AM
I do not have a very good understanding of matrix math (yet) but I was wondering if someone could give me a simple example of why I would want to do my own matrix calculations instead of using glRotate, glTranslate, etc.

My understanding is that doing the calculations myself would allow me to perform rotations, and transformations but why not just use the built in functions.

Am I totally missing the point here?

Any help would be appreciated.

bakery2k
05-16-2002, 12:01 PM
I do some matrix multiplication myself, for example for:
1) Setting up a projection matrix which is different to those set up by Frustum etc.
2) Calculating matrices to do many things once, then storing them.
3) Doing my own maths allows me to access the matrices easily for frustum culling etc.

Deiussum
05-17-2002, 05:56 AM
I've done my own matrix stuff for avoiding gimbal lock. For instance a model viewer. Store a rotational matrix, then whenever more rotations are done, just PRE multiply the new rotation to my rotational matrix. That way my rotational matrix stores the sum of all the rotations done.