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/src/osgViewer/ViewerEventHandlers.cpp

    r12924 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*/ 
     
    7878    osgViewer::View* view = dynamic_cast<osgViewer::View*>(&aa); 
    7979    if (!view) return false; 
    80      
     80 
    8181    osgViewer::ViewerBase* viewer = view->getViewerBase(); 
    8282 
     
    161161    osg::GraphicsContext::WindowingSystemInterface    *wsi = osg::GraphicsContext::getWindowingSystemInterface(); 
    162162 
    163     if (wsi == NULL)  
     163    if (wsi == NULL) 
    164164    { 
    165165        OSG_NOTICE << "Error, no WindowSystemInterface available, cannot toggle window fullscreen." << std::endl; 
     
    207207    osg::GraphicsContext::WindowingSystemInterface    *wsi = osg::GraphicsContext::getWindowingSystemInterface(); 
    208208 
    209     if (wsi == NULL)  
     209    if (wsi == NULL) 
    210210    { 
    211211        OSG_NOTICE << "Error, no WindowSystemInterface available, cannot toggle window fullscreen." << std::endl; 
     
    317317    osgViewer::View* view = dynamic_cast<osgViewer::View*>(&aa); 
    318318    if (!view) return false; 
    319      
     319 
    320320    osgViewer::ViewerBase* viewerBase = view->getViewerBase(); 
    321321    osgViewer::Viewer* viewer = dynamic_cast<Viewer*>(viewerBase); 
     
    357357                    OSG_NOTICE<<"Threading model 'SingleThreaded' selected."<<std::endl; 
    358358                    break; 
    359 #if 1                     
     359#if 1 
    360360                case(osgViewer::ViewerBase::AutomaticSelection): 
    361361                    viewerBase->setThreadingModel(osgViewer::ViewerBase::SingleThreaded); 
    362362                    OSG_NOTICE<<"Threading model 'SingleThreaded' selected."<<std::endl; 
    363 #else                     
     363#else 
    364364                case(osgViewer::ViewerBase::AutomaticSelection): 
    365365                    viewerBase->setThreadingModel(viewer->suggestBestThreadingModel()); 
     
    448448        { 
    449449            const osg::Matrixd& m = view->getCamera()->getInverseViewMatrix(); 
    450             double animationPathTime = osg::Timer::instance()->delta_s(_animStartTime, time);             
     450            double animationPathTime = osg::Timer::instance()->delta_s(_animStartTime, time); 
    451451            _animPath->insert(animationPathTime, osg::AnimationPath::ControlPoint(m.getTrans(), m.getRotate())); 
    452452            _delta = 0.0f; 
     
    460460        } 
    461461        else _delta += delta; 
    462          
     462 
    463463        return true; 
    464464    } 
     
    479479                    _animStartTime = osg::Timer::instance()->tick(); 
    480480                    _animPath = new osg::AnimationPath(); 
    481                      
     481 
    482482                    if (!_filename.empty()) 
    483483                    { 
     
    490490                        } 
    491491                        ss << "."<<osgDB::getFileExtension(_filename); 
    492                          
     492 
    493493                        OSG_NOTICE << "Recording camera path to file " << ss.str() << std::endl; 
    494494                        _fout.open( ss.str().c_str() ); 
     
    548548                { 
    549549                     if (_animPath.valid() && !_animPath->empty()) 
    550                      {                     
     550                     { 
    551551                        _animPathManipulator = new osgGA::AnimationPathManipulator(_animPath.get()); 
    552552                        _animPathManipulator->home(ea,aa); 
     
    563563                     } 
    564564                } 
    565                  
     565 
    566566                // The user has requested to STOP playback. 
    567567                else 
     
    574574 
    575575                return true; 
    576             }         
     576            } 
    577577 
    578578            break; 
     
    637637        usage.addKeyboardMouseBinding(ostr.str(),"Increase LODScale."); 
    638638    } 
    639      
     639 
    640640    { 
    641641        std::ostringstream ostr; 
     
    654654    osgViewer::View* view = dynamic_cast<osgViewer::View*>(&aa); 
    655655    if (!view) return false; 
    656      
     656 
    657657    osgViewer::ViewerBase* viewer = view->getViewerBase(); 
    658658 
     
    661661        return false; 
    662662    } 
    663      
     663 
    664664    if (ea.getHandled()) return false; 
    665665 
     
    730730} 
    731731 
    732 bool InteractiveImageHandler::computeIntersections(osgViewer::View* view, float x,float y, const osg::NodePath& nodePath, osgUtil::LineSegmentIntersector::Intersections& intersections,osg::Node::NodeMask traversalMask) const  
     732bool InteractiveImageHandler::computeIntersections(osgViewer::View* view, float x,float y, const osg::NodePath& nodePath, osgUtil::LineSegmentIntersector::Intersections& intersections,osg::Node::NodeMask traversalMask) const 
    733733{ 
    734734    float local_x, local_y = 0.0; 
     
    819819        osg::Vec2 tc(0.5f,0.5f); 
    820820 
    821         // use the nearest intersection                  
     821        // use the nearest intersection 
    822822        const osgUtil::LineSegmentIntersector::Intersection& intersection = *(intersections.begin()); 
    823823        osg::Drawable* drawable = intersection.drawable.get(); 
     
    844844                if (texcoords_Vec2Array) 
    845845                { 
    846                     // we have tex coord array so now we can compute the final tex coord at the point of intersection.                                 
     846                    // we have tex coord array so now we can compute the final tex coord at the point of intersection. 
    847847                    osg::Vec2 tc1 = (*texcoords_Vec2Array)[i1]; 
    848848                    osg::Vec2 tc2 = (*texcoords_Vec2Array)[i2]; 
     
    894894{ 
    895895    if (ea.getHandled()) return false; 
    896      
     896 
    897897    if (!_image) return false; 
    898898 
     
    918918            int x,y; 
    919919            bool sendKeyEvent = mousePosition(view, nv, ea, x, y); 
    920          
     920 
    921921            if (sendKeyEvent) 
    922922            { 
    923923                return _image->sendKeyEvent(ea.getKey(), ea.getEventType()==osgGA::GUIEventAdapter::KEYDOWN); 
    924             }           
     924            } 
    925925            break; 
    926926        } 
     
    960960    } 
    961961 
    962     // Make sure the texture does not rescale the image because  
     962    // Make sure the texture does not rescale the image because 
    963963    // it thinks it should still be the previous size... 
    964964    if (_texture.valid())