diff --git a/examples/osgmanipulator/osgmanipulator.cpp b/examples/osgmanipulator/osgmanipulator.cpp index b26ddb438..303dc7ea1 100644 --- a/examples/osgmanipulator/osgmanipulator.cpp +++ b/examples/osgmanipulator/osgmanipulator.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -169,8 +170,6 @@ osgManipulator::Dragger* createDragger(const std::string& name) dragger = d; } - - return dragger; } @@ -374,6 +373,7 @@ osg::Node* createDemoScene(bool fixedSizeInScreen) { return root; } + // int main( int argc, char **argv ) { @@ -407,6 +407,28 @@ int main( int argc, char **argv ) // get details on keyboard and mouse bindings used by the viewer. viewer.getUsage(*arguments.getApplicationUsage()); + + if (arguments.read("--test-NodeMask")) + { + const osg::ref_ptr group = new osg::Group(); + group->setNodeMask(0); + + const osg::ref_ptr antiSquish = new osgManipulator::AntiSquish(); + + group->addChild(antiSquish); + + const osg::ref_ptr node = new osg::Node(); + node->setInitialBound(osg::BoundingSphere(osg::Vec3(0.0, 0.0, 0.0), 1.0)); + + antiSquish->addChild(node); + + group->getBound(); + + return 1; + } + + + // if user request help write it out to cout. bool helpAll = arguments.read("--help-all"); unsigned int helpType = ((helpAll || arguments.read("-h") || arguments.read("--help"))? osg::ApplicationUsage::COMMAND_LINE_OPTION : 0 ) |