Hi Paul, Rob,
Rather than a transpose() function, I wonder if anyone else would be
interested in seeing support for two different operator*() methods to
handle vector/matrix multiply, namely:
[...]
Maybe I'm missing something, but aren't M*V and V*M already defined
precisely to help with multiplying by a matrix or its transpose? See the
code for the Matrixf and Matrixd classes, as well as this page:
http://www.openscenegraph.org/projects/osg/wiki/Support/Maths/MatrixTransformations
Quote which is apparently from Robert a while ago:
<begin quote>
V' = V*M and M* V are defined....
the first, as Don points out is the standard one you should use, and the
later is just for special occasions...
And the special occasion is when you'd want to do V' = V* Mtranspose
where you only have M to hand and would have to do a transpose of M.
This can be rewritten V' = M * V;
The particular time when you'll do this would be when transforming
normals and planes by the inverse transpose. This is done all the time
in the cull traversal, where the inverse just happens to be the
accumulated modelview matrix.
This is all a bit crafty, but certainly helps remove all those extra ops
in transposing.
<end quote>
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org