Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osgUtil::DisplayListVisitor Class Reference

Visitor for traversing scene graph and setting each osg::Drawable's _useDisplayList flag, with option to immediately compile osg::Drawable OpenGL Display lists and osg::StateAttribute's. More...

Inheritance diagram for osgUtil::DisplayListVisitor:

Inheritance graph
[legend]
List of all members.

Public Types

typedef unsigned int Mode
enum  ModeValues { SWITCH_ON_DISPLAY_LISTS = 0x1, SWITCH_OFF_DISPLAY_LISTS = 0x2, COMPILE_DISPLAY_LISTS = 0x4, COMPILE_STATE_ATTRIBUTES = 0x8 }
 Operation modes of the. More...


Public Methods

 DisplayListVisitor (Mode mode=COMPILE_DISPLAY_LISTS|COMPILE_STATE_ATTRIBUTES)
 Construct a DisplayListVisior to traverse all child, with set specified display list mode.

void setMode (Mode mode)
 Set the operational mode of how the visitor should set up osg::Drawable's.

Mode getMode () const
 Get the operational mode.

void setState (osg::State *state)
 Set the State to use during traversal.

osg::StategetState ()
virtual void apply (osg::Node &node)
 Simply traverse using standard NodeVisitor traverse method.

virtual void apply (osg::Geode &node)
 For each Geode visited set the display list usage according to the _displayListMode.


Protected Attributes

Mode _mode
osg::ref_ptr< osg::State_state

Detailed Description

Visitor for traversing scene graph and setting each osg::Drawable's _useDisplayList flag, with option to immediately compile osg::Drawable OpenGL Display lists and osg::StateAttribute's.


Member Typedef Documentation

typedef unsigned int osgUtil::DisplayListVisitor::Mode
 


Member Enumeration Documentation

enum osgUtil::DisplayListVisitor::ModeValues
 

Operation modes of the.

Enumeration values:
SWITCH_ON_DISPLAY_LISTS 
SWITCH_OFF_DISPLAY_LISTS 
COMPILE_DISPLAY_LISTS 
COMPILE_STATE_ATTRIBUTES 


Constructor & Destructor Documentation

osgUtil::DisplayListVisitor::DisplayListVisitor Mode    mode = COMPILE_DISPLAY_LISTS|COMPILE_STATE_ATTRIBUTES
 

Construct a DisplayListVisior to traverse all child, with set specified display list mode.

Default mode is to gset->setUseDisplayList(true).


Member Function Documentation

virtual void osgUtil::DisplayListVisitor::apply osg::Geode   node [virtual]
 

For each Geode visited set the display list usage according to the _displayListMode.

Reimplemented from osg::NodeVisitor.

virtual void osgUtil::DisplayListVisitor::apply osg::Node   node [virtual]
 

Simply traverse using standard NodeVisitor traverse method.

Reimplemented from osg::NodeVisitor.

Mode osgUtil::DisplayListVisitor::getMode   const [inline]
 

Get the operational mode.

osg::State* osgUtil::DisplayListVisitor::getState   [inline]
 

void osgUtil::DisplayListVisitor::setMode Mode    mode [inline]
 

Set the operational mode of how the visitor should set up osg::Drawable's.

void osgUtil::DisplayListVisitor::setState osg::State   state [inline]
 

Set the State to use during traversal.


Member Data Documentation

Mode osgUtil::DisplayListVisitor::_mode [protected]
 

osg::ref_ptr<osg::State> osgUtil::DisplayListVisitor::_state [protected]
 


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:55:57 2002 for the Open Scene Graph by doxygen 1.2.16.