OpenGL Volumizer 2.7 Reference Pages


NAME
vzRenderAction - Renderer for drawing shape nodes.

HEADER FILE
#include <Volumizer2/RenderAction.h>

PUBLIC METHOD SUMMARY
virtual void manage ( vzShape* shape) = 0;
virtual void unmanage ( vzShape* shape) = 0;
virtual void draw ( vzShape* shape) = 0;
virtual void beginDraw ( unsigned int rendererFlags) = 0;
virtual void endDraw (  ) = 0;

PROTECTED METHOD SUMMARY
vzRenderAction (  );
virtual ~vzRenderAction (  );

CLASS DESCRIPTION
vzRenderAction provides an abstract base class for all render actions that can be applied to one or more vzShape nodes. By overriding the virtual methods in this class, it is possible to derive new render actions to render volumetric shapes. For instance, in order to write a new ray-casting volume renderer, the user can derive from the base class and override the virtual methods.

METHOD DESCRIPTIONS

   vzRenderAction()
vzRenderAction (  );

Constructor for the vzRenderAction class.

   ~vzRenderAction()
virtual ~vzRenderAction (  );

Destructor for vzRenderAction.

   beginDraw()
virtual void beginDraw ( unsigned int rendererFlags) = 0;

This pure virtual method is used to tell the render action that the application is done managing and un-managing all the shapes and is ready to issue draw() commands for the shapes. Following this, all the commands invoked on the render action should be draw() commands until the invocation of the next endDraw(). The rendererFlags can be used to pass renderer specific flags.

   draw()
virtual void draw ( vzShape* shape) = 0;

This pure virtual method provides the interface to render all of the volumetric data for a single shape node. The technique for rendering is determined by the derived class.

   endDraw()
virtual void endDraw (  ) = 0;

This pure virtual method is used to tell the render action that the application is done drawing all the shapes for the current frame. Note that it is illegal to issue manage() and unmanage() commands between a beginDraw()/endDraw() pair.

   manage()
virtual void manage ( vzShape* shape) = 0;

This pure virtual method provides the interface to add the specified shape to a list of "managed" shapes. Managed shapes are shapes that the renderer knows about before the draw() call. A shape must be managed before it is drawn for the first time.

The list of managed shapes is interpreted in a renderer-specific way. For instance, the texture-mapping render action treats the managed shapes as a list of shapes to keep resident in texture memory.

Note that the effect of managing a shape is not necessarily immediate: actions may be queued up until the next call to draw().

   unmanage()
virtual void unmanage ( vzShape* shape) = 0;

This method removes the specified shape from the list of "managed" shapes. The shape specified cannot be drawn until it is once again managed by calling manage().

SEE ALSO
vzRenderAction, vzShape

Back to Index