Home Products Download Order Contacts


Subject: Re: using glVertex*() in a second coordinate frame

Thank you very much. In the glLoadMatrix command, will the matrix I'm
passing in have the origin of the particle or the negative of the origin?
In other words, instead of origin.x, origin.y and origin.z should it
be -origin.x, -origin.y and -origin.z? I remember seeing negatives in this
context, but am not 100% sure....

Thanks again for your help.

> Push the current coordinate system on the stack (glPushMatrix) then
> transform the coordinate system to the particle frame (either
> glMultMatrix or glLoadMatrix depending whether the particle coordinates
> are resp. to current coordinates or not). The matrix you need to pass
> consist of three vectors beeing the local axes and the last column
> being the particle position (but be aware that OpenGL uses column-major
> convention).
> Now you can define the coordinates with respect to the particle frame.
> And don't forget to get back to the previous frame (glPopMatrix) at the
> end :-)
> Przemek
> --
> "Beauty is the first test: there is no permanent place
> in the world for ugly mathematics." G.H. Hardy


View All Messages in comp.graphics.algorithms

using glVertex*() in a second coordinate frame =>Re: using glVertex*() in a second coordinate frame =>


Copyright 2006 WatermarkFactory.com. All Rights Reserved.