OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SceneUtil::CompositeStateSetUpdater Class Reference

A variant of the StateSetController that can be made up of multiple controllers all controlling the same target. More...

#include <statesetupdater.hpp>

Inheritance diagram for SceneUtil::CompositeStateSetUpdater:
Collaboration diagram for SceneUtil::CompositeStateSetUpdater:

Public Member Functions

 CompositeStateSetUpdater ()
 
 CompositeStateSetUpdater (const CompositeStateSetUpdater &copy, const osg::CopyOp &copyop)
 
 META_Object (SceneUtil, CompositeStateSetUpdater) unsigned int getNumControllers()
 
StateSetUpdatergetController (int i)
 
void addController (StateSetUpdater *ctrl)
 
virtual void apply (osg::StateSet *stateset, osg::NodeVisitor *nv)
 
- Public Member Functions inherited from SceneUtil::StateSetUpdater
 StateSetUpdater ()
 
 StateSetUpdater (const StateSetUpdater &copy, const osg::CopyOp &copyop)
 

Protected Member Functions

virtual void setDefaults (osg::StateSet *stateset)
 
- Protected Member Functions inherited from SceneUtil::StateSetUpdater
void reset ()
 Reset mStateSets, forcing a setDefaults() on the next frame. Can be used to change the defaults if needed. More...
 

Protected Attributes

std::vector< osg::ref_ptr
< StateSetUpdater > > 
mCtrls
 

Detailed Description

A variant of the StateSetController that can be made up of multiple controllers all controlling the same target.

Constructor & Destructor Documentation

SceneUtil::CompositeStateSetUpdater::CompositeStateSetUpdater ( )
SceneUtil::CompositeStateSetUpdater::CompositeStateSetUpdater ( const CompositeStateSetUpdater copy,
const osg::CopyOp &  copyop 
)

Here is the call graph for this function:

Member Function Documentation

void SceneUtil::CompositeStateSetUpdater::addController ( StateSetUpdater ctrl)

Here is the caller graph for this function:

void SceneUtil::CompositeStateSetUpdater::apply ( osg::StateSet *  stateset,
osg::NodeVisitor *  nv 
)
virtual

Apply state - to override in derived classes

Note
Due to the double buffering approach you have to apply all state even if it has not changed since the last frame.

Reimplemented from SceneUtil::StateSetUpdater.

StateSetUpdater * SceneUtil::CompositeStateSetUpdater::getController ( int  i)
SceneUtil::CompositeStateSetUpdater::META_Object ( SceneUtil  ,
CompositeStateSetUpdater   
)
void SceneUtil::CompositeStateSetUpdater::setDefaults ( osg::StateSet *  stateset)
protectedvirtual

Set default state - optionally override in derived classes

May be used e.g. to allocate StateAttributes.

Reimplemented from SceneUtil::StateSetUpdater.

Member Data Documentation

std::vector<osg::ref_ptr<StateSetUpdater> > SceneUtil::CompositeStateSetUpdater::mCtrls
protected

The documentation for this class was generated from the following files: