Renamed selection to transform to make it clear to understand what is being done.

This commit is contained in:
Robert Osfield 2012-02-01 17:16:44 +00:00
parent c3b7f6debe
commit 95f93e3bf5

View File

@ -215,13 +215,13 @@ osg::Node* addDraggerToScene(osg::Node* scene, const std::string& name, bool fix
{ {
scene->getOrCreateStateSet()->setMode(GL_NORMALIZE, osg::StateAttribute::ON); scene->getOrCreateStateSet()->setMode(GL_NORMALIZE, osg::StateAttribute::ON);
osg::MatrixTransform* selection = new osg::MatrixTransform; osg::MatrixTransform* transform = new osg::MatrixTransform;
selection->addChild(scene); transform->addChild(scene);
osgManipulator::Dragger* dragger = createDragger(name); osgManipulator::Dragger* dragger = createDragger(name);
osg::Group* root = new osg::Group; osg::Group* root = new osg::Group;
root->addChild(selection); root->addChild(transform);
if ( fixedSizeInScreen ) if ( fixedSizeInScreen )
{ {
@ -238,11 +238,11 @@ osg::Node* addDraggerToScene(osg::Node* scene, const std::string& name, bool fix
if (dynamic_cast<osgManipulator::TabPlaneDragger*>(dragger)) if (dynamic_cast<osgManipulator::TabPlaneDragger*>(dragger))
{ {
dragger->addTransformUpdating(selection, osgManipulator::DraggerTransformCallback::HANDLE_TRANSLATE_IN_LINE); dragger->addTransformUpdating(transform, osgManipulator::DraggerTransformCallback::HANDLE_TRANSLATE_IN_LINE);
} }
else else
{ {
dragger->addTransformUpdating(selection); dragger->addTransformUpdating(transform);
} }
// we want the dragger to handle it's own events automatically // we want the dragger to handle it's own events automatically