Show
Ignore:
Timestamp:
03/21/12 18:36:20 (3 years ago)
Author:
robert
Message:

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osgGA/EventVisitor

    r9377 r13041  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield  
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
    22 * 
    3  * This library is open source and may be redistributed and/or modified under   
    4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or  
     3 * This library is open source and may be redistributed and/or modified under 
     4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
    55 * (at your option) any later version.  The full license is in LICENSE file 
    66 * included with this distribution, and on the openscenegraph.org website. 
    7  *  
     7 * 
    88 * This library is distributed in the hope that it will be useful, 
    99 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
     10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1111 * OpenSceneGraph Public License for more details. 
    1212*/ 
     
    3535 * Basic EventVisitor implementation for animating a scene. 
    3636 * This visitor traverses the scene graph, calling each nodes appCallback if 
    37  * it exists.  
     37 * it exists. 
    3838 */ 
    3939class OSGGA_EXPORT EventVisitor : public osg::NodeVisitor 
     
    4343        EventVisitor(); 
    4444        virtual ~EventVisitor(); 
    45          
     45 
    4646        META_NodeVisitor("osgGA","EventVisitor") 
    47          
     47 
    4848        void setActionAdapter(osgGA::GUIActionAdapter* actionAdapter) { _actionAdapter=actionAdapter; } 
    49          
     49 
    5050        osgGA::GUIActionAdapter* getActionAdapter() { return _actionAdapter; } 
    5151 
     
    5454 
    5555        typedef std::list< osg::ref_ptr<GUIEventAdapter> > EventList; 
    56          
     56 
    5757        void addEvent(GUIEventAdapter* event); 
    5858        void removeEvent(GUIEventAdapter* event); 
    59          
     59 
    6060        void setEventHandled(bool handled) { _handled = handled; } 
    6161        bool getEventHandled() const { return _handled; } 
    62          
     62 
    6363 
    6464        void setEvents(const EventQueue::Events& events) { _events = events; } 
    6565        EventQueue::Events& getEvents() { return _events; } 
    6666        const EventQueue::Events& getEvents() const { return _events; } 
    67          
     67 
    6868    public: 
    69      
     69 
    7070        virtual void reset(); 
    7171 
    7272        /** During traversal each type of node calls its callbacks and its children traversed. */ 
    7373        virtual void apply(osg::Node& node)         { handle_callbacks_and_traverse(node); } 
    74          
     74 
    7575        virtual void apply(osg::Geode& node)        { handle_geode_callbacks(node); } 
    7676        virtual void apply(osg::Billboard& node)    { handle_geode_callbacks(node); } 
    77          
     77 
    7878        virtual void apply(osg::LightSource& node)  { handle_callbacks_and_traverse(node); } 
    79          
     79 
    8080        virtual void apply(osg::Group& node)        { handle_callbacks_and_traverse(node); } 
    8181        virtual void apply(osg::Transform& node)    { handle_callbacks_and_traverse(node); } 
     
    9090        /** Prevent unwanted copy operator.*/ 
    9191        EventVisitor& operator = (const EventVisitor&) { return *this; } 
    92          
     92 
    9393        inline void handle_callbacks(osg::StateSet* stateset) 
    9494        { 
     
    114114            osg::NodeCallback* callback = node.getEventCallback(); 
    115115            if (callback) (*callback)(&node,this); 
    116             /*else if (node.getNumChildrenRequiringEventTraversal()>0)*/  
     116            /*else if (node.getNumChildrenRequiringEventTraversal()>0)*/ 
    117117            traverseGeode(node); 
    118118        } 
    119          
     119 
    120120        inline void traverseGeode(osg::Geode& geode) 
    121121        { 
    122122            traverse((osg::Node&)geode); 
    123              
     123 
    124124            // Call the app callbacks on the drawables. 
    125125            for(unsigned int i=0;i<geode.getNumDrawables();++i) 
     
    131131            } 
    132132        } 
    133          
     133 
    134134        osgGA::GUIActionAdapter*        _actionAdapter; 
    135          
     135 
    136136        osg::ref_ptr<GUIEventAdapter>   _accumulateEventState; 
    137          
     137 
    138138        bool                            _handled; 
    139139        EventQueue::Events              _events; 
    140      
     140 
    141141}; 
    142142