Opengl has two different ways of representing the
camera's (or eye's) location and heading. I need to
translate between the two representations but have no
experience with one of them and moer importantly, am not
sure I have the skill to find the translation mechanism
between the two. Actually I think I only need the
translation/transformation in one direction, from A to B,
where A and B are below.

A       Representation A is the basis for homogeneous
coordinates and transformation matrices which are used to
move around the eye as well as any drawn objects.

B       Representation B is the basis for openGL's gluLookAt
utility function.

A       A location vector, say v, and a 3x3 heading matrix
of 3 linearly independent, unit-normal (direction) vectors,
say M, made up of row vectors m1, m2, and m3, corresponding
to 3 coordinate axes.

B       Three vectors, eye, center, and up; the first two
are position vectors, and the last defines a direction.

eye specifies the viewpoint,
center specifies any point along the desired line of sight,
and
up specifies which direction is "up" (ie, the direction from
the bottom to the top of the viewing volume, the default is
0 1 0)

        Btw, it is common, but I don't think it is required,
that the vectors v and eye are the same. And the reason I do
not need the transformation from B to A is that openGL
provides a mechanism for finding A from B, via glGetFloat.

        Can anyone point me to a reference which discusses
the transformation from A to B? Really I would be happy with
a J solution, of course.

(B=) <----------my "sig"

Brian Schott
Atlanta, GA, USA
schott DOT bee are eye eh en AT gee em ae eye el DOT com
http://schott.selfip.net/~brian/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to