Public Types | Public Member Functions | Protected Attributes

OpenTissue::glut::BasePerspectiveViewApplication< math_types_ > Class Template Reference

#include <glut_perspective_view_application.h>

Inheritance diagram for OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >:
OpenTissue::glut::Application Application< observation_type > Application< observation_type > Application< observation_type > Application< observation_type > TrackerGUI< tracker_type >

List of all members.

Public Types

typedef math_types_ math_types

Public Member Functions

OpenTissue::gl::Camera
< math_types > const & 
camera () const
OpenTissue::gl::Camera
< math_types > & 
camera ()
OpenTissue::gl::Frustum
< math_types > const & 
frustum () const
OpenTissue::gl::Frustum
< math_types > & 
frustum ()
double const & zoom_sensitivity () const
double & zoom_sensitivity ()
double const & pan_sensitivity () const
double & pan_sensitivity ()
 BasePerspectiveViewApplication ()
virtual ~BasePerspectiveViewApplication ()
virtual void do_display ()=0
virtual void do_action (unsigned char choice)=0
virtual void do_special_action (int choice)
virtual void do_init_right_click_menu (int main_menu, void menu(int entry))=0
virtual void do_init ()=0
virtual void do_run ()=0
virtual void do_shutdown ()=0
virtual char const * do_get_title () const =0
char const * get_title () const
void run ()
void shutdown ()
void special_action (int choice)
void action (unsigned char choice)
void init_right_click_menu (int main_menu, void menu(int entry))
void init ()
virtual void mouse_down (double cur_x, double cur_y, bool shift, bool ctrl, bool alt, bool left, bool middle, bool right)
virtual void mouse_up (double cur_x, double cur_y, bool, bool, bool, bool, bool, bool)
virtual void mouse_move (double cur_x, double cur_y)
void display ()
void init_gl_state ()
void setup_lights ()
void setup_model_view_projection ()

Protected Attributes

OpenTissue::gl::Camera
< math_types
m_camera
 Camera class taking care of the model-view projection transformation.
OpenTissue::gl::Frustum
< math_types
m_frustum
 Frustum class, can be used for optimizing the rendering process by offering simple frustum culling.
bool m_screen_capture
 Boolean flag indicating whether a screen capture should be performing on the next display event.
bool m_zoom_mode
 Boolean flag indicating whether the application is currently doing a zoom operation.
bool m_pan_mode
 Boolean flag indicating whether the application is currently doing a pan operation.
bool m_trackball_mode
 Boolean flag indicating whether the application is currently doing a trackball operation.
double m_begin_x
 The starting x-pixel coordinate when doing a mouse operation.
double m_begin_y
 The starting y-pixel coordinate when doing a mouse operation.
double m_zoom_sensitivity
 The zooming mouse sensitivity.
double m_pan_sensitivity
 The panning mouse sensitivity.

Detailed Description

template<typename math_types_>
class OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >

This GLUT application class have been specialized to set up a perspective view mapping. The class also supports basic trackball functionality together with zooming and paning.

There is also support for screen captures and movie making.

To use this class one simply just create a derived class implementing the pure abstract methods.


Member Typedef Documentation

template<typename math_types_ >
typedef math_types_ OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::math_types

Constructor & Destructor Documentation

template<typename math_types_ >
OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::BasePerspectiveViewApplication (  )  [inline]
template<typename math_types_ >
virtual OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::~BasePerspectiveViewApplication (  )  [inline, virtual]

Member Function Documentation

template<typename math_types_ >
void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::action ( unsigned char  choice  )  [inline, virtual]
template<typename math_types_ >
OpenTissue::gl::Camera<math_types> const& OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::camera (  )  const [inline]
template<typename math_types_ >
OpenTissue::gl::Camera<math_types>& OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::camera (  )  [inline]
template<typename math_types_ >
void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::display (  )  [inline, virtual]

Sets up the modelview transformation prior to invoking the render-method where the actual rendering is supposed to be done.

This display handler also contains basic logic for supporting screen capturing and movie making.

Implements OpenTissue::glut::Application.

template<typename math_types_ >
virtual void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::do_action ( unsigned char  choice  )  [pure virtual]
template<typename math_types_ >
virtual char const* OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::do_get_title (  )  const [pure virtual]
template<typename math_types_ >
virtual void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::do_init_right_click_menu ( int  main_menu,
void   menuint entry 
) [pure virtual]
template<typename math_types_ >
virtual void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::do_special_action ( int  choice  )  [inline, virtual]

EMPTY!

template<typename math_types_ >
OpenTissue::gl::Frustum<math_types>& OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::frustum (  )  [inline]
template<typename math_types_ >
OpenTissue::gl::Frustum<math_types> const& OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::frustum (  )  const [inline]
template<typename math_types_ >
char const* OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::get_title (  )  const [inline, virtual]
template<typename math_types_ >
void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::init (  )  [inline, virtual]
template<typename math_types_ >
void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::init_gl_state (  )  [inline, virtual]

Initializes the openGL state. This includes initialization of glew (handles all the extentions)

Implements OpenTissue::glut::Application.

template<typename math_types_ >
void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::init_right_click_menu ( int  main_menu,
void   menuint entry 
) [inline, virtual]
template<typename math_types_ >
virtual void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::mouse_down ( double  cur_x,
double  cur_y,
bool  shift,
bool  ctrl,
bool  alt,
bool  left,
bool  middle,
bool  right 
) [inline, virtual]
template<typename math_types_ >
virtual void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::mouse_move ( double  cur_x,
double  cur_y 
) [inline, virtual]
template<typename math_types_ >
virtual void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::mouse_up ( double  cur_x,
double  cur_y,
bool  ,
bool  ,
bool  ,
bool  ,
bool  ,
bool   
) [inline, virtual]
template<typename math_types_ >
double& OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::pan_sensitivity (  )  [inline]
template<typename math_types_ >
double const& OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::pan_sensitivity (  )  const [inline]
template<typename math_types_ >
void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::run (  )  [inline, virtual]
template<typename math_types_ >
void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::setup_lights (  )  [inline, virtual]

Sets up default lighting. It is assumed that the lighting is set up the modelview space (ie. fixed in world).

Implements OpenTissue::glut::Application.

template<typename math_types_ >
void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::setup_model_view_projection (  )  [inline, virtual]

Sets up a default perspective projection and initializes the modelview transformation to the identity transformation. Upon return the modelview matrix stack is left as the current openGL matrix stack.

Implements OpenTissue::glut::Application.

template<typename math_types_ >
void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::shutdown (  )  [inline, virtual]
template<typename math_types_ >
void OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::special_action ( int  choice  )  [inline, virtual]
template<typename math_types_ >
double& OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::zoom_sensitivity (  )  [inline]
template<typename math_types_ >
double const& OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::zoom_sensitivity (  )  const [inline]

Member Data Documentation

template<typename math_types_ >
double OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::m_begin_x [protected]

The starting x-pixel coordinate when doing a mouse operation.

template<typename math_types_ >
double OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::m_begin_y [protected]

The starting y-pixel coordinate when doing a mouse operation.

template<typename math_types_ >
OpenTissue::gl::Camera<math_types> OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::m_camera [protected]

Camera class taking care of the model-view projection transformation.

template<typename math_types_ >
OpenTissue::gl::Frustum<math_types> OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::m_frustum [protected]

Frustum class, can be used for optimizing the rendering process by offering simple frustum culling.

template<typename math_types_ >
bool OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::m_pan_mode [protected]

Boolean flag indicating whether the application is currently doing a pan operation.

template<typename math_types_ >
double OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::m_pan_sensitivity [protected]

The panning mouse sensitivity.

template<typename math_types_ >
bool OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::m_screen_capture [protected]

Boolean flag indicating whether a screen capture should be performing on the next display event.

template<typename math_types_ >
bool OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::m_trackball_mode [protected]

Boolean flag indicating whether the application is currently doing a trackball operation.

template<typename math_types_ >
bool OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::m_zoom_mode [protected]

Boolean flag indicating whether the application is currently doing a zoom operation.

template<typename math_types_ >
double OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >::m_zoom_sensitivity [protected]

The zooming mouse sensitivity.


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