class SG_EXPORT osg::StateAttribute

Base class for state attribuets

Inheritance:


Public Methods

[more] StateAttribute()
[more] StateAttribute(const StateAttribute& sa, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
[more]virtual Object* cloneType() const = 0
Clone the type of an attribute, with Object* return type.
[more]virtual Object* clone(const CopyOp&) const = 0
Clone an attribute, with Object* return type.
[more]virtual bool isSameKindAs(const Object* obj) const
return true if this and obj are of the same kind of object
[more]virtual const char* libraryName() const
return the name of the attribute's library
[more]virtual const char* className() const
return the name of the attribute's class type
[more]virtual Type getType() const = 0
return the Type identifier of the attribute's class type
[more]virtual bool isTextureAttribute() const
return true if StateAttribute is a type which controls texturing and needs to be issued wrt to specific texture unit
[more]virtual int compare(const StateAttribute& sa) const = 0
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
[more]bool operator < (const StateAttribute& rhs) const
[more]bool operator == (const StateAttribute& rhs) const
[more]bool operator != (const StateAttribute& rhs) const
[more]virtual void getAssociatedModes(std::vector<GLMode>& ) const
return the modes associated with this StateSet
[more]virtual void apply(State&) const = 0
apply the OpenGL state attributes.
[more]virtual void compile(State&) const
default to nothing to compile - all state is applied immediately.

Public Members

[more]typedef GLenum GLMode
GLMode is the value used in glEnable/glDisable(mode)
[more]typedef unsigned int GLModeValue
GLModeValue is used to specified whether an mode is enabled (ON) or disabled (OFF).
[more]typedef unsigned int OverrideValue
Override is used to specified the override behavior of StateAttributes from from parent to children.
[more]enum Values
list values which can be used in to set either GLModeValues or OverrideValues.
[more]typedef unsigned int Type
Type identifier to differentiate between different state types.
[more]enum Types
Values of StateAttribute::Type used to aid identification of different StateAttribute subclasses.

Protected Methods

[more]virtual ~StateAttribute()


Inherited from Object:

Public Methods

oinline void setDataVariance(const DataVariance dv)
oinline const DataVariance getDataVariance() const
oinline void setUserData(Referenced* obj)
oinline Referenced* getUserData()
oinline const Referenced* getUserData() const

Public Members

oenum DataVariance

Protected Fields

oDataVariance _dataVariance
oref_ptr<Referenced> _userData


Inherited from Referenced:

Public Methods

oinline Referenced& operator = (Referenced&)
oinline void ref() const
oinline void unref() const
oinline void unref_nodelete() const
oinline int referenceCount() const
oinline static int createdCount()
oinline static int deletedCount()

Protected Fields

omutable int _refCount
ostatic int _createdCount
ostatic int _deletedCount


Documentation

Base class for state attribuets
otypedef GLenum GLMode
GLMode is the value used in glEnable/glDisable(mode)

otypedef unsigned int GLModeValue
GLModeValue is used to specified whether an mode is enabled (ON) or disabled (OFF). GLMoveValue is also used to specify the override behavior of modes from parent to children. See enum Value description for more details.

otypedef unsigned int OverrideValue
Override is used to specified the override behavior of StateAttributes from from parent to children. See enum Value description for more details.

oenum Values
list values which can be used in to set either GLModeValues or OverrideValues. When using in conjunction with GLModeValues all Values have meaning. When using in conjection with StateAttribute OverrideValue only OFF,OVERRIDE and INHERIT are meaningful. However, they are useful when using GLModeValue and OverrideValue in conjunction with each other as when using StateSet::setAttributeAndModes(..).

o OFF
means that associated GLMode and Override is disabled

o ON
means that associated GLMode is enabled and Override is disabled

o OVERRIDE
Overriding of GLMode's or StateAttributes is enabled, so that state below it is overriden

o PROTECTED
Protecting of GLMode's os StateAttributes is enabled, so that state from above connot override this and below state

o INHERIT
means that GLMode or StateAttribute should in inherited from above

otypedef unsigned int Type
Type identifier to differentiate between different state types.

oenum Types
Values of StateAttribute::Type used to aid identification of different StateAttribute subclasses. Each subclass defines it 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 simple use that types value.

o TEXTURE

o POLYGONMODE

o POLYGONOFFSET

o MATERIAL

o ALPHAFUNC

o ANTIALIAS

o COLORTABLE

o CULLFACE

o FOG

o FRONTFACE

o LIGHT

o LIGHT_0

o LIGHT_1

o LIGHT_2

o LIGHT_3

o LIGHT_4

o LIGHT_5

o LIGHT_6

o LIGHT_7

o POINT

o LINEWIDTH

o LINESTIPPLE

o POLYGONSTIPPLE

o SHADEMODEL

o TEXENV

o TEXGEN

o TEXMAT

o LIGHTMODEL

o BLENDFUNC

o STENCIL

o COLORMASK

o DEPTH

o VIEWPORT

o CLIPPLANE

o CLIPPLANE_0

o CLIPPLANE_1

o CLIPPLANE_2

o CLIPPLANE_3

o CLIPPLANE_4

o CLIPPLANE_5

o COLORMATRIX

o StateAttribute()

o StateAttribute(const StateAttribute& sa, const CopyOp& copyop=CopyOp::SHALLOW_COPY)

ovirtual Object* cloneType() const = 0
Clone the type of an attribute, with Object* return type. Must be defined by derived classes.

ovirtual Object* clone(const CopyOp&) const = 0
Clone an attribute, with Object* return type. Must be defined by derived classes.

ovirtual bool isSameKindAs(const Object* obj) const
return true if this and obj are of the same kind of object

ovirtual const char* libraryName() const
return the name of the attribute's library

ovirtual const char* className() const
return the name of the attribute's class type

ovirtual Type getType() const = 0
return the Type identifier of the attribute's class type

ovirtual bool isTextureAttribute() const
return true if StateAttribute is a type which controls texturing and needs to be issued wrt to specific texture unit

ovirtual int compare(const StateAttribute& sa) const = 0
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

obool operator < (const StateAttribute& rhs) const

obool operator == (const StateAttribute& rhs) const

obool operator != (const StateAttribute& rhs) const

ovirtual void getAssociatedModes(std::vector<GLMode>& ) const
return the modes associated with this StateSet

ovirtual void apply(State&) const = 0
apply the OpenGL state attributes. The global state for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.

ovirtual void compile(State&) const
default to nothing to compile - all state is applied immediately.

ovirtual ~StateAttribute()


Direct child classes:
Viewport
Texture
TexMat
TexGen
TexEnvCombine
TexEnv
Stencil
ShadeModel
PolygonStipple
PolygonOffset
PolygonMode
Point
Material
LineWidth
LineStipple
LightModel
Light
FrontFace
Fog
Depth
CullFace
ColorMatrix
ColorMask
ClipPlane
BlendFunc
AlphaFunc

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.