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

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osg/StateAttribute

    r11965 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*/ 
     
    4343/** META_StateAttribute macro define the standard clone, isSameKindAs, 
    4444  * className and getType methods. 
    45   * Use when subclassing from Object to make it more convenient to define  
    46   * the standard pure virtual methods which are required for all Object  
     45  * Use when subclassing from Object to make it more convenient to define 
     46  * the standard pure virtual methods which are required for all Object 
    4747  * subclasses.*/ 
    4848#define META_StateAttribute(library,name,type) \ 
     
    7373 
    7474/** Base class for state attributes. 
    75 */      
     75*/ 
    7676class OSG_EXPORT StateAttribute : public Object 
    7777{ 
    7878    public : 
    79      
     79 
    8080        /** GLMode is the value used in glEnable/glDisable(mode) */ 
    8181        typedef GLenum          GLMode; 
    8282        /** GLModeValue is used to specify whether a mode is enabled (ON) or disabled (OFF). 
    83           * GLMoveValue is also used to specify the override behavior of modes from parent to children.  
     83          * GLMoveValue is also used to specify the override behavior of modes from parent to children. 
    8484          * See enum Value description for more details.*/ 
    8585        typedef unsigned int    GLModeValue; 
    8686        /** Override is used to specify the override behavior of StateAttributes 
    87           * from parent to children.  
     87          * from parent to children. 
    8888          * See enum Value description for more details.*/ 
    8989        typedef unsigned int    OverrideValue; 
    9090 
    9191        /** list values which can be used to set either GLModeValues or OverrideValues. 
    92           * When using in conjunction with GLModeValues, all Values have meaning.  
    93           * When using in conjunction with StateAttribute OverrideValue only  
     92          * When using in conjunction with GLModeValues, all Values have meaning. 
     93          * When using in conjunction with StateAttribute OverrideValue only 
    9494          * OFF,OVERRIDE and INHERIT are meaningful. 
    95           * However, they are useful when using GLModeValue  
     95          * However, they are useful when using GLModeValue 
    9696          * and OverrideValue in conjunction with each other as when using 
    9797          * StateSet::setAttributeAndModes(..).*/ 
     
    105105            OVERRIDE     = 0x2, 
    106106            /** Protecting of GLMode's or StateAttributes is enabled, so that state from above cannot override this and below state.*/ 
    107             PROTECTED    = 0x4,             
     107            PROTECTED    = 0x4, 
    108108            /** means that GLMode or StateAttribute should be inherited from above.*/ 
    109109            INHERIT      = 0x8 
    110110        }; 
    111          
     111 
    112112        /** Type identifier to differentiate between different state types. */ 
    113113        // typedef unsigned int Type; 
     
    115115        /** Values of StateAttribute::Type used to aid identification 
    116116          * of different StateAttribute subclasses. Each subclass defines 
    117           * its own value in the virtual Type getType() method.  When  
     117          * its own value in the virtual Type getType() method.  When 
    118118          * extending the osg's StateAttribute's simply define your 
    119119          * own Type value which is unique, using the StateAttribute::Type 
    120120          * enum as a guide of what values to use.  If your new subclass 
    121           * needs to override a standard StateAttriubte then simply use  
     121          * needs to override a standard StateAttriubte then simply use 
    122122          * that type's value. */ 
    123123        enum Type 
    124124        { 
    125125            TEXTURE, 
    126              
     126 
    127127            POLYGONMODE, 
    128128            POLYGONOFFSET, 
     
    134134            FOG, 
    135135            FRONTFACE, 
    136              
     136 
    137137            LIGHT, 
    138138 
     
    169169            VALIDATOR, 
    170170            VIEWMATRIXEXTRACTOR, 
    171              
     171 
    172172            /// osgNV namespace 
    173173            OSGNV_PARAMETER_BLOCK, 
     
    190190            TRANSFORMFEEDBACKBUFFERBINDING 
    191191        }; 
    192          
     192 
    193193        /** Simple pairing between an attribute type and the member within that attribute type group.*/ 
    194194        typedef std::pair<Type,unsigned int> TypeMemberPair; 
    195195 
    196196        StateAttribute(); 
    197          
    198         StateAttribute(const StateAttribute& sa,const CopyOp& copyop=CopyOp::SHALLOW_COPY):  
     197 
     198        StateAttribute(const StateAttribute& sa,const CopyOp& copyop=CopyOp::SHALLOW_COPY): 
    199199            Object(sa,copyop), 
    200200            _shaderComponent(sa._shaderComponent), 
     
    202202            _eventCallback(copyop(sa._eventCallback.get())) 
    203203            {} 
    204          
     204 
    205205 
    206206        /** Clone the type of an attribute, with Object* return type. 
     
    220220        /** Return the name of the attribute's class type.*/ 
    221221        virtual const char* className() const { return "StateAttribute"; } 
    222          
    223          
     222 
     223 
    224224        /** Fast alternative to dynamic_cast<> for determining if state attribute is a Texture.*/ 
    225225        virtual Texture* asTexture() { return 0; } 
    226          
     226 
    227227        /** Fast alternative to dynamic_cast<> for determining if state attribute is a Texture.*/ 
    228228        virtual const Texture* asTexture() const { return 0; } 
    229229 
    230          
     230 
    231231        /** Return the Type identifier of the attribute's class type.*/ 
    232232        virtual Type getType() const = 0; 
     
    243243        /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ 
    244244        virtual int compare(const StateAttribute& sa) const = 0; 
    245          
     245 
    246246        bool operator <  (const StateAttribute& rhs) const { return compare(rhs)<0; } 
    247247        bool operator == (const StateAttribute& rhs) const { return compare(rhs)==0; } 
    248248        bool operator != (const StateAttribute& rhs) const { return compare(rhs)!=0; } 
    249249 
    250          
     250 
    251251        /** A vector of osg::StateSet pointers which is used to store the parent(s) of this StateAttribute.*/ 
    252252        typedef std::vector<StateSet*> ParentList; 
     
    280280        }; 
    281281 
    282         /** Return the modes associated with this StateAttribute.*/         
     282        /** Return the modes associated with this StateAttribute.*/ 
    283283        virtual bool getModeUsage(ModeUsage&) const 
    284284        { 
     
    286286            return false; 
    287287        } 
    288          
     288 
    289289        /** Check the modes associated with this StateAttribute are supported by current OpenGL drivers, 
    290290          * and if not set the associated mode in osg::State to be black listed/invalid. 
     
    318318        const StateAttributeCallback* getEventCallback() const { return _eventCallback.get(); } 
    319319 
    320      
    321         /** apply the OpenGL state attributes.  
     320 
     321        /** apply the OpenGL state attributes. 
    322322          * The render info for the current OpenGL context is passed 
    323323          * in to allow the StateAttribute to obtain details on the 
     
    339339 
    340340    protected: 
    341      
     341 
    342342        virtual ~StateAttribute() {} 
    343343