| | 44 | |
| | 45 | class PlaneConstraint : public osgManipulator::Constraint |
| | 46 | { |
| | 47 | public: |
| | 48 | PlaneConstraint() {} |
| | 49 | |
| | 50 | virtual bool constrain(osgManipulator::TranslateInLineCommand& command) const |
| | 51 | { |
| | 52 | OSG_NOTICE<<"TranslateInLineCommand "<<command.getTranslation()<<std::endl; |
| | 53 | return true; |
| | 54 | } |
| | 55 | virtual bool constrain(osgManipulator::TranslateInPlaneCommand& command) const |
| | 56 | { |
| | 57 | //command.setTranslation(osg::Vec3(0.0f,0.0f,0.0f)); |
| | 58 | OSG_NOTICE<<"TranslateInPlaneCommand "<<command.getTranslation()<<std::endl; |
| | 59 | return true; |
| | 60 | } |
| | 61 | virtual bool constrain(osgManipulator::Scale1DCommand& command) const |
| | 62 | { |
| | 63 | //command.setScale(1.0f); |
| | 64 | OSG_NOTICE<<"Scale1DCommand"<<command.getScale()<<std::endl; |
| | 65 | return true; |
| | 66 | } |
| | 67 | virtual bool constrain(osgManipulator::Scale2DCommand& command) const |
| | 68 | { |
| | 69 | //command.setScale(osg::Vec2d(1.0,1.0)); |
| | 70 | OSG_NOTICE<<"Scale2DCommand "<<command.getScale()<<std::endl; |
| | 71 | return true; |
| | 72 | } |
| | 73 | virtual bool constrain(osgManipulator::ScaleUniformCommand& command) const |
| | 74 | { |
| | 75 | OSG_NOTICE<<"ScaleUniformCommand"<<command.getScale()<<std::endl; |
| | 76 | return true; |
| | 77 | } |
| | 78 | }; |