Hello Folks!

Yesterday night I changed my code (fixed the GetAxis function) and everything is working fine now.

Thank you all for your explanations and links with good docs!!!

Cheers

Bruno Sanches

On 2/8/08, **Aras Pranckevicius** <aras@unity3d.com> wrote:

> http://www.toymaker.info/Games/html/camera.html

> So, it appears that for the view, I will need to use the invert matrix after

> fixing the code, thats weird to me, does anyone knows a tutorial / doc that

> explain the math behind view matrix?

That tutorial explains "how to get axis vectors and position from a

matrix that is inverted".

If you think about a camera as a regular object, then camera's matrix

(camera-to-world) has a matrix just like any other object. In D3D's

notation, first three rows are axes, 4th row is the position. More

here: http://aras-p.info/texts/matrices.html

A view matrix is NOT camera's matrix; a view matrix does the opposite

transform (world-to-camera). Hence it's an inverted matrix of the

camera.

Now, an orthonormal camera can be inverted pretty easily; the rotation

part just gets transposed, and the position part is "the negative dot

product of the position and each of the axis vectors" (quoting your

tutorial link).

--

Aras Pranckevicius

work: http://unity3d.com

home: http://aras-p.info

-------------------------------------------------------------------------

This SF.net email is sponsored by: Microsoft

Defy all challenges. Microsoft(R) Visual Studio 2008.

http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________

GDAlgorithms-list mailing list

GDAlgorithms-list@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list

Archives:

http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list