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* className() const
return the name of the attribute's class type
[more]virtual const Type getType() const = 0
return the Type identifier of the attribute's class type
[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 setStateSetModes(StateSet&, const GLModeValue) const
[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:


Inherited from Referenced:

Public Methods

oinline Referenced& operator = (Referenced&)
oinline void ref() const
oinline void unref() const
oinline const int referenceCount() const

Protected Fields

omutable int _refCount


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

o OVERRIDE_OFF
Equivilant to OFF | OVERRIDE

o OVERRIDE_ON
Equivilant to ON | OVERRIDE

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 TEXTURE_0

o TEXTURE_1

o TEXTURE_2

o TEXTURE_3

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 SHADEMODEL

o POLYGONMODE

o POLYGONOFFSET

o TEXENV

o TEXGEN

o TEXMAT

o TRANSPARENCY

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* className() const
return the name of the attribute's class type

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

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 setStateSetModes(StateSet&, const GLModeValue) const

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
Transparency
Texture
TexMat
TexGen
TexEnv
Stencil
ShadeModel
PolygonOffset
PolygonMode
Point
Material
LineWidth
Light
FrontFace
Fog
Depth
CullFace
ColorMatrix
ColorMask
ClipPlane
AlphaFunc

Alphabetic index HTML hierarchy of classes or Java



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