Hi Paul,

Well, this doesn't appear to work for Plane:

I wouldn't know about planes, I've only ever used the multiply by transpose to transform direction vectors or normals, never planes. Perhaps there's just a little extra needed (for example, maybe adding an implicit conversion constructor from osg::Vec4 to osg::Plane or an additional Plane operator*(Matrix, Plane) method.

It's just that I had seen that page about the V*M and M*V a long time ago, and thought it would be good to know there's already part of the work done.

Converting the plane to a Vec4 allows me to do this:

osg::Vec4 pv = p.asVec4();
osg::Vec4 pvprime = l2w * pv;

That code compiles and runs, but produces incorrect results when
compared to the (correct) results of osg::Plane::transform().

Did you look at the math that this results in? Running it in the debugger would likely tell you why it doesn't work. Again I'm not much help, I've never done this myself.

Sorry I can't help more,

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

Reply via email to