version 3.3

VRS::SceneGraphBuilder Class Reference

#include <vrs/scenegraphbuilder.h>

Inheritance diagram for VRS::SceneGraphBuilder:

VRS::Handler VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

virtual ID service () const
 The service name of this handler is SceneGraphBuilder.
virtual ID target () const =0
virtual SO< SceneNodebuildSceneGraph (Engine *engine, Shape *shape)=0
virtual bool handle (Engine *engine, const Shape *shape)
virtual bool isCachable () const
 VRS_TYPEINFO (SceneGraphBuilder, Handler)


Detailed Description

Abstract Base Class for substituting shapes by scene graphs. NOTE: If a shape object is referenced multiple times by a scene graph, the shape will always be substituted by the same scene graph constructed for the first occurence of the shape during scene graph traversal!

Member Function Documentation

virtual ID VRS::SceneGraphBuilder::service (  )  const [virtual]

The service name of this handler is SceneGraphBuilder.

Reimplemented from VRS::Handler.

virtual ID VRS::SceneGraphBuilder::target (  )  const [pure virtual]

The stack class is the name of the shape class for which the handler provides the build service.

Implements VRS::Handler.

virtual SO<SceneNode> VRS::SceneGraphBuilder::buildSceneGraph ( Engine engine,
Shape shape 
) [pure virtual]

Creates a scene graph representation for the given shape. This method must be implemented by the sub classes. NOTE: A SceneGraphBuilder must not produce global PolyAttributes.

virtual bool VRS::SceneGraphBuilder::handle ( Engine engine,
const Shape shape 
) [virtual]

Will be called from the processor in order to try to build the scene graph for the given shape. Returns true if a scene graph has been created, otherwise false.

virtual bool VRS::SceneGraphBuilder::isCachable (  )  const [virtual]

Normally, SceneGraphBuilder derivations produces scenegraphs only once per frame, i.e. in the first call of buildSceneGraph(). In subsequent calls (e.g. for multi-pass rendering) the SceneGraphBuilder uses the same SceneThing that have been produced in the first call in a frame. If a SceneGraphBuilder derivation needs to provide different SceneGraphs during one frame, it must overlad isCachable() and return false.

VRS::SceneGraphBuilder::VRS_TYPEINFO ( SceneGraphBuilder  ,
Handler   
)


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

Generated on Thu May 23 06:00:31 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact