Public Types | Public Member Functions | Protected Attributes

OpenTissue::volume_rendering::SlabbingShader< math_types > Class Template Reference

#include <volume_rendering_slabbing_shader.h>

Inheritance diagram for OpenTissue::volume_rendering::SlabbingShader< math_types >:
OpenTissue::volume_rendering::VolumeShader< SlabbingShader< math_types > >

List of all members.

Public Types

typedef math_types::real_type real_type
typedef math_types::vector3_type vector3_type

Public Member Functions

 SlabbingShader ()
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 ()

Protected Attributes

cg::Program m_vertex_program
cg::Program m_fragment_program
unsigned int m_slice_cnt
 Number of slices per tile.
GLfloat m_eye2model_matrix [16]

Detailed Description

template<typename math_types>
class OpenTissue::volume_rendering::SlabbingShader< math_types >

The View Aligned Slabbing Shader Class.


Member Typedef Documentation


Constructor & Destructor Documentation

template<typename math_types >
OpenTissue::volume_rendering::SlabbingShader< math_types >::SlabbingShader (  )  [inline]

Member Function Documentation

template<typename math_types >
bool OpenTissue::volume_rendering::SlabbingShader< math_types >::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 from OpenTissue::volume_rendering::VolumeShader< SlabbingShader< math_types > >.

template<typename math_types >
void OpenTissue::volume_rendering::SlabbingShader< math_types >::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 from OpenTissue::volume_rendering::VolumeShader< SlabbingShader< math_types > >.

template<typename math_types >
void OpenTissue::volume_rendering::SlabbingShader< math_types >::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 from OpenTissue::volume_rendering::VolumeShader< SlabbingShader< math_types > >.

template<typename math_types >
template<typename texture2d_pointer >
void OpenTissue::volume_rendering::SlabbingShader< math_types >::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 from OpenTissue::volume_rendering::VolumeShader< SlabbingShader< math_types > >.

template<typename math_types >
template<typename tile_type >
void OpenTissue::volume_rendering::SlabbingShader< math_types >::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 from OpenTissue::volume_rendering::VolumeShader< SlabbingShader< math_types > >.


Member Data Documentation

template<typename math_types >
GLfloat OpenTissue::volume_rendering::SlabbingShader< math_types >::m_eye2model_matrix[16] [protected]
template<typename math_types >
unsigned int OpenTissue::volume_rendering::SlabbingShader< math_types >::m_slice_cnt [protected]

Number of slices per tile.


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