version 3.3

VRS::StateSortingOperator Class Reference

Scene graph operator that sorts a scene by render states. More...

#include <vrs/sg/statesortingoperator.h>

Inheritance diagram for VRS::StateSortingOperator:

VRS::SceneGraphOperator VRS::Visitor< T > VRS::Visitor< T > VRS::Visitor< T > VRS::Visitor< T > VRS::VisitorBase VRS::SharedObj VRS::Visitable

List of all members.

Public Types

typedef StateHandler
< ShapeMaterialGL
ShapeMaterialGLHandler
typedef StateHandler< LineStyleLineStyleHandler
typedef StateHandler< Texture2DGLTextureHandler

Public Member Functions

 StateSortingOperator (SO< Array< SO< AbstractStateHandler > > > handlers)
 Constructor taking state handler chain.
virtual void optimizeScene (SO< SceneNode > &scene)
 Optimize the provided scene.
virtual VisitorBase::VisitMode visit (SceneThing *thing, bool push)
virtual VisitorBase::VisitMode visit (Shape *shape, bool push)
virtual VisitorBase::VisitMode visit (RenderObj *obj, bool push)
virtual VisitorBase::VisitMode visit (LODNode *lod, bool push)


Detailed Description

Scene graph operator that sorts a scene by render states.

Author:
Victor Saar The StateSortingOperator is a scene graph operator that sorts a scene by contained render states. Each render state to sort by requires a StateHandler. The operator'sconstructor takes an array of such state handlers. The order of state handlers defines the used sort priority. Each LODNode in the scene is optimized separately, as only a single sub-scene of a LODNode is rendered at a time. For convenience the operator defines typedefs for common state handlers. Importantto note is that the operator does not preserve transformations contained in the scene. Therefore the CollapseTransformsOperator should be applied on scenes with transformations (of course, this only helps with polygon sets).

Member Typedef Documentation


Constructor & Destructor Documentation

VRS::StateSortingOperator::StateSortingOperator ( SO< Array< SO< AbstractStateHandler > > >  handlers  ) 

Constructor taking state handler chain.


Member Function Documentation

virtual void VRS::StateSortingOperator::optimizeScene ( SO< SceneNode > &  scene  )  [virtual]

Optimize the provided scene.

Implements VRS::SceneGraphOperator.

virtual VisitorBase::VisitMode VRS::StateSortingOperator::visit ( SceneThing thing,
bool  push 
) [virtual]

virtual VisitorBase::VisitMode VRS::StateSortingOperator::visit ( Shape shape,
bool  push 
) [virtual]

virtual VisitorBase::VisitMode VRS::StateSortingOperator::visit ( RenderObj obj,
bool  push 
) [virtual]

virtual VisitorBase::VisitMode VRS::StateSortingOperator::visit ( LODNode lod,
bool  push 
) [virtual]


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