#include <t4_gpu_scan.h>
Classes | |
struct | event_type |
Public Types | |
typedef real_type_ | real_type |
Public Member Functions | |
template<typename surface_mesh , typename volume_mesh , typename lut_container , typename point_container , typename grid_type > | |
bool | run (surface_mesh &surface, volume_mesh const &shell, lut_container &lut, point_container const &points, real_type const &thickness, grid_type &phi, bool use_unsigned) |
Protected Types | |
typedef std::vector< event_type > | event_container |
typedef event_container::iterator | event_iterator |
Protected Member Functions | |
template<typename grid_type > | |
void | set_gl_state (grid_type const &phi) |
template<typename grid_type > | |
void | init_fbo (grid_type const &phi) |
void | disable_fbo () |
void | store_gl_state () |
void | restore_gl_state () |
template<typename grid_type > | |
bool | init_rendering (grid_type const &phi, bool use_unsigned) |
void | cleanup_rendering () |
template<typename surface_mesh , typename point_container , typename volume_mesh , typename grid_type > | |
void | init (surface_mesh &surface, volume_mesh const &shell, point_container const &points, grid_type const &phi, point_container &edge_normals, bool use_unsigned) |
void | update_status_set (real_type const &z) |
template<typename volume_mesh , typename lut_container , typename point_container > | |
void | draw_slice (volume_mesh const &shell, lut_container &lut, point_container const &points, real_type const &z, point_container &edge_normals) |
template<typename volume_mesh , typename lut_container , typename point_container > | |
void | draw_slice_unsigned (volume_mesh const &shell, lut_container &lut, point_container const &points, real_type const &z) |
Protected Attributes | |
real_type | m_z_value |
The current z-value of the sweep line. | |
real_type | m_delta_z_value |
The increment in z-value when sweep line moves along z-axis. | |
real_type | m_max_z_value |
The maximum z-value. | |
real_type | m_min_z_value |
The minimum z-value. | |
event_container | m_events |
Event points for sweep line (plane) algorithm. | |
event_container | m_status |
The status set, i.e. the event points lying on the sweep line. | |
event_iterator | m_last_event |
Iterator to the last event point lying just before the sweep line. This is the place to start searching for a new status set when sweep line moves. | |
real_type | m_thickness |
Narrowband value used in distance field computation. | |
OpenTissue::texture::texture2D_pointer | m_distance_texture [2] |
The texture used as a data array. | |
gl::FramebufferObject | m_fbo [2] |
The framebuffer object used for rendering to the texture. | |
gl::renderbuffer_pointer | m_rb_depth [2] |
Optional: The renderbuffer object used for depth. | |
cg::Program | m_fragment_program |
the fragment program used | |
GLint | m_state_current_drawbuf |
GLint | m_state_viewport [4] |
Temporary storage for original viewport settings. | |
float | m_state_color_clear_value [4] |
Temporary storage for original clear color. | |
bool | m_state_depth_test |
GLint | m_state_depth_func |
float | m_state_depth_clear_value |
typedef std::vector<event_type> OpenTissue::detail::T4GPUScan< real_type_ >::event_container [protected] |
typedef event_container::iterator OpenTissue::detail::T4GPUScan< real_type_ >::event_iterator [protected] |
typedef real_type_ OpenTissue::detail::T4GPUScan< real_type_ >::real_type |
void OpenTissue::detail::T4GPUScan< real_type_ >::cleanup_rendering | ( | ) | [inline, protected] |
void OpenTissue::detail::T4GPUScan< real_type_ >::disable_fbo | ( | ) | [inline, protected] |
Disable fbo related stuff
void OpenTissue::detail::T4GPUScan< real_type_ >::draw_slice | ( | volume_mesh const & | shell, | |
lut_container & | lut, | |||
point_container const & | points, | |||
real_type const & | z, | |||
point_container & | edge_normals | |||
) | [inline, protected] |
Draw Slice. This method intersects all tetrahedra in the status set with the plane that corresponds to the current position of the sweep-line. The cross sections are then rendered.
shell | A tetrahedron mesh, representing the shell layer that should be scan-converted into a signed distance grid. | |
lut | Lookup Table. This table holds a correspondence map between tetrahedra and the polygonal triangular faces from which they originate. That is one can lookup the triangular face lying closest to all points inside a tetrahedron than to any other triangular faces!!! | |
points | The coordinates of the vertices in the shell mesh. That is the i'th entry holds the coordinate of the i'th vertex. | |
z | The current position of the sweep-line. |
void OpenTissue::detail::T4GPUScan< real_type_ >::draw_slice_unsigned | ( | volume_mesh const & | shell, | |
lut_container & | lut, | |||
point_container const & | points, | |||
real_type const & | z | |||
) | [inline, protected] |
void OpenTissue::detail::T4GPUScan< real_type_ >::init | ( | surface_mesh & | surface, | |
volume_mesh const & | shell, | |||
point_container const & | points, | |||
grid_type const & | phi, | |||
point_container & | edge_normals, | |||
bool | use_unsigned | |||
) | [inline, protected] |
Initialization.
Sets up an event-list for the sweep-line algorithm. Also sets up starting and ending positions along the sweep-line as well as the increment along the sweep-line.
shell | A tetrahedron mesh, representing the shell layer that should be scan-converted into a signed distance grid. | |
points | The coordinates of the vertices in the shell mesh. That is the i'th entry holds the coordinate of the i'th vertex. | |
phi | The grid that is supposed to hold the signed distance grid upon completion of the algorithm. |
void OpenTissue::detail::T4GPUScan< real_type_ >::init_fbo | ( | grid_type const & | phi | ) | [inline, protected] |
Setup the FrameBufferObject stuff.
bool OpenTissue::detail::T4GPUScan< real_type_ >::init_rendering | ( | grid_type const & | phi, | |
bool | use_unsigned | |||
) | [inline, protected] |
void OpenTissue::detail::T4GPUScan< real_type_ >::restore_gl_state | ( | ) | [inline, protected] |
Restores the OpenGl state
bool OpenTissue::detail::T4GPUScan< real_type_ >::run | ( | surface_mesh & | surface, | |
volume_mesh const & | shell, | |||
lut_container & | lut, | |||
point_container const & | points, | |||
real_type const & | thickness, | |||
grid_type & | phi, | |||
bool | use_unsigned | |||
) | [inline] |
Run Tetrahedron Scan Conversion Algorithm.
shell | A tetrahedron mesh, representing the shell layer that should be scan-converted into a signed distance grid. | |
lut | Lookup Table. This table holds a correspondence map between tetrahedra and the polygonal triangular faces from which they originate. That is one can lookup the triangular face lying closest to all points inside a tetrahedron than to any other triangular faces!!! | |
points | The coordinates of the vertices in the shell mesh. That is the i'th entry holds the coordinate of the i'th vertex. | |
phi | The grid that is supposed to hold the signed distance grid upon completion of the algorithm. | |
use_unsigned | If this boolean flag is set to true then the unsigned version of the algorithm is used. |
void OpenTissue::detail::T4GPUScan< real_type_ >::set_gl_state | ( | grid_type const & | phi | ) | [inline, protected] |
void OpenTissue::detail::T4GPUScan< real_type_ >::store_gl_state | ( | ) | [inline, protected] |
Stores the current OpenGl state
void OpenTissue::detail::T4GPUScan< real_type_ >::update_status_set | ( | real_type const & | z | ) | [inline, protected] |
Update Status Set.
That is find the new set of event points corresponding to tetrahedra which overlaps with the sweep-line.
z | The new position of the sweep-line. |
real_type OpenTissue::detail::T4GPUScan< real_type_ >::m_delta_z_value [protected] |
The increment in z-value when sweep line moves along z-axis.
OpenTissue::texture::texture2D_pointer OpenTissue::detail::T4GPUScan< real_type_ >::m_distance_texture[2] [protected] |
The texture used as a data array.
event_container OpenTissue::detail::T4GPUScan< real_type_ >::m_events [protected] |
Event points for sweep line (plane) algorithm.
gl::FramebufferObject OpenTissue::detail::T4GPUScan< real_type_ >::m_fbo[2] [protected] |
The framebuffer object used for rendering to the texture.
cg::Program OpenTissue::detail::T4GPUScan< real_type_ >::m_fragment_program [protected] |
the fragment program used
event_iterator OpenTissue::detail::T4GPUScan< real_type_ >::m_last_event [protected] |
Iterator to the last event point lying just before the sweep line. This is the place to start searching for a new status set when sweep line moves.
real_type OpenTissue::detail::T4GPUScan< real_type_ >::m_max_z_value [protected] |
The maximum z-value.
real_type OpenTissue::detail::T4GPUScan< real_type_ >::m_min_z_value [protected] |
The minimum z-value.
gl::renderbuffer_pointer OpenTissue::detail::T4GPUScan< real_type_ >::m_rb_depth[2] [protected] |
Optional: The renderbuffer object used for depth.
float OpenTissue::detail::T4GPUScan< real_type_ >::m_state_color_clear_value[4] [protected] |
Temporary storage for original clear color.
GLint OpenTissue::detail::T4GPUScan< real_type_ >::m_state_current_drawbuf [protected] |
float OpenTissue::detail::T4GPUScan< real_type_ >::m_state_depth_clear_value [protected] |
GLint OpenTissue::detail::T4GPUScan< real_type_ >::m_state_depth_func [protected] |
bool OpenTissue::detail::T4GPUScan< real_type_ >::m_state_depth_test [protected] |
GLint OpenTissue::detail::T4GPUScan< real_type_ >::m_state_viewport[4] [protected] |
Temporary storage for original viewport settings.
event_container OpenTissue::detail::T4GPUScan< real_type_ >::m_status [protected] |
The status set, i.e. the event points lying on the sweep line.
real_type OpenTissue::detail::T4GPUScan< real_type_ >::m_thickness [protected] |
Narrowband value used in distance field computation.
real_type OpenTissue::detail::T4GPUScan< real_type_ >::m_z_value [protected] |
The current z-value of the sweep line.