- Timestamp:
- 02/01/12 18:10:48 (16 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgmanipulator/osgmanipulator.cpp
r12930 r12932 50 50 virtual bool constrain(osgManipulator::TranslateInLineCommand& command) const 51 51 { 52 OSG_NOTICE<<" TranslateInLineCommand "<<command.getTranslation()<<std::endl;52 OSG_NOTICE<<"PlaneConstraint TranslateInLineCommand "<<command.getTranslation()<<std::endl; 53 53 return true; 54 54 } … … 56 56 { 57 57 //command.setTranslation(osg::Vec3(0.0f,0.0f,0.0f)); 58 OSG_NOTICE<<" TranslateInPlaneCommand "<<command.getTranslation()<<std::endl;58 OSG_NOTICE<<"PlaneConstraint TranslateInPlaneCommand "<<command.getTranslation()<<std::endl; 59 59 return true; 60 60 } … … 62 62 { 63 63 //command.setScale(1.0f); 64 OSG_NOTICE<<" Scale1DCommand"<<command.getScale()<<std::endl;64 OSG_NOTICE<<"PlaneConstraint Scale1DCommand"<<command.getScale()<<std::endl; 65 65 return true; 66 66 } … … 68 68 { 69 69 //command.setScale(osg::Vec2d(1.0,1.0)); 70 OSG_NOTICE<<" Scale2DCommand "<<command.getScale()<<std::endl;70 OSG_NOTICE<<"PlaneConstraint Scale2DCommand "<<command.getScale()<<std::endl; 71 71 return true; 72 72 } 73 73 virtual bool constrain(osgManipulator::ScaleUniformCommand& command) const 74 74 { 75 OSG_NOTICE<<" ScaleUniformCommand"<<command.getScale()<<std::endl;75 OSG_NOTICE<<"PlaneConstraint ScaleUniformCommand"<<command.getScale()<<std::endl; 76 76 return true; 77 77 } 78 78 }; 79 80 79 81 80 82 osgManipulator::Dragger* createDragger(const std::string& name) … … 235 237 osg::Matrix::translate(scene->getBound().center())); 236 238 237 dragger->addTransformUpdating(selection); 239 if (dynamic_cast<osgManipulator::TabPlaneDragger*>(dragger)) 240 { 241 dragger->addTransformUpdating(selection, osgManipulator::DraggerTransformCallback::HANDLE_TRANSLATE_IN_LINE); 242 } 243 else 244 { 245 dragger->addTransformUpdating(selection); 246 } 238 247 239 248 // we want the dragger to handle it's own events automatically
