Changeset 357 for experimental/distortionNG/DistortionManipulator.cpp
- Timestamp:
- Apr 22, 2012, 9:01:45 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/DistortionManipulator.cpp
r356 r357 68 68 if ( activeSetupMode == MANUAL) 69 69 { 70 osg::notify(osg::ALWAYS)<<std::endl<<"Drag:"<<std::endl<<"ea.getGraphicsContext()="<<ea.getGraphicsContext()<<std::endl; 71 osg::notify(osg::ALWAYS)<<"ea.getXnormalized()="<<ea.getXnormalized()<<std::endl; 72 osg::notify(osg::ALWAYS)<<"ea.getYnormalized()="<<ea.getYnormalized()<<std::endl; 73 osg::notify(osg::ALWAYS)<<"ea.getX()="<<ea.getX()<<std::endl; 74 osg::notify(osg::ALWAYS)<<"ea.getXin()="<<ea.getXmin()<<std::endl; 75 osg::notify(osg::ALWAYS)<<"ea.getXmax()="<<ea.getXmax()<<std::endl; 76 osg::notify(osg::ALWAYS)<<"ea.getY()="<<ea.getY()<<std::endl; 77 osg::notify(osg::ALWAYS)<<"ea.getYin()="<<ea.getYmin()<<std::endl; 78 osg::notify(osg::ALWAYS)<<"ea.getYmax()="<<ea.getYmax()<<std::endl; 70 OSG_ALWAYS<<std::endl<<"Drag:"<<std::endl<<"ea.getGraphicsContext()="<<ea.getGraphicsContext()<<std::endl; 71 OSG_ALWAYS<<"ea.getXnormalized()="<<ea.getXnormalized()<<std::endl; 72 OSG_ALWAYS<<"ea.getYnormalized()="<<ea.getYnormalized()<<std::endl; 73 OSG_ALWAYS<<"ea.getX()="<<ea.getX()<<std::endl; 74 OSG_ALWAYS<<"ea.getXin()="<<ea.getXmin()<<std::endl; 75 OSG_ALWAYS<<"ea.getXmax()="<<ea.getXmax()<<std::endl; 76 OSG_ALWAYS<<"ea.getY()="<<ea.getY()<<std::endl; 77 OSG_ALWAYS<<"ea.getYin()="<<ea.getYmin()<<std::endl; 78 OSG_ALWAYS<<"ea.getYmax()="<<ea.getYmax()<<std::endl; 79 80 if(activeDistortionMode == MESH) 81 { 82 OSG_ALWAYS<<"MESH!"<<std::endl; 83 } 84 else if (activeDistortionMode == TEXCOORDINATES) 85 { 86 OSG_ALWAYS<<"TEXCOORDINATES!"<<std::endl; 87 } 79 88 80 89 return true; // true means event handled: not forwarded to the camera manipulator; … … 109 118 case(osgGA::GUIEventAdapter::KEYDOWN): 110 119 { 111 if (ea.getKey()==osgGA::GUIEventAdapter::KEY_KP_Insert) // KP 0: Show/Hide HUD // definition: child #0 = mesh, #1 = highlighter, #2 HUD112 { 113 bool oldValue = _distortionSet->getDistortionInternals()->getValue( 2);114 _distortionSet->getDistortionInternals()->setValue( 2, !oldValue);120 if (ea.getKey()==osgGA::GUIEventAdapter::KEY_KP_Insert) // KP 0: Show/Hide HUD 121 { 122 bool oldValue = _distortionSet->getDistortionInternals()->getValue(DistortionSet::HUD); 123 _distortionSet->getDistortionInternals()->setValue(DistortionSet::HUD, !oldValue); 115 124 return(true); 116 125 } … … 133 142 activeSetupMode = MANUAL; 134 143 OSG_NOTICE<<"SetupMode MANUAL activated"<<std::endl; 135 _distortionSet->getDistortionInternals()->setValue( 1, true); // definition: child #0 = mesh, #1 = highlighter, #2 HUD144 _distortionSet->getDistortionInternals()->setValue(DistortionSet::HIGHLIGHTER, true); 136 145 break; 137 146 } … … 139 148 { 140 149 activeSetupMode = DELEGATED; 141 _distortionSet->getDistortionInternals()->setValue( 1, false); // definition: child #0 = mesh, #1 = highlighter, #2 HUD150 _distortionSet->getDistortionInternals()->setValue(DistortionSet::HIGHLIGHTER, false); 142 151 OSG_NOTICE<<"SetupMode DELEGATED activated"<<std::endl; 143 152 break; … … 146 155 { 147 156 activeSetupMode = DISABLED; 148 _distortionSet->getDistortionInternals()->setValue( 1, false); // definition: child #0 = mesh, #1 = highlighter, #2 HUD157 _distortionSet->getDistortionInternals()->setValue(DistortionSet::HIGHLIGHTER, false); 149 158 OSG_NOTICE<<"SetupMode DISABLED activated"<<std::endl; 150 159 break;
Note: See TracChangeset
for help on using the changeset viewer.