Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

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

#include <volume_rendering_ray_cast_shader.h>

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

List of all members.

Public Types

typedef math_types::real_type real_type
typedef math_types::vector3_type vector3_type
typedef geometry::AABB
< math_types
aabb_type

Public Member Functions

unsigned int total_iterations ()
unsigned int const & total_iterations () const
unsigned int inner_iterations ()
unsigned int const & inner_iterations () const
 RayCastShader ()
 ~RayCastShader ()
void init ()
bool front2back () const
template<typename texture2d_pointer >
void pre_render (texture2d_pointer color_table_texture)
template<typename tile_type >
void render (tile_type const &tile)
void post_render ()

Protected Member Functions

template<typename tile_type >
void draw_aabb (tile_type const &tile, real_type delta_t, real_type t)

Protected Attributes

OpenTissue::texture::texture3D_pointer m_volume_texture
 Pointer to volume that should be visualized.
OpenTissue::texture::texture2D_pointer m_texture [4]
 The texture used as a data array.
gl::FramebufferObject m_fbo
 The framebuffer object used for rendering to the texture.
cg::Program m_main_pass_program
cg::Program m_ray_direction_program
cg::Program m_pass_through_program
real_type m_delta_t
unsigned int m_iterations
unsigned int m_inner_iterations
unsigned int m_outer_iterations
int m_write
int m_read
int m_ray_map
int m_entry_map

Detailed Description

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

RayCast Volume Render.


Member Typedef Documentation


Constructor & Destructor Documentation

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

Member Function Documentation

template<typename math_types >
template<typename tile_type >
void OpenTissue::volume_rendering::RayCastShader< math_types >::draw_aabb ( tile_type const &  tile,
real_type  delta_t,
real_type  t 
) [inline, protected]
template<typename math_types >
bool OpenTissue::volume_rendering::RayCastShader< 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< RayCastShader< math_types > >.

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

template<typename math_types >
unsigned int OpenTissue::volume_rendering::RayCastShader< math_types >::inner_iterations (  )  [inline]
template<typename math_types >
unsigned int const& OpenTissue::volume_rendering::RayCastShader< math_types >::inner_iterations (  )  const [inline]
template<typename math_types >
void OpenTissue::volume_rendering::RayCastShader< 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< RayCastShader< math_types > >.

template<typename math_types >
template<typename texture2d_pointer >
void OpenTissue::volume_rendering::RayCastShader< math_types >::pre_render ( texture2d_pointer  color_table_texture  )  [inline]
template<typename math_types >
template<typename tile_type >
void OpenTissue::volume_rendering::RayCastShader< 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< RayCastShader< math_types > >.

template<typename math_types >
unsigned int OpenTissue::volume_rendering::RayCastShader< math_types >::total_iterations (  )  [inline]
template<typename math_types >
unsigned int const& OpenTissue::volume_rendering::RayCastShader< math_types >::total_iterations (  )  const [inline]

Member Data Documentation

template<typename math_types >
real_type OpenTissue::volume_rendering::RayCastShader< math_types >::m_delta_t [protected]
template<typename math_types >
int OpenTissue::volume_rendering::RayCastShader< math_types >::m_entry_map [protected]

The framebuffer object used for rendering to the texture.

template<typename math_types >
unsigned int OpenTissue::volume_rendering::RayCastShader< math_types >::m_inner_iterations [protected]
template<typename math_types >
unsigned int OpenTissue::volume_rendering::RayCastShader< math_types >::m_iterations [protected]
template<typename math_types >
unsigned int OpenTissue::volume_rendering::RayCastShader< math_types >::m_outer_iterations [protected]
template<typename math_types >
int OpenTissue::volume_rendering::RayCastShader< math_types >::m_ray_map [protected]
template<typename math_types >
int OpenTissue::volume_rendering::RayCastShader< math_types >::m_read [protected]

The texture used as a data array.

Pointer to volume that should be visualized.

template<typename math_types >
int OpenTissue::volume_rendering::RayCastShader< math_types >::m_write [protected]

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