Public Member Functions

OpenTissue::volume_rendering::VolumeShader< child_type > Class Template Reference

#include <volume_rendering_volume_shader.h>

List of all members.

Public Member Functions

void init ()
bool front2back () const
template<typename texture2d_pointer >
void pre_render (texture2d_pointer &color_table)
template<typename tile_type >
void render (tile_type const &tile)
void post_render ()

Detailed Description

template<typename child_type>
class OpenTissue::volume_rendering::VolumeShader< child_type >

The Volume Shader Class. This class implements a volume shader concept by using CRTP.

Any volume shader should be inherited from this class. As an example:

template<typename types> class SlabbingShader : public VolumeShader< SlabbingShader<types> >

or

template<typename types> class RayCastShader : public VolumeShader< RayCastShader<types> >

The interface is for instance used in the class TileRender.


Member Function Documentation

template<typename child_type>
bool OpenTissue::volume_rendering::VolumeShader< child_type >::front2back (  )  const [inline]

Front To Back Rendering.

Returns:
If the return value is truen then tiles should be rendered in fron to back order otherwise they should be rendered in back to front order.

Reimplemented in OpenTissue::volume_rendering::RayCastShader< math_types >, and OpenTissue::volume_rendering::SlabbingShader< math_types >.

template<typename child_type>
void OpenTissue::volume_rendering::VolumeShader< child_type >::init (  )  [inline]

Initialization. This method should be used to initialize internal data. For instance setting up textures (for RTT) or frame buffer objects. It could also be used for compiling and loading GPU programs.

The method should be invoked after a render context have created.

Reimplemented in OpenTissue::volume_rendering::RayCastShader< math_types >, and OpenTissue::volume_rendering::SlabbingShader< math_types >.

template<typename child_type>
void OpenTissue::volume_rendering::VolumeShader< child_type >::post_render (  )  [inline]

Post Render. This mehod is invoked after having rendered all tiles. It is usefull for cleaning up GL state or transfering rendering result to frame-buffer (for RTT).

Reimplemented in OpenTissue::volume_rendering::RayCastShader< math_types >, and OpenTissue::volume_rendering::SlabbingShader< math_types >.

template<typename child_type>
template<typename texture2d_pointer >
void OpenTissue::volume_rendering::VolumeShader< child_type >::pre_render ( texture2d_pointer &  color_table  )  [inline]

Pre-Render. This method prepares the rendering. This is a good place to perform common computations that need to be done for all tiles.

For instance retrieving the model-view transformation, clearing textures (for RTT) or setting GL state.

Reimplemented in OpenTissue::volume_rendering::SlabbingShader< math_types >.

template<typename child_type>
template<typename tile_type >
void OpenTissue::volume_rendering::VolumeShader< child_type >::render ( tile_type const &  tile  )  [inline]

Renders a single tile. Note that your shader is responsible for handling any Ping-Pong schemes inbetween tiles!

Reimplemented in OpenTissue::volume_rendering::RayCastShader< math_types >, and OpenTissue::volume_rendering::SlabbingShader< math_types >.


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