Ran script to remove trailing spaces and tabs
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -42,8 +42,8 @@ class Texture;
|
||||
|
||||
/** META_StateAttribute macro define the standard clone, isSameKindAs,
|
||||
* className and getType methods.
|
||||
* Use when subclassing from Object to make it more convenient to define
|
||||
* the standard pure virtual methods which are required for all Object
|
||||
* Use when subclassing from Object to make it more convenient to define
|
||||
* the standard pure virtual methods which are required for all Object
|
||||
* subclasses.*/
|
||||
#define META_StateAttribute(library,name,type) \
|
||||
virtual osg::Object* cloneType() const { return new name(); } \
|
||||
@@ -72,27 +72,27 @@ class Texture;
|
||||
|
||||
|
||||
/** Base class for state attributes.
|
||||
*/
|
||||
*/
|
||||
class OSG_EXPORT StateAttribute : public Object
|
||||
{
|
||||
public :
|
||||
|
||||
|
||||
/** GLMode is the value used in glEnable/glDisable(mode) */
|
||||
typedef GLenum GLMode;
|
||||
/** GLModeValue is used to specify whether a mode is enabled (ON) or disabled (OFF).
|
||||
* GLMoveValue is also used to specify the override behavior of modes from parent to children.
|
||||
* GLMoveValue is also used to specify the override behavior of modes from parent to children.
|
||||
* See enum Value description for more details.*/
|
||||
typedef unsigned int GLModeValue;
|
||||
/** Override is used to specify the override behavior of StateAttributes
|
||||
* from parent to children.
|
||||
* from parent to children.
|
||||
* See enum Value description for more details.*/
|
||||
typedef unsigned int OverrideValue;
|
||||
|
||||
/** list values which can be used to set either GLModeValues or OverrideValues.
|
||||
* When using in conjunction with GLModeValues, all Values have meaning.
|
||||
* When using in conjunction with StateAttribute OverrideValue only
|
||||
* When using in conjunction with GLModeValues, all Values have meaning.
|
||||
* When using in conjunction with StateAttribute OverrideValue only
|
||||
* OFF,OVERRIDE and INHERIT are meaningful.
|
||||
* However, they are useful when using GLModeValue
|
||||
* However, they are useful when using GLModeValue
|
||||
* and OverrideValue in conjunction with each other as when using
|
||||
* StateSet::setAttributeAndModes(..).*/
|
||||
enum Values
|
||||
@@ -104,26 +104,26 @@ class OSG_EXPORT StateAttribute : public Object
|
||||
/** Overriding of GLMode's or StateAttributes is enabled, so that state below it is overridden.*/
|
||||
OVERRIDE = 0x2,
|
||||
/** Protecting of GLMode's or StateAttributes is enabled, so that state from above cannot override this and below state.*/
|
||||
PROTECTED = 0x4,
|
||||
PROTECTED = 0x4,
|
||||
/** means that GLMode or StateAttribute should be inherited from above.*/
|
||||
INHERIT = 0x8
|
||||
};
|
||||
|
||||
|
||||
/** Type identifier to differentiate between different state types. */
|
||||
// typedef unsigned int Type;
|
||||
|
||||
/** Values of StateAttribute::Type used to aid identification
|
||||
* of different StateAttribute subclasses. Each subclass defines
|
||||
* its own value in the virtual Type getType() method. When
|
||||
* its own value in the virtual Type getType() method. When
|
||||
* extending the osg's StateAttribute's simply define your
|
||||
* own Type value which is unique, using the StateAttribute::Type
|
||||
* enum as a guide of what values to use. If your new subclass
|
||||
* needs to override a standard StateAttriubte then simply use
|
||||
* needs to override a standard StateAttriubte then simply use
|
||||
* that type's value. */
|
||||
enum Type
|
||||
{
|
||||
TEXTURE,
|
||||
|
||||
|
||||
POLYGONMODE,
|
||||
POLYGONOFFSET,
|
||||
MATERIAL,
|
||||
@@ -133,7 +133,7 @@ class OSG_EXPORT StateAttribute : public Object
|
||||
CULLFACE,
|
||||
FOG,
|
||||
FRONTFACE,
|
||||
|
||||
|
||||
LIGHT,
|
||||
|
||||
POINT,
|
||||
@@ -168,7 +168,7 @@ class OSG_EXPORT StateAttribute : public Object
|
||||
/// osgFX namespace
|
||||
VALIDATOR,
|
||||
VIEWMATRIXEXTRACTOR,
|
||||
|
||||
|
||||
/// osgNV namespace
|
||||
OSGNV_PARAMETER_BLOCK,
|
||||
|
||||
@@ -189,19 +189,19 @@ class OSG_EXPORT StateAttribute : public Object
|
||||
UNIFORMBUFFERBINDING,
|
||||
TRANSFORMFEEDBACKBUFFERBINDING
|
||||
};
|
||||
|
||||
|
||||
/** Simple pairing between an attribute type and the member within that attribute type group.*/
|
||||
typedef std::pair<Type,unsigned int> TypeMemberPair;
|
||||
|
||||
StateAttribute();
|
||||
|
||||
StateAttribute(const StateAttribute& sa,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
|
||||
|
||||
StateAttribute(const StateAttribute& sa,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
|
||||
Object(sa,copyop),
|
||||
_shaderComponent(sa._shaderComponent),
|
||||
_updateCallback(copyop(sa._updateCallback.get())),
|
||||
_eventCallback(copyop(sa._eventCallback.get()))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
/** Clone the type of an attribute, with Object* return type.
|
||||
Must be defined by derived classes.*/
|
||||
@@ -219,15 +219,15 @@ class OSG_EXPORT StateAttribute : public Object
|
||||
|
||||
/** Return the name of the attribute's class type.*/
|
||||
virtual const char* className() const { return "StateAttribute"; }
|
||||
|
||||
|
||||
|
||||
|
||||
/** Fast alternative to dynamic_cast<> for determining if state attribute is a Texture.*/
|
||||
virtual Texture* asTexture() { return 0; }
|
||||
|
||||
|
||||
/** Fast alternative to dynamic_cast<> for determining if state attribute is a Texture.*/
|
||||
virtual const Texture* asTexture() const { return 0; }
|
||||
|
||||
|
||||
|
||||
/** Return the Type identifier of the attribute's class type.*/
|
||||
virtual Type getType() const = 0;
|
||||
|
||||
@@ -242,12 +242,12 @@ class OSG_EXPORT StateAttribute : public Object
|
||||
|
||||
/** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/
|
||||
virtual int compare(const StateAttribute& sa) const = 0;
|
||||
|
||||
|
||||
bool operator < (const StateAttribute& rhs) const { return compare(rhs)<0; }
|
||||
bool operator == (const StateAttribute& rhs) const { return compare(rhs)==0; }
|
||||
bool operator != (const StateAttribute& rhs) const { return compare(rhs)!=0; }
|
||||
|
||||
|
||||
|
||||
/** A vector of osg::StateSet pointers which is used to store the parent(s) of this StateAttribute.*/
|
||||
typedef std::vector<StateSet*> ParentList;
|
||||
|
||||
@@ -279,13 +279,13 @@ class OSG_EXPORT StateAttribute : public Object
|
||||
virtual void usesTextureMode(GLMode mode) = 0;
|
||||
};
|
||||
|
||||
/** Return the modes associated with this StateAttribute.*/
|
||||
/** Return the modes associated with this StateAttribute.*/
|
||||
virtual bool getModeUsage(ModeUsage&) const
|
||||
{
|
||||
// default to no GLMode's associated with use of the StateAttribute.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/** Check the modes associated with this StateAttribute are supported by current OpenGL drivers,
|
||||
* and if not set the associated mode in osg::State to be black listed/invalid.
|
||||
* Return true if all associated modes are valid.*/
|
||||
@@ -317,8 +317,8 @@ class OSG_EXPORT StateAttribute : public Object
|
||||
/** Get the const EventCallback.*/
|
||||
const StateAttributeCallback* getEventCallback() const { return _eventCallback.get(); }
|
||||
|
||||
|
||||
/** apply the OpenGL state attributes.
|
||||
|
||||
/** apply the OpenGL state attributes.
|
||||
* The render info for the current OpenGL context is passed
|
||||
* in to allow the StateAttribute to obtain details on the
|
||||
* the current context and state.
|
||||
@@ -338,7 +338,7 @@ class OSG_EXPORT StateAttribute : public Object
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
virtual ~StateAttribute() {}
|
||||
|
||||
void addParent(osg::StateSet* object);
|
||||
|
||||
Reference in New Issue
Block a user