On 11/4/2010 1:31 PM, abdelrahman.salah...@gmail.com wrote:
Hi
how can i reposition the bounding sphere of a Node,
when i reposition a node, it's bounding sphere does not relocate.
i need help. :S
thanks in advance
Normally you don't need to do this, as any parent Transforms take care of this
automatically. But sometimes you do need to do it. OSG does it in
Transform::computeBound, so you could copy that code.
But as it turns out I've already done that for you. The svn trunk of osgWorks
(osgworks.googlecode.com) contains a utility function for performing this task,
based on the code in Trancform.cpp:
namespace osgwTools {
osg::BoundingSphere transform( const osg::Matrix m, const
osg::BoundingSphere sphere )
}
The osgWorks header for this is: #include osgwTools/Transform.h
--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org