Hi,
osg::Vec3 radiusVec(bs._radius, 0, 0);
radiusVec = osg:Matrixd::transform3x3(radiusVec, localToWorld);
bs._radius = radiusVec.length();
Or as Vincent noted:
radius *= localToWorld.getScale().x();
But that would only be correct if the scale is uniform. If not, the
bounding sphere is a bounding ellipsoid anyways... But I might want to
scale the radius by the largest of the x, y or z scale factors to be
conservative.
Does that sound good?
J-S
--
______________________________________________________
Jean-Sebastien Guay [EMAIL PROTECTED]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org