- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# osgUtil::Optimizer::StateVisitor Class Reference

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

Inheritance diagram for osgUtil::Optimizer::StateVisitor:

[legend]
List of all members.

## Public Member Functions
| StateVisitor (Optimizer *optimizer=0)
| default to traversing all children.
virtual void | reset ()
| empty visitor, make it ready for next traversal.
virtual void | apply (osg::Node &node)
virtual void | apply (osg::Geode &geode)
void | optimize ()
bool | isOperationPermissibleForObject (const osg::Object *object) const
## 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
Optimizer * | _optimizer
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

typedef std::set<osg::Object*> osgUtil::Optimizer::StateVisitor::ObjectSet`[protected]`

typedef std::map<osg::StateSet*,ObjectSet> osgUtil::Optimizer::StateVisitor::StateSetMap`[protected]`

## Constructor & Destructor Documentation

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

| default to traversing all children.

## Member Function Documentation

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

void Optimizer::StateVisitor::apply | ( | osg::Geode & | geode | ) | `[virtual]`

| Reimplemented from osg::NodeVisitor.

void Optimizer::StateVisitor::apply | ( | osg::Node & | node | ) | `[virtual]`

| Reimplemented from osg::NodeVisitor.

bool osgUtil::Optimizer::StateVisitor::isOperationPermissibleForObject | ( | const osg::Object * | object | ) | const`[inline]`

void Optimizer::StateVisitor::optimize | ( |  | ) |

void Optimizer::StateVisitor::reset | ( |  | ) | `[virtual]`

| empty visitor, make it ready for next traversal. Reimplemented from osg::NodeVisitor.

## Member Data Documentation

Optimizer* osgUtil::Optimizer::StateVisitor::_optimizer`[protected]`

StateSetMap osgUtil::Optimizer::StateVisitor::_statesets`[protected]`

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

- Optimizer
- Optimizer.cpp