version 3.3

VRS::StateHandler< T > Class Template Reference

Class template for state handler. More...

#include <vrs/sg/statehandler.h>

Inheritance diagram for VRS::StateHandler< T >:

VRS::AbstractStateHandler VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 StateHandler (void)
 Constructor.
virtual AbstractStateHandlercreate (void)
 Virtual constructor implementation.
virtual void reset (void)
 Reset implementation.
virtual void setState (RenderObj *state)
 Set the current state.
virtual void pushState (void)
 Push the current state.
virtual void popState (void)
 Pop the current state.
virtual void collectShape (unsigned int index)
 Collect shape for current state.
virtual void createSortedScene (SO< SceneThing > root, SO< Array< unsigned int > > shapeIndices, SO< Array< SO< SharedObj > > > shapes)


Detailed Description

template<class T>
class VRS::StateHandler< T >

Class template for state handler.

Author:
Victor Saar The StateHandler is used to collect state information for the class specified through the template argument. It tracks the active state while traversing the scene graph and collects occurring render states and shapes affected by them.

Constructor & Destructor Documentation

template<class T>
VRS::StateHandler< T >::StateHandler ( void   )  [inline]

Constructor.


Member Function Documentation

template<class T>
virtual AbstractStateHandler* VRS::StateHandler< T >::create ( void   )  [inline, virtual]

Virtual constructor implementation.

Implements VRS::AbstractStateHandler.

template<class T>
virtual void VRS::StateHandler< T >::reset ( void   )  [inline, virtual]

Reset implementation.

Implements VRS::AbstractStateHandler.

template<class T>
virtual void VRS::StateHandler< T >::setState ( RenderObj state  )  [inline, virtual]

Set the current state.

Implements VRS::AbstractStateHandler.

template<class T>
virtual void VRS::StateHandler< T >::pushState ( void   )  [inline, virtual]

Push the current state.

Implements VRS::AbstractStateHandler.

template<class T>
virtual void VRS::StateHandler< T >::popState ( void   )  [inline, virtual]

Pop the current state.

Implements VRS::AbstractStateHandler.

template<class T>
virtual void VRS::StateHandler< T >::collectShape ( unsigned int  index  )  [inline, virtual]

Collect shape for current state.

Implements VRS::AbstractStateHandler.

template<class T>
virtual void VRS::StateHandler< T >::createSortedScene ( SO< SceneThing root,
SO< Array< unsigned int > >  shapeIndices,
SO< Array< SO< SharedObj > > >  shapes 
) [inline, virtual]

Parameters:
root Root node of optimized scene.
shapeIndices Array with indices for relevant shapes.
shapes Array of shapes found in the original scene.
This method is called by the StateSortingOperator on the first state handler in the chain. Each handler takes the given shape indices and computes the relevant indices for each state collected. This is done by creating an intersection between the given array and the indices for the particular render state. If the handler has a successor the intersection array is forwarded to it.

Implements VRS::AbstractStateHandler.


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

Generated on Tue May 22 06:00:30 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact