version 3.3

VRS::TextureMirrorTechniqueGL Class Reference

#include <vrs/opengl/texturemirrortechniquegl.h>

Inheritance diagram for VRS::TextureMirrorTechniqueGL:

VRS::TechniqueGL VRS::Technique VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 TextureMirrorTechniqueGL (int textureResolution=256, TextureGL::FilterMode filter=TextureGL::LINEAR)
void setTextureResolution (int)
int getTextureResolution () const
 Gets the resolution of the texture map.
virtual void start (Engine *)
virtual void stop (Engine *)
virtual bool preparePass (Engine *)
virtual void finishPass (Engine *)
virtual void nextPass (Engine *)
virtual bool prepareEval (Engine *engine, const Shape *shape)
virtual void finishEval (Engine *engine, const Shape *shape)
virtual bool canBeUsed (Engine *engine) const
 VRS_TYPEINFO (TextureMirrorTechniqueGL, TechniqueGL)
 VRS_SERIALIZABLE (TextureMirrorTechniqueGL)


Constructor & Destructor Documentation

VRS::TextureMirrorTechniqueGL::TextureMirrorTechniqueGL ( int  textureResolution = 256,
TextureGL::FilterMode  filter = TextureGL::LINEAR 
)

Technique which is responsable for rendering planar reflectors. For rendering such a reflector, you need a PlanarMirror attribute and a suitable Mirrored attribute.

This technique requires a p-buffer which is created with a resolution of textureResolution and the given filter mode. Linear filtering gives a more ray-trace like view, Mipmap blures the texture somewhat, which may or may not look better. Mipmap will be a bit slower, though (5%).


Member Function Documentation

void VRS::TextureMirrorTechniqueGL::setTextureResolution ( int   ) 

Sets the resolution of the p-buffer resp. the texture map, which is the base of the cube environment map.

int VRS::TextureMirrorTechniqueGL::getTextureResolution (  )  const

Gets the resolution of the texture map.

virtual void VRS::TextureMirrorTechniqueGL::start ( Engine  )  [virtual]

Starts a technique. For all techniques in the scene graph, this method is called at the end of the pretraversal. The default behaviour is to add all passes in the pass array to the current TechniqueProcessor. If this is expected, subclasses should call "Technique::class()".

Reimplemented from VRS::Technique.

virtual void VRS::TextureMirrorTechniqueGL::stop ( Engine  )  [virtual]

Stops a technique. For all techniques in the scene graph, this method is called in the method "stop()" of the TechniqueProcessor.

Reimplemented from VRS::Technique.

virtual bool VRS::TextureMirrorTechniqueGL::preparePass ( Engine  )  [virtual]

For an active technique, this method is invoked before the traversal of the scene graph in a rendering pass. Settings of the low-level rendering system valid for the whole rendering pass should be made here. "preparePass()" can return false, which indicates that the technique does not need to evaluate the scene graph. However, if at least one of the active techniques returns true, the scene graph is evaluated.

Implements VRS::Technique.

virtual void VRS::TextureMirrorTechniqueGL::finishPass ( Engine  )  [virtual]

For an active technique, this method is invoked after the traversal of the scene graph. The changes made in "preparePass()" should be undone here

Implements VRS::Technique.

virtual void VRS::TextureMirrorTechniqueGL::nextPass ( Engine  )  [virtual]

For an active technique, this method is also invoked after the traversal of the scene graph. If a technique decides that it needs to redo a rendering pass, it can tell the TechniqueProcessor here, using "addPass()"

Reimplemented from VRS::Technique.

virtual bool VRS::TextureMirrorTechniqueGL::prepareEval ( Engine engine,
const Shape shape 
) [virtual]

For an active Technique, this method is invoked before the evaluation of a shape. Settings of the low-level rendering system only needed for certain shapes (usually indicated by special attributes) should be applied here. "prepareEval()" can forbid the evaluation of a shape by returning false. In this case, even when all other active techniques return true, the shape is not evaluated.

Implements VRS::Technique.

virtual void VRS::TextureMirrorTechniqueGL::finishEval ( Engine engine,
const Shape shape 
) [virtual]

For an active Technique, this method is invoked after the evaluation of a shape (also when shape evaluation was forbidden in "prepareEval()"). Changes made in "prepareEval()" should be undone here.

Implements VRS::Technique.

virtual bool VRS::TextureMirrorTechniqueGL::canBeUsed ( Engine  )  const [virtual]

May check for extensions of the low rendering system which would be necessary for the technique to run.

Reimplemented from VRS::Technique.

VRS::TextureMirrorTechniqueGL::VRS_TYPEINFO ( TextureMirrorTechniqueGL  ,
TechniqueGL   
)

VRS::TextureMirrorTechniqueGL::VRS_SERIALIZABLE ( TextureMirrorTechniqueGL   ) 


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

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