version 3.3

VRS::AbstractStateHandler Class Reference

Abstract base class for state handlers. More...

#include <vrs/sg/statehandler.h>

Inheritance diagram for VRS::AbstractStateHandler:

VRS::SharedObj VRS::Visitable VRS::StateHandler< T >

List of all members.

Public Member Functions

virtual AbstractStateHandlercreate (void)=0
 Virtual constructor.
virtual void reset (void)=0
 Reset state handler.
virtual void setSuccessor (AbstractStateHandler *successor)
 Set the handler's successor.
virtual void setState (RenderObj *state)=0
virtual void pushState (void)=0
virtual void popState (void)=0
virtual void collectShape (unsigned int index)=0
virtual void createSortedScene (SO< SceneThing > root, SO< Array< unsigned int > > shapeIndices, SO< Array< SO< SharedObj > > > shapes)=0

Protected Attributes

SO< AbstractStateHandlersuccessor_
 State handler's successor in chain.


Detailed Description

Abstract base class for state handlers.

Author:
Victor Saar Concrete state handlers implement this abstract base class used by the StateSortingOperator to collect state information and create a state sorted scene. The actual state handlers form a chain created by the StateSortingOperator.

Member Function Documentation

virtual AbstractStateHandler* VRS::AbstractStateHandler::create ( void   )  [pure virtual]

Virtual constructor.

Implemented in VRS::StateHandler< T >.

virtual void VRS::AbstractStateHandler::reset ( void   )  [pure virtual]

Reset state handler.

Implemented in VRS::StateHandler< T >.

virtual void VRS::AbstractStateHandler::setSuccessor ( AbstractStateHandler successor  )  [inline, virtual]

Set the handler's successor.

virtual void VRS::AbstractStateHandler::setState ( RenderObj state  )  [pure virtual]

Parameters:
state State currently visited.
Called by StateSortingOperator when a render state is visited in the scene graph. The handler can check if the state is relevant and store it.

Implemented in VRS::StateHandler< T >.

virtual void VRS::AbstractStateHandler::pushState ( void   )  [pure virtual]

Called by StateSortingOperator when a SceneThing is entered and thus a new hierarchy level is started.

Implemented in VRS::StateHandler< T >.

virtual void VRS::AbstractStateHandler::popState ( void   )  [pure virtual]

Called by StateSortingOperator when a SceneThing is leaved and thus a hierarchy level ends.

Implemented in VRS::StateHandler< T >.

virtual void VRS::AbstractStateHandler::collectShape ( unsigned int  index  )  [pure virtual]

Parameters:
index Index of the shape in shape array.
State handler should collect the shapes for each render state. This information is used to create the optimized scene. The shape is given as index into an array hold by the StateSortingOperator.

Implemented in VRS::StateHandler< T >.

virtual void VRS::AbstractStateHandler::createSortedScene ( SO< SceneThing root,
SO< Array< unsigned int > >  shapeIndices,
SO< Array< SO< SharedObj > > >  shapes 
) [pure 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.

Implemented in VRS::StateHandler< T >.


Member Data Documentation

State handler's successor in chain.


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

Generated on Fri May 18 06:00:29 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact