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/osgPlugins/cfg/Camera.h

    r12292 r13041  
    3030/** 
    3131    \class Camera 
    32     \brief A Camera provides a programming interface for 3D  
    33     graphics applications by means of an abstract camera analogy  
    34  
    35     The Camera contains a Lens class and has a RenderSurface.  Methods  
    36     are provided to give the programmer control over the OpenGL PROJECTION  
    37     matrix throught the Lens and over the initial MODELVIEW matrix through  
    38     the camera's position and attitude.   
     32    \brief A Camera provides a programming interface for 3D 
     33    graphics applications by means of an abstract camera analogy 
     34 
     35    The Camera contains a Lens class and has a RenderSurface.  Methods 
     36    are provided to give the programmer control over the OpenGL PROJECTION 
     37    matrix throught the Lens and over the initial MODELVIEW matrix through 
     38    the camera's position and attitude. 
    3939 
    4040    The programmer must provide a class derived from Camera::SceneHandler 
    41     to prepare and render the scene.  The Camera does not provide direct  
    42     control over rendering itself.   
     41    to prepare and render the scene.  The Camera does not provide direct 
     42    control over rendering itself. 
    4343*/ 
    44        
     44 
    4545 
    4646 
     
    4949 
    5050    public : 
    51          /**  
     51         /** 
    5252            \class SceneHandler 
    5353            \brief A Scene Handler handles the preparation and rendering 
     
    5555         */ 
    5656 
    57         /**  
     57        /** 
    5858            \class Lens 
    5959            \brief A Lens provides control over the PROJECTION matrix. 
    6060 
    61             It is entirely contained within the Camera class.  A Lens may  
    62             be of type Perspective or Orthographic and set with one of the  
    63             setFrustum, setProjection() or setOrtho().  The Lens type is  
    64             implied by the method used to set it */  
    65         class Lens : public osg::Referenced  
     61            It is entirely contained within the Camera class.  A Lens may 
     62            be of type Perspective or Orthographic and set with one of the 
     63            setFrustum, setProjection() or setOrtho().  The Lens type is 
     64            implied by the method used to set it */ 
     65        class Lens : public osg::Referenced 
    6666        { 
    6767            public : 
     
    8484                         hfov  - Horizontal Field of View in degrees 
    8585                         vfov  - Vertical Field of View in degrees 
    86                          nearClip  - Distance from the viewer to the near plane of the  
     86                         nearClip  - Distance from the viewer to the near plane of the 
    8787                                 viewing frustum. 
    88                          farClip   - Distance from the viewer to the far plane of the  
     88                         farClip   - Distance from the viewer to the far plane of the 
    8989                                 viewing frustum. 
    90                          xshear- Assymetrical shear in viewing frustum in the horizontal  
    91                                  direction.  Value given in normalized device coordinates  
     90                         xshear- Assymetrical shear in viewing frustum in the horizontal 
     91                                 direction.  Value given in normalized device coordinates 
    9292                                 (see setShear() below). 
    93                          yshear- Assymetrical shear in viewing frustum in the vertical  
    94                                  direction.  Value given in normalized device coordinates  
     93                         yshear- Assymetrical shear in viewing frustum in the vertical 
     94                                 direction.  Value given in normalized device coordinates 
    9595                                 (see setShear() below). 
    9696                 */ 
    97                 void setPerspective( double hfov, double vfov,  
     97                void setPerspective( double hfov, double vfov, 
    9898                        double nearClip, double farClip ); 
    9999 
     
    101101                    the dimensions of the left, right, bottom, top, nearClip and farClip 
    102102                    extents of the viewing frustum as indicated. 
    103                          xshear- Assymetrical shear in viewing frustum in the horizontal  
    104                                  direction.  Value given in normalized device coordinates  
     103                         xshear- Assymetrical shear in viewing frustum in the horizontal 
     104                                 direction.  Value given in normalized device coordinates 
    105105                                 (see setShear() below). 
    106                          yshear- Assymetrical shear in viewing frustum in the vertical  
    107                                  direction.  Value given in normalized device coordinates  
     106                         yshear- Assymetrical shear in viewing frustum in the vertical 
     107                                 direction.  Value given in normalized device coordinates 
    108108                                 (see setShear() below). 
    109109                 */ 
    110                 void setFrustum( double left, double right,  
    111                                  double bottom, double top,  
     110                void setFrustum( double left, double right, 
     111                                 double bottom, double top, 
    112112                                 double nearClip, double farClip ); 
    113113 
    114114                /** Set the Projection type to be of Orthographic and provide 
    115115                     the left, right, bottom dimensions of the 2D rectangle*/ 
    116                    void setOrtho( double left, double right,  
    117                         double bottom, double top,  
     116                   void setOrtho( double left, double right, 
     117                        double bottom, double top, 
    118118                        double nearClip, double farClip  ); 
    119119 
    120                 /** convertToOrtho() converts the current perspective view to an  
    121                     orthographic view with dimensions that conserve the scale of the  
    122                     objects at distance d.  
    123                     convertToPerspective() converts the current orthographic view  
     120                /** convertToOrtho() converts the current perspective view to an 
     121                    orthographic view with dimensions that conserve the scale of the 
     122                    objects at distance d. 
     123                    convertToPerspective() converts the current orthographic view 
    124124                    to a perspective view with parameters that conserve the scale of 
    125125                    objects at distance d. */ 
     
    155155 
    156156            private : 
    157     
     157 
    158158                double _ortho_left, _ortho_right, _ortho_bottom, _ortho_top; 
    159159                double _left, _right, _bottom, _top, _nearClip, _farClip; 
     
    194194        { _rs->setWindowRectangle(x,y,width,height, resize); } 
    195195 
    196         void  setLens( Lens *lens )  
    197         {  
     196        void  setLens( Lens *lens ) 
     197        { 
    198198            if( _lens.get() != lens ) 
    199                 _lens = lens;  
     199                _lens = lens; 
    200200        } 
    201201 
     
    206206        /** Convenience method for setting the Lens Perspective. 
    207207            See Camera::Lens::setPerspective(). */ 
    208         void setLensPerspective( double hfov, double vfov,  
     208        void setLensPerspective( double hfov, double vfov, 
    209209                        double nearClip, double farClip, 
    210210                        double xshear=0, double yshear=0 ) 
    211         {  
     211        { 
    212212            _offset._xshear = xshear; 
    213213            _offset._yshear = yshear; 
     
    217217        /** Convenience method for setting the Lens Frustum. 
    218218            See Camera::Lens::setFrustum(). */ 
    219         void setLensFrustum( double left, double right,  
    220                                  double bottom, double top,  
     219        void setLensFrustum( double left, double right, 
     220                                 double bottom, double top, 
    221221                                 double nearClip, double farClip, 
    222222                                 double xshear=0, double yshear=0 ) 
    223         {  
     223        { 
    224224            _offset._xshear = xshear; 
    225225            _offset._yshear = yshear; 
    226             _lens->setFrustum(left,right,bottom,top,nearClip, farClip);  
     226            _lens->setFrustum(left,right,bottom,top,nearClip, farClip); 
    227227        } 
    228228 
    229229        /** Convenience method for setting the lens Orthographic projection. 
    230             See Camera::Lens::setOrtho() */  
    231         void setLensOrtho( double left, double right,  
    232                         double bottom, double top,  
     230            See Camera::Lens::setOrtho() */ 
     231        void setLensOrtho( double left, double right, 
     232                        double bottom, double top, 
    233233                        double nearClip, double farClip , 
    234234                        double xshear=0, double yshear=0 ) 
    235         {  
     235        { 
    236236            _offset._xshear = xshear; 
    237237            _offset._yshear = yshear; 
    238             _lens->setOrtho( left, right, bottom, top, nearClip, farClip);  
     238            _lens->setOrtho( left, right, bottom, top, nearClip, farClip); 
    239239        } 
    240240 
    241241        /** Convenience method for setting the lens shear. See Camera::Lens::setShear()*/ 
    242242        void setLensShear( double xshear, double yshear ) 
    243         {  
     243        { 
    244244            _offset._xshear = xshear; 
    245245            _offset._yshear = yshear; 
     
    248248        /** Convenience method for getting the lens shear. See Camera::Lens::getShear() */ 
    249249        void getLensShear( double &xshear, double &yshear ) 
    250         {  
     250        { 
    251251            xshear = _offset._xshear; 
    252252            yshear = _offset._yshear; 
    253253        } 
    254254 
    255         /** Convenience method for converting the Perpective lens to an  
     255        /** Convenience method for converting the Perpective lens to an 
    256256            Orthographic lens. see Camera::lens:convertToOrtho() */ 
    257257        bool convertLensToOrtho( float d) { return _lens->convertToOrtho(d); } 
    258258 
    259         /** Convenience method for converting the Orthographic lens to an  
     259        /** Convenience method for converting the Orthographic lens to an 
    260260            Perspective lens. see Camera::lens:convertToPerspective() */ 
    261261        bool convertLensToPerspective( float d) { return _lens->convertToPerspective(d); } 
     
    268268        void applyLens() { _lens->apply(_offset._xshear, _offset._yshear); } 
    269269 
    270         /** Convenience method for getting the Lens parameters.   
     270        /** Convenience method for getting the Lens parameters. 
    271271            See Camera::Lens::apply() */ 
    272272        void getLensParams( double &left, double &right, double &bottom, double &top, 
     
    278278        } 
    279279 
    280         /** Convenience method for getting the Lens Horizontal field of view.   
     280        /** Convenience method for getting the Lens Horizontal field of view. 
    281281            See Camera::Lens::getHorizontalFov() */ 
    282282        float getLensHorizontalFov() { return _lens->getHorizontalFov(); } 
    283283 
    284         /** Convenience method for getting the Lens Horizontal field of view.   
     284        /** Convenience method for getting the Lens Horizontal field of view. 
    285285            See Camera::Lens::getVerticalFov() */ 
    286286        float getLensVerticalFov() { return _lens->getVerticalFov(); } 
     
    294294            See Camera::Lens::getMatrix() */ 
    295295        void getLensMatrix(osg::Matrix::value_type matrix[16] ) 
    296         {  
     296        { 
    297297            _lens->generateMatrix(_offset._xshear, _offset._yshear, matrix ); 
    298298        } 
     
    322322        void getProjectionRectangle( int &x, int &y, unsigned int &width, unsigned int &height ) const ; 
    323323 
    324         osg::Matrix::value_type *getProjectionMatrix ()  
    325         {  
    326             _lens->generateMatrix(_offset._xshear, _offset._yshear, _projectionMatrix );  
     324        osg::Matrix::value_type *getProjectionMatrix () 
     325        { 
     326            _lens->generateMatrix(_offset._xshear, _offset._yshear, _projectionMatrix ); 
    327327            return _projectionMatrix; 
    328328        } 
     
    338338        void applyView(); 
    339339 
    340         void setOffset( const osg::Matrix::value_type matrix[16],  
    341                         osg::Matrix::value_type _xshear=0.0,  
    342                         osg::Matrix::value_type _yshear=0.0);  
    343         void setOffset( double _xshear, double _yshear);  
     340        void setOffset( const osg::Matrix::value_type matrix[16], 
     341                        osg::Matrix::value_type _xshear=0.0, 
     342                        osg::Matrix::value_type _yshear=0.0); 
     343        void setOffset( double _xshear, double _yshear); 
    344344        void setOffsetMultiplyMethod( Offset::MultiplyMethod method ) 
    345345        { 
     
    350350        void setClearColor( float red, float green, float blue, float alpha); 
    351351        void getClearColor( float& red, float& green, float& blue, float& alpha); 
    352          
     352 
    353353        void clear( void ); 
    354          
     354 
    355355        void setIndex( unsigned int index ) { _index = index; } 
    356356        unsigned int getIndex() const { return _index; }