Show
Ignore:
Timestamp:
04/14/14 18:16:22 (3 days ago)
Author:
robert
Message:

Fixed comment

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osganimationtimeline/osganimationtimeline.cpp

    r12292 r13890  
    1 /*  -*-c++-*-  
     1/*  -*-c++-*- 
    22 *  Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net> 
    33 * 
    4  * This library is open source and may be redistributed and/or modified under   
    5  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or  
     4 * This library is open source and may be redistributed and/or modified under 
     5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
    66 * (at your option) any later version.  The full license is in LICENSE file 
    77 * included with this distribution, and on the openscenegraph.org website. 
    8  *  
     8 * 
    99 * This library is distributed in the hope that it will be useful, 
    1010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
     11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1212 * OpenSceneGraph Public License for more details. 
    1313*/ 
     
    8585 
    8686        // add the main loop at priority 0 at time 0. 
    87          
     87 
    8888        osgAnimation::Timeline* tml = _manager->getTimeline(); 
    8989        tml->play(); 
     
    140140                _releaseKey = false; 
    141141            } 
     142            traverse(node, nv); 
    142143        } 
    143144        else 
    144145        { 
    145             osgGA::EventVisitor* ev = dynamic_cast<osgGA::EventVisitor*>(nv); 
    146             if (ev && ev->getActionAdapter() && !ev->getEvents().empty()) 
    147             { 
    148                 for(osgGA::EventQueue::Events::iterator itr = ev->getEvents().begin(); 
    149                     itr != ev->getEvents().end(); 
    150                     ++itr) 
    151                 { 
    152                     handleWithCheckAgainstIgnoreHandledEventsMask(*(*itr), *(ev->getActionAdapter()), node, nv); 
    153                 } 
    154             } 
    155         }             
    156         traverse(node, nv); 
     146            osgGA::GUIEventHandler::operator()(node, nv); 
     147        } 
    157148    } 
    158149 
     
    169160 
    170161    std::string file = "nathan.osg"; 
    171     if(argc >= 2)  
     162    if(argc >= 2) 
    172163        file = psr[1]; 
    173164 
     
    179170    } 
    180171    osgAnimation::AnimationManagerBase* animationManager = dynamic_cast<osgAnimation::AnimationManagerBase*>(root->getUpdateCallback()); 
    181     if(!animationManager)  
     172    if(!animationManager) 
    182173    { 
    183174        osg::notify(osg::FATAL) << "Did not find AnimationManagerBase updateCallback needed to animate elements" << std::endl; 
     
    187178    osg::ref_ptr<osgAnimation::TimelineAnimationManager> tl = new osgAnimation::TimelineAnimationManager(*animationManager); 
    188179    root->setUpdateCallback(tl.get()); 
    189      
     180 
    190181    ExampleTimelineUsage* callback = new ExampleTimelineUsage(tl.get()); 
    191182    root->setEventCallback(callback); 
    192183    root->getUpdateCallback()->addNestedCallback(callback); 
    193          
     184 
    194185 
    195186 
    196187    // add the state manipulator 
    197188    viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) ); 
    198      
     189 
    199190    // add the thread model handler 
    200191    viewer.addEventHandler(new osgViewer::ThreadingHandler); 
     
    202193    // add the window size toggle handler 
    203194    viewer.addEventHandler(new osgViewer::WindowSizeHandler); 
    204          
     195 
    205196    // add the stats handler 
    206197    viewer.addEventHandler(new osgViewer::StatsHandler);