osgUtil::Optimizer::TextureAtlasVisitor Class Reference

Inheritance diagram for osgUtil::Optimizer::TextureAtlasVisitor:

osgUtil::BaseOptimizerVisitor osg::NodeVisitor osg::Referenced List of all members.

Public Member Functions

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

Protected Types

typedef std::set< osg::Drawable * > Drawables
typedef std::map< osg::StateSet *,
Drawables
StateSetMap
typedef std::set< osg::Texture2D * > Textures
typedef std::vector< osg::StateSet * > StateSetStack

Protected Member Functions

bool pushStateSet (osg::StateSet *stateset)
void popStateSet ()

Protected Attributes

TextureAtlasBuilder _builder
StateSetMap _statesetMap
StateSetStack _statesetStack
Textures _textures

Detailed Description

Optimize texture usage in the scene graph by combining textures into texture atlas Use of texture atlas cuts down on the number of seperate states in the scene, reducing state changes and improving the chances of use larger batches of geomertry.


Member Typedef Documentation

typedef std::set<osg::Drawable*> osgUtil::Optimizer::TextureAtlasVisitor::Drawables [protected]

typedef std::map<osg::StateSet*, Drawables> osgUtil::Optimizer::TextureAtlasVisitor::StateSetMap [protected]

typedef std::vector<osg::StateSet*> osgUtil::Optimizer::TextureAtlasVisitor::StateSetStack [protected]

typedef std::set<osg::Texture2D*> osgUtil::Optimizer::TextureAtlasVisitor::Textures [protected]


Constructor & Destructor Documentation

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

default to traversing all children.


Member Function Documentation

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

Reimplemented from osg::NodeVisitor.

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

Reimplemented from osg::NodeVisitor.

TextureAtlasBuilder& osgUtil::Optimizer::TextureAtlasVisitor::getTextureAtlasBuilder (  )  [inline]

void osgUtil::Optimizer::TextureAtlasVisitor::optimize (  ) 

void osgUtil::Optimizer::TextureAtlasVisitor::popStateSet (  )  [protected]

bool osgUtil::Optimizer::TextureAtlasVisitor::pushStateSet ( osg::StateSet stateset  )  [protected]

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

empty visitor, make it ready for next traversal.

Reimplemented from osg::NodeVisitor.


Member Data Documentation

TextureAtlasBuilder osgUtil::Optimizer::TextureAtlasVisitor::_builder [protected]

StateSetMap osgUtil::Optimizer::TextureAtlasVisitor::_statesetMap [protected]

StateSetStack osgUtil::Optimizer::TextureAtlasVisitor::_statesetStack [protected]

Textures osgUtil::Optimizer::TextureAtlasVisitor::_textures [protected]


The documentation for this class was generated from the following file:
Generated on Sun Oct 1 13:17:14 2006 for openscenegraph by  doxygen 1.4.7