Ignore:
Timestamp:
Apr 22, 2012, 9:01:45 AM (12 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/DistortionManipulator.cpp

    r356 r357  
    6868                        if ( activeSetupMode == MANUAL)
    6969                        {
    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                                }
    7988
    8089                                return true;    // true means event handled: not forwarded to the camera manipulator;
     
    109118        case(osgGA::GUIEventAdapter::KEYDOWN):
    110119                {
    111                         if (ea.getKey()==osgGA::GUIEventAdapter::KEY_KP_Insert) // KP 0: Show/Hide HUD   // definition: child #0 = mesh, #1 = highlighter, #2 HUD
    112                         {
    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);
    115124                                return(true);
    116125                        }
     
    133142                                                activeSetupMode = MANUAL;
    134143                                                OSG_NOTICE<<"SetupMode MANUAL activated"<<std::endl;
    135                                                 _distortionSet->getDistortionInternals()->setValue(1, true); // definition: child #0 = mesh, #1 = highlighter, #2 HUD
     144                                                _distortionSet->getDistortionInternals()->setValue(DistortionSet::HIGHLIGHTER, true);
    136145                                                break;
    137146                                        }
     
    139148                                        {
    140149                                                activeSetupMode = DELEGATED;
    141                                                 _distortionSet->getDistortionInternals()->setValue(1, false); // definition: child #0 = mesh, #1 = highlighter, #2 HUD
     150                                                _distortionSet->getDistortionInternals()->setValue(DistortionSet::HIGHLIGHTER, false);
    142151                                                OSG_NOTICE<<"SetupMode DELEGATED activated"<<std::endl;
    143152                                                break;
     
    146155                                        {
    147156                                                activeSetupMode = DISABLED;
    148                                                 _distortionSet->getDistortionInternals()->setValue(1, false); // definition: child #0 = mesh, #1 = highlighter, #2 HUD
     157                                                _distortionSet->getDistortionInternals()->setValue(DistortionSet::HIGHLIGHTER, false);
    149158                                                OSG_NOTICE<<"SetupMode DISABLED activated"<<std::endl;
    150159                                                break;
Note: See TracChangeset for help on using the changeset viewer.