Go to the documentation of this file.00001 #ifndef OPENTISSUE_UTILITY_VOLUME_RENDERING_VOLUME_RENDERING_VOLUME_SHADER_H
00002 #define OPENTISSUE_UTILITY_VOLUME_RENDERING_VOLUME_RENDERING_VOLUME_SHADER_H
00003
00004
00005
00006
00007
00008
00009
00010 #include <OpenTissue/configuration.h>
00011
00012 namespace OpenTissue
00013 {
00014 namespace volume_rendering
00015 {
00016
00033 template<typename child_type >
00034 class VolumeShader
00035 {
00036 public:
00037
00046 void init()
00047 {
00048 child_type & self = static_cast<child_type>(*this);
00049 self.init();
00050 }
00051
00059 bool front2back() const
00060 {
00061 child_type const & self = static_cast<child_type>(*this);
00062 return self.front2back();
00063 }
00064
00073 template<typename texture2d_pointer>
00074 void pre_render ( texture2d_pointer & color_table )
00075 {
00076 child_type & self = static_cast<child_type>(*this);
00077 self.pre_render(color_table);
00078 }
00079
00084 template<typename tile_type>
00085 void render(tile_type const & tile)
00086 {
00087 child_type & self = static_cast<child_type>(*this);
00088 self.render(tile);
00089 }
00090
00096 void post_render()
00097 {
00098 child_type & self = static_cast<child_type>(*this);
00099 self.post_render();
00100 }
00101
00102 };
00103
00104 }
00105
00106 }
00107
00108
00109 #endif
00110