| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/techniqueprocessor.h>

Public Member Functions | |
| TechniqueProcessor () | |
| virtual void | start (Engine *) |
| Invokes the pretraversal. | |
| virtual void | stop (Engine *) |
| Stops all techniques and cleans up. | |
| virtual bool | preparePass (Engine *) |
| virtual void | finishPass (Engine *) |
| virtual void | nextPass (Engine *) |
| virtual bool | needsPass (Engine *) const |
| Returns true only if the list of remaining passes is not empty. | |
| virtual int | currentPass () const |
| Returns the active pass. | |
| virtual void | eval (Engine *, const Shape *) |
| virtual const Handler * | getNativeHandler (Engine *, const ID &) const =0 |
| virtual bool | handleNatively (Engine *, const Shape *, const Handler *)=0 |
| virtual bool | pretraversal (Engine *) const |
| Return true only if in pretraversal. | |
| virtual bool | maintraversal (Engine *) const |
| Return true only if in maintraversal. | |
| virtual bool | posttraversal (Engine *) const |
| Return true only if in posttraversal. | |
| virtual bool | canBeUsed (Engine *engine) const |
| virtual ID | category () const |
| void | setShapeFilter (SO< Filter > filter) |
| Sets the filter that should be used during the evaluation process. | |
| SO< Filter > | getShapeFilter () const |
| Retuns the filter that should be used during the evaluation process. | |
| VRS_TYPEINFO (TechniqueProcessor, SharedObj) | |
Protected Member Functions | |
| virtual SO< Filter > | getTechniqueFilter () const |
| bool | shapeFilterOK (Engine *E) |
| void | evalWithTechniquesAndShader (Engine *, const Shape *) |
| void | registerTechnique (Technique *) |
| appends technique to list of techniques | |
| void | unregisterTechnique (Technique *) |
| removes technique from list of techniques | |
| virtual void | pushStandardTechniques (Engine *) |
| virtual void | popStandardTechniques (Engine *) |
| void | addPass (int pass) |
| Adds a pass to the list of remaining passes. Used by techniques. | |
| Iterator< SO< Technique > > * | activeTechniques () const |
Protected Attributes | |
| SO< Technique > | preTechnique_ |
| SO< Technique > | mainTechnique_ |
| SO< Technique > | postTechnique_ |
Friends | |
| class | Technique |
| VRS::TechniqueProcessor::TechniqueProcessor | ( | ) |
A TechniqueProcessor uses techniques in the scene graph to create a global pass order in which then the scene graph is repeatedly traversed. In order to do so, after the pretraversal, the TechniqueProcessor collects the techniques found in the scene graph and stores the identifiers of their rendering passes in a list of all remaining passes. These passes are executed in order. Besides the PretraversalTechnique which is used for the pretraversal, a TechniqueProcessor also automatically contains a MainTechnique and a PosttraversalTechnique.
| virtual void VRS::TechniqueProcessor::start | ( | Engine * | ) | [virtual] |
Invokes the pretraversal.
| virtual void VRS::TechniqueProcessor::stop | ( | Engine * | ) | [virtual] |
Stops all techniques and cleans up.
| virtual bool VRS::TechniqueProcessor::preparePass | ( | Engine * | ) | [virtual] |
Starts the rendering pass denoted by the smallest pass identifier in the list of remaining passes. The active techniques are determined, then they are activated and their "preparePass()" method is invoked. If at least one result of these calls is true, the return value here is also true, i.e., the scene graph is evaluated for this rendering pass.
| virtual void VRS::TechniqueProcessor::finishPass | ( | Engine * | ) | [virtual] |
The active rendering pass identifier is removed from the list of the remaining passes. finishPass() of all active techniques is invoked.
| virtual void VRS::TechniqueProcessor::nextPass | ( | Engine * | ) | [virtual] |
nextPass() of all active techniques is invoked. Additionally, when in pretraversal, the techniques found in the scene graph are collected and started.
| virtual bool VRS::TechniqueProcessor::needsPass | ( | Engine * | ) | const [virtual] |
Returns true only if the list of remaining passes is not empty.
| virtual int VRS::TechniqueProcessor::currentPass | ( | ) | const [virtual] |
Returns the active pass.
prepareEval() of all active techniques is invoked. Only if all results are true, the shape is evaluated using the Shader that is currently active. In any case, after that, finishEval() is invoked for all active techniques.
Reimplemented in VRS::RenderingProcessorGL.
| virtual const Handler* VRS::TechniqueProcessor::getNativeHandler | ( | Engine * | , | |
| const ID & | ||||
| ) | const [pure virtual] |
determines whether there is a way to evaluate a shape if type ID without a scene graph builder or simplifier. In case, it returns the handler, else 0.
Implemented in VRS::RayRequest, and VRS::RenderingProcessor.
| virtual bool VRS::TechniqueProcessor::handleNatively | ( | Engine * | , | |
| const Shape * | , | |||
| const Handler * | ||||
| ) | [pure virtual] |
evaluate the shape with the native handler returned by haveNativeHandler.
Implemented in VRS::RayRequest, and VRS::RenderingProcessor.
| virtual bool VRS::TechniqueProcessor::pretraversal | ( | Engine * | ) | const [virtual] |
Return true only if in pretraversal.
| virtual bool VRS::TechniqueProcessor::maintraversal | ( | Engine * | ) | const [virtual] |
Return true only if in maintraversal.
| virtual bool VRS::TechniqueProcessor::posttraversal | ( | Engine * | ) | const [virtual] |
Return true only if in posttraversal.
| virtual bool VRS::TechniqueProcessor::canBeUsed | ( | Engine * | engine | ) | const [virtual] |
The technique processor can be used with any engine, it is generic.
| virtual ID VRS::TechniqueProcessor::category | ( | ) | const [virtual] |
The category of all types of processors is TechniqueProcessor. They are all stored on one stack.
Sets the filter that should be used during the evaluation process.
Retuns the filter that should be used during the evaluation process.
| VRS::TechniqueProcessor::VRS_TYPEINFO | ( | TechniqueProcessor | , | |
| SharedObj | ||||
| ) |
| virtual SO<Filter> VRS::TechniqueProcessor::getTechniqueFilter | ( | ) | const [inline, protected, virtual] |
Reimplemented in VRS::RayRequest, and VRS::RenderingProcessor.
| bool VRS::TechniqueProcessor::shapeFilterOK | ( | Engine * | E | ) | [protected] |
Checks whether shape is filtered by the shapeFilter_
Searches for techniques and calls the appropriate shaders. Internally used by TechniqueProcessor::eval() and TechniqueProcessorGL::eval()
| void VRS::TechniqueProcessor::registerTechnique | ( | Technique * | ) | [protected] |
appends technique to list of techniques
| void VRS::TechniqueProcessor::unregisterTechnique | ( | Technique * | ) | [protected] |
removes technique from list of techniques
| virtual void VRS::TechniqueProcessor::pushStandardTechniques | ( | Engine * | ) | [protected, virtual] |
Meant to be overwriten by subclasses. The TechniqueProcessor itself pushes a MainTechnique and a PosttraversalTechnique.
Reimplemented in VRS::RenderingProcessorGL, and VRS::RayRequest.
| virtual void VRS::TechniqueProcessor::popStandardTechniques | ( | Engine * | ) | [protected, virtual] |
Meant to be overwriten by subclasses. Techniques pushed in "pushStandardTechniques" should be popped here.
Reimplemented in VRS::RenderingProcessorGL, and VRS::RayRequest.
| void VRS::TechniqueProcessor::addPass | ( | int | pass | ) | [protected] |
Adds a pass to the list of remaining passes. Used by techniques.
friend class Technique [friend] |
SO<Technique> VRS::TechniqueProcessor::preTechnique_ [protected] |
SO<Technique> VRS::TechniqueProcessor::mainTechnique_ [protected] |
SO<Technique> VRS::TechniqueProcessor::postTechnique_ [protected] |