Hi,
while I have added for myself documentation for osg::Plane (see file attached),
I may have found a bug:
osg::Plane::makeUnitLength(void) is not only normalizing the plane's normal but
also scaling the distance between the point of origin and the plane.
Actually, osg::Plane::makeUnitLength(void) should be implemented like
inline osg::Plane::makeUnitLength(void)
{
value_type inv_length = 1.0 / sqrt(_fv[0]*_fv[0] + _fv[1]*_fv[1]+
_fv[2]*_fv[2]);
_fv[0] *= inv_length;
_fv[1] *= inv_length;
_fv[2] *= inv_length;
}
if it should do only what the method's name suggests the method does.
PS: makeUnitLength seems only to be used in
osg::Plane::transformProvidingInverse
Cheers,
Hartwig
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26922#26922
Attachments:
http://forum.openscenegraph.org//files/plane_877.zip
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org