osgUtil::Optimizer::StateVisitor Class Reference

Inheritance diagram for osgUtil::Optimizer::StateVisitor:

osgUtil::BaseOptimizerVisitor osg::NodeVisitor osg::Referenced

List of all members.

Public Member Functions

 StateVisitor (Optimizer *optimizer=0)
 default to traversing all children.
virtual void reset ()
virtual void apply (osg::Node &node)
virtual void apply (osg::Geode &geode)
void optimize ()

Protected Types

typedef std::set< osg::Object * > ObjectSet
typedef std::map
< osg::StateSet *, ObjectSet
StateSetMap

Protected Member Functions

void addStateSet (osg::StateSet *stateset, osg::Object *obj)

Protected Attributes

StateSetMap _statesets


Detailed Description

Optimize State in the scene graph by removing duplicate state, replacing it with shared instances, both for StateAttributes, and whole StateSets.

Member Typedef Documentation


Constructor & Destructor Documentation

osgUtil::Optimizer::StateVisitor::StateVisitor ( Optimizer optimizer = 0  )  [inline]

default to traversing all children.


Member Function Documentation

virtual void osgUtil::Optimizer::StateVisitor::reset (  )  [virtual]

empty visitor, make it ready for next traversal.

Reimplemented from osg::NodeVisitor.

virtual void osgUtil::Optimizer::StateVisitor::apply ( osg::Node node  )  [virtual]

Reimplemented from osg::NodeVisitor.

virtual void osgUtil::Optimizer::StateVisitor::apply ( osg::Geode geode  )  [virtual]

Reimplemented from osg::NodeVisitor.

void osgUtil::Optimizer::StateVisitor::optimize (  ) 

void osgUtil::Optimizer::StateVisitor::addStateSet ( osg::StateSet stateset,
osg::Object obj 
) [protected]


Member Data Documentation


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

Generated on Wed Nov 17 16:52:53 2010 for openscenegraph by  doxygen 1.5.6