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

OpenTissue::detail::T4GPUScan< real_type_ > Class Template Reference

#include <t4_gpu_scan.h>

List of all members.

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_typeevent_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

template<typename real_type_>
class OpenTissue::detail::T4GPUScan< real_type_ >


Member Typedef Documentation

template<typename real_type_>
typedef std::vector<event_type> OpenTissue::detail::T4GPUScan< real_type_ >::event_container [protected]
template<typename real_type_>
typedef event_container::iterator OpenTissue::detail::T4GPUScan< real_type_ >::event_iterator [protected]
template<typename real_type_>
typedef real_type_ OpenTissue::detail::T4GPUScan< real_type_ >::real_type

Member Function Documentation

template<typename real_type_>
void OpenTissue::detail::T4GPUScan< real_type_ >::cleanup_rendering (  )  [inline, protected]
template<typename real_type_>
void OpenTissue::detail::T4GPUScan< real_type_ >::disable_fbo (  )  [inline, protected]

Disable fbo related stuff

template<typename real_type_>
template<typename volume_mesh , typename lut_container , typename point_container >
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.

Parameters:
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.
template<typename real_type_>
template<typename volume_mesh , typename lut_container , typename point_container >
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]
template<typename real_type_>
template<typename surface_mesh , typename point_container , typename volume_mesh , typename grid_type >
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.

Parameters:
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.
template<typename real_type_>
template<typename grid_type >
void OpenTissue::detail::T4GPUScan< real_type_ >::init_fbo ( grid_type const &  phi  )  [inline, protected]

Setup the FrameBufferObject stuff.

template<typename real_type_>
template<typename grid_type >
bool OpenTissue::detail::T4GPUScan< real_type_ >::init_rendering ( grid_type const &  phi,
bool  use_unsigned 
) [inline, protected]
template<typename real_type_>
void OpenTissue::detail::T4GPUScan< real_type_ >::restore_gl_state (  )  [inline, protected]

Restores the OpenGl state

template<typename real_type_>
template<typename surface_mesh , typename volume_mesh , typename lut_container , typename point_container , typename grid_type >
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.

Parameters:
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.
Returns:
If computation succeded then the return value is true otherwise it is false.
template<typename real_type_>
template<typename grid_type >
void OpenTissue::detail::T4GPUScan< real_type_ >::set_gl_state ( grid_type const &  phi  )  [inline, protected]
template<typename real_type_>
void OpenTissue::detail::T4GPUScan< real_type_ >::store_gl_state (  )  [inline, protected]

Stores the current OpenGl state

template<typename real_type_>
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.

Parameters:
z The new position of the sweep-line.

Member Data Documentation

template<typename real_type_>
real_type OpenTissue::detail::T4GPUScan< real_type_ >::m_delta_z_value [protected]

The increment in z-value when sweep line moves along z-axis.

template<typename real_type_>
OpenTissue::texture::texture2D_pointer OpenTissue::detail::T4GPUScan< real_type_ >::m_distance_texture[2] [protected]

The texture used as a data array.

template<typename real_type_>
event_container OpenTissue::detail::T4GPUScan< real_type_ >::m_events [protected]

Event points for sweep line (plane) algorithm.

template<typename real_type_>
gl::FramebufferObject OpenTissue::detail::T4GPUScan< real_type_ >::m_fbo[2] [protected]

The framebuffer object used for rendering to the texture.

template<typename real_type_>
cg::Program OpenTissue::detail::T4GPUScan< real_type_ >::m_fragment_program [protected]

the fragment program used

template<typename real_type_>
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.

template<typename real_type_>
real_type OpenTissue::detail::T4GPUScan< real_type_ >::m_max_z_value [protected]

The maximum z-value.

template<typename real_type_>
real_type OpenTissue::detail::T4GPUScan< real_type_ >::m_min_z_value [protected]

The minimum z-value.

template<typename real_type_>
gl::renderbuffer_pointer OpenTissue::detail::T4GPUScan< real_type_ >::m_rb_depth[2] [protected]

Optional: The renderbuffer object used for depth.

template<typename real_type_>
float OpenTissue::detail::T4GPUScan< real_type_ >::m_state_color_clear_value[4] [protected]

Temporary storage for original clear color.

template<typename real_type_>
GLint OpenTissue::detail::T4GPUScan< real_type_ >::m_state_current_drawbuf [protected]
template<typename real_type_>
float OpenTissue::detail::T4GPUScan< real_type_ >::m_state_depth_clear_value [protected]
template<typename real_type_>
GLint OpenTissue::detail::T4GPUScan< real_type_ >::m_state_depth_func [protected]
template<typename real_type_>
bool OpenTissue::detail::T4GPUScan< real_type_ >::m_state_depth_test [protected]
template<typename real_type_>
GLint OpenTissue::detail::T4GPUScan< real_type_ >::m_state_viewport[4] [protected]

Temporary storage for original viewport settings.

template<typename real_type_>
event_container OpenTissue::detail::T4GPUScan< real_type_ >::m_status [protected]

The status set, i.e. the event points lying on the sweep line.

template<typename real_type_>
real_type OpenTissue::detail::T4GPUScan< real_type_ >::m_thickness [protected]

Narrowband value used in distance field computation.

template<typename real_type_>
real_type OpenTissue::detail::T4GPUScan< real_type_ >::m_z_value [protected]

The current z-value of the sweep line.


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