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/osgFX/BumpMapping

    r5328 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*/ 
     
    2626 
    2727    /** 
    28      This effect makes surfaces appear bumpy. Children nodes must use two textures,  
    29      one for diffuse color and one for the normal map (which can be created  
    30      from a height map with tools like nVIDIA's normal map generator). Furthermore,  
    31      tangent-space basis vectors must be created and assigned to each Geometry; this  
    32      can be done quickly by calling BumpMapping::prepareChildren(). Note that both  
    33      diffuse and normal map textures must have corresponding UV maps defined in  
     28     This effect makes surfaces appear bumpy. Children nodes must use two textures, 
     29     one for diffuse color and one for the normal map (which can be created 
     30     from a height map with tools like nVIDIA's normal map generator). Furthermore, 
     31     tangent-space basis vectors must be created and assigned to each Geometry; this 
     32     can be done quickly by calling BumpMapping::prepareChildren(). Note that both 
     33     diffuse and normal map textures must have corresponding UV maps defined in 
    3434     Geometry objects. 
    35      This effect defines a preferred technique which uses ARB vertex & fragment  
    36      programs, and a fallback technique which doesn't use fragment programs. The  
    37      latter is more limited though since it can't handle ambient and specular  
     35     This effect defines a preferred technique which uses ARB vertex & fragment 
     36     programs, and a fallback technique which doesn't use fragment programs. The 
     37     latter is more limited though since it can't handle ambient and specular 
    3838     components. 
    3939     */ 
     
    4343        BumpMapping(const BumpMapping& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); 
    4444 
    45         META_Effect(osgFX, BumpMapping,  
    46          
    47             "Bump Mapping",  
    48              
     45        META_Effect(osgFX, BumpMapping, 
     46 
     47            "Bump Mapping", 
     48 
    4949            "This effect makes surfaces appear bumpy. Children nodes must use two textures, " 
    5050            "one for diffuse color and one for the normal map (which can be created " 
     
    5858            "latter is more limited though since it can't handle ambient and specular " 
    5959            "components.", 
    60              
     60 
    6161            "Marco Jez"); 
    62              
    63          
     62 
     63 
    6464        /** get the OpenGL light number */ 
    6565        inline int getLightNumber() const; 
    66          
     66 
    6767        /** set the OpenGL light number that will be used in lighting computations */ 
    6868        inline void setLightNumber(int n); 
    69          
     69 
    7070        /** get the texture unit that contains diffuse color texture. Default is 1 */ 
    7171        inline int getDiffuseTextureUnit() const; 
    72          
     72 
    7373        /** set the texture unit that contains diffuse color texture. Default is 1 */ 
    7474        inline void setDiffuseTextureUnit(int n); 
     
    7676        /** get the texture unit that contains normal map texture. Default is 0 */ 
    7777        inline int getNormalMapTextureUnit() const; 
    78          
     78 
    7979        /** set the texture unit that contains normal map texture. Default is 0 */ 
    8080        inline void setNormalMapTextureUnit(int n); 
    81          
     81 
    8282        /** get the diffuse color texture that overrides children's texture */ 
    8383        inline osg::Texture2D* getOverrideDiffuseTexture(); 
    84          
     84 
    8585        /** get the const diffuse color texture that overrides children's texture */ 
    8686        inline const osg::Texture2D* getOverrideDiffuseTexture() const; 
    87          
     87 
    8888        /** set the diffuse color texture that overrides children's texture */ 
    8989        inline void setOverrideDiffuseTexture(osg::Texture2D* texture); 
    90          
     90 
    9191        /** get the normal map texture that overrides children's texture */ 
    9292        inline osg::Texture2D* getOverrideNormalMapTexture(); 
    93          
     93 
    9494        /** get the const normal map texture that overrides children's texture */ 
    9595        inline const osg::Texture2D* getOverrideNormalMapTexture() const; 
     
    9797        /** set the normal map texture that overrides children's texture */ 
    9898        inline void setOverrideNormalMapTexture(osg::Texture2D* texture); 
    99          
     99 
    100100        /** 
    101101         prepare a Geometry for bump lighting. Tangent-space basis vectors are 
     
    103103         */ 
    104104        void prepareGeometry(osg::Geometry* geo); 
    105          
     105 
    106106        /** prepare a Node for bump lighting, calling prepareGeometry() for each Geometry */ 
    107107        void prepareNode(osg::Node* node); 
    108          
     108 
    109109        /** prepare children for bump lighting. Actually calls prepareNode() for each child */ 
    110110        void prepareChildren(); 
    111          
     111 
    112112        /** set up a demo environment with predefined diffuse and normal maps, as well as texture coordinates */ 
    113113        void setUpDemo(); 
     
    127127    }; 
    128128 
    129     // INLINE METHODS     
    130     
     129    // INLINE METHODS 
     130 
    131131    inline int BumpMapping::getLightNumber() const 
    132132    { 
    133133        return _lightnum; 
    134134    } 
    135      
     135 
    136136    inline void BumpMapping::setLightNumber(int n) 
    137137    { 
     
    139139        dirtyTechniques(); 
    140140    } 
    141      
     141 
    142142    inline int BumpMapping::getDiffuseTextureUnit() const 
    143143    { 
    144144        return _diffuse_unit; 
    145145    } 
    146      
     146 
    147147    inline void BumpMapping::setDiffuseTextureUnit(int n) 
    148148    { 
     
    150150        dirtyTechniques(); 
    151151    } 
    152      
     152 
    153153    inline int BumpMapping::getNormalMapTextureUnit() const 
    154154    { 
    155155        return _normal_unit; 
    156156    } 
    157      
     157 
    158158    inline void BumpMapping::setNormalMapTextureUnit(int n) 
    159159    { 
     
    161161        dirtyTechniques(); 
    162162    } 
    163      
     163 
    164164    inline osg::Texture2D* BumpMapping::getOverrideDiffuseTexture() 
    165165    { 
     
    171171        return _diffuse_tex.get(); 
    172172    } 
    173      
     173 
    174174    inline void BumpMapping::setOverrideDiffuseTexture(osg::Texture2D* texture) 
    175175    { 
     
    187187        return _normal_tex.get(); 
    188188    } 
    189      
     189 
    190190    inline void BumpMapping::setOverrideNormalMapTexture(osg::Texture2D* texture) 
    191191    {