Refactored osgManipulator so that CommandManager is no longer required, instead Dragger directly manages Constaints and associate Selections.

This commit is contained in:
Robert Osfield
2009-06-30 11:39:39 +00:00
parent a73a403301
commit a2ae370c8e
16 changed files with 368 additions and 380 deletions

View File

@@ -41,6 +41,12 @@ osg::Vec3d snap_point_to_grid(const osg::Vec3d& point, const osg::Vec3d& origin,
void Constraint::computeLocalToWorldAndWorldToLocal() const
{
if (!_refNode)
{
osg::notify(osg::INFO)<<"osgManipulator::Constraint::computeLocalToWorldAndWorldToLocal() error, _refNode is null"<<std::endl;
return;
}
osg::NodePath pathToRoot;
computeNodePathToRoot(const_cast<osg::Node&>(getReferenceNode()),pathToRoot);
_localToWorld = osg::computeLocalToWorld(pathToRoot);