class SG_EXPORT osg::GeoState: public Object

Encapsulates OpenGL state modes and attributes.

Inheritance:


Public Classes

[more]enum AttributeType
[more]enum AttributeMode

Public Methods

[more] GeoState()
[more]static GeoState* instance()
[more]virtual Object* clone() const
[more]virtual bool isSameKindAs(Object* obj)
[more]const char* className() const
[more]void setGlobalDefaults()
set all the modes to on or off so that it defines a complete state, typically used for a default global state
[more]void setAllToInherit()
set all the modes to inherit, typically used to signifiy nodes which inherit all of their modes for the global state
[more]void setMode(AttributeType type, AttributeMode mode)
[more]AttributeMode getMode(AttributeType type) const
[more]void setAttribute(AttributeType type, Object *attribute)
[more]Object* getAttribute(AttributeType type) const
[more]bool isTransparent()
[more]void apply()
[more]void apply(GeoState* global, GeoState* prev)
[more]bool check()
[more]static AttributeMode combineMode(const AttributeMode g, const AttributeMode p, const AttributeMode c)
[more]static AttributeMode mergeMode(const AttributeMode lhs, const AttributeMode rhs)

Protected Fields

[more]AttributeMode _transparencing
[more]AttributeMode _face_culling
[more]AttributeMode _lighting
[more]AttributeMode _texturing
[more]AttributeMode _fogging
[more]AttributeMode _texgening
[more]AttributeMode _antialiasing
[more]AttributeMode _colortable
[more]AttributeMode _pointSmoothing
[more]AttributeMode _polygonOffsetting
[more]AttributeMode _alphaTesting
[more]ref_ptr<Texture> _texture
[more]ref_ptr<TexGen> _texgen
[more]ref_ptr<Material> _material
[more]ref_ptr<TexEnv> _texenv
[more]ref_ptr<Transparency> _transparency
[more]ref_ptr<TexMat> _texmat
[more]ref_ptr<Fog> _fog
[more]ref_ptr<Point> _point
[more]ref_ptr<PolygonOffset> _polygonOffset
[more]ref_ptr<CullFace> _cullFace
[more]ref_ptr<AlphaFunc> _alphaFunc

Protected Methods

[more]virtual ~GeoState()
[more] GeoState(const GeoState&)
[more]GeoState& operator = (const GeoState&)
[more]virtual bool readLocalData(Input& fr)
[more]virtual bool writeLocalData(Output& fw)
[more]bool matchModeStr(const char* str, AttributeMode& mode)
[more]const char* getModeStr(AttributeMode flag)


Inherited from Object:

Public Methods

ovirtual Object* readClone(Input& fr)
ovirtual bool write(Output& fw)


Inherited from Referenced:

Public Methods

ovoid ref()
ovoid unref()
oint referenceCount()

Protected Fields

oint _refCount


Documentation

Encapsulates OpenGL state modes and attributes. Used to specificy textures etc of osg::GeoSet's which hold references to a single osg::GeoState. GeoState can be shared between GeoSet's and is recommend if possible as it minimize expensive state changes in the graphics pipeline.
oenum AttributeType

o ANTIALIAS

o FACE_CULL

o FOG

o LIGHTING

o MATERIAL

o POINT

o POLYGON_OFFSET

o TEXENV

o TEXGEN

o TEXMAT

o TEXTURE

o TRANSPARENCY

o WIREFRAME

o ALPHAFUNC

oenum AttributeMode

o INHERIT

o OFF

o ON

o OVERRIDE_OFF

o OVERRIDE_ON

o GeoState()

ostatic GeoState* instance()

ovirtual Object* clone() const

ovirtual bool isSameKindAs(Object* obj)

oconst char* className() const

ovoid setGlobalDefaults()
set all the modes to on or off so that it defines a complete state, typically used for a default global state

ovoid setAllToInherit()
set all the modes to inherit, typically used to signifiy nodes which inherit all of their modes for the global state

ovoid setMode(AttributeType type, AttributeMode mode)

oAttributeMode getMode(AttributeType type) const

ovoid setAttribute(AttributeType type, Object *attribute)

oObject* getAttribute(AttributeType type) const

obool isTransparent()

ovoid apply()

ovoid apply(GeoState* global, GeoState* prev)

obool check()

ostatic AttributeMode combineMode(const AttributeMode g, const AttributeMode p, const AttributeMode c)

ostatic AttributeMode mergeMode(const AttributeMode lhs, const AttributeMode rhs)

ovirtual ~GeoState()

o GeoState(const GeoState&)

oGeoState& operator = (const GeoState&)

ovirtual bool readLocalData(Input& fr)

ovirtual bool writeLocalData(Output& fw)

obool matchModeStr(const char* str, AttributeMode& mode)

oconst char* getModeStr(AttributeMode flag)

oAttributeMode _transparencing

oAttributeMode _face_culling

oAttributeMode _lighting

oAttributeMode _texturing

oAttributeMode _fogging

oAttributeMode _texgening

oAttributeMode _antialiasing

oAttributeMode _colortable

oAttributeMode _pointSmoothing

oAttributeMode _polygonOffsetting

oAttributeMode _alphaTesting

oref_ptr<Texture> _texture

oref_ptr<TexGen> _texgen

oref_ptr<Material> _material

oref_ptr<TexEnv> _texenv

oref_ptr<Transparency> _transparency

oref_ptr<TexMat> _texmat

oref_ptr<Fog> _fog

oref_ptr<Point> _point

oref_ptr<PolygonOffset> _polygonOffset

oref_ptr<CullFace> _cullFace

oref_ptr<AlphaFunc> _alphaFunc


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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