PDA

View Full Version : Do I need custom Matrix classes in OpenGL?



dragonworx
07-10-2002, 08:31 PM
I know that when manipulating the model-view matrix stack, OpenGL will know where a local vertex co-ord should be in world space.

But how can I obtain that world point, for say, a collision detection system? Do I need to maintain my own matrix system, duplicating the same transformations as are being rendered? Or Is there an OpenGL command such as: glLocalToWorldfv(aVector)?

newbie kind of thing...

ioquan
07-10-2002, 08:42 PM
You dont NEED to, but it will make your life easier. I like to save my transformation matrices because they come in handy for things like collision detection and clipping.

dragonworx
07-10-2002, 10:06 PM
cheers,

I'll add them, and when rendering, use my own transform data to manipulate OpenGL's matrix stack.