Public Member Functions | Protected Attributes

OpenTissue::glut::Application Class Reference

#include <glut_application.h>

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

List of all members.

Public Member Functions

int const & main_window () const
int & main_window ()
int const & width () const
int & width ()
int const & height () const
int & height ()
double const & aspect () const
double & aspect ()
double const & fovy () const
double & fovy ()
double const & z_near () const
double & z_near ()
double const & z_far () const
double & z_far ()
bool const & idle () const
bool & idle ()
 Application ()
virtual ~Application ()
virtual char const * get_title () const =0
virtual void action (unsigned char choice)=0
virtual void special_action (int choice)=0
virtual void reshape ()
virtual void init_right_click_menu (int main_menu, void menu(int entry))=0
virtual void init ()=0
virtual void run ()=0
virtual void shutdown ()=0
virtual void mouse_down (double cur_x, double cur_y, bool shift, bool ctrl, bool alt, bool left, bool middle, bool right)=0
virtual void mouse_up (double cur_x, double cur_y, bool shift, bool ctrl, bool alt, bool left, bool middle, bool right)=0
virtual void mouse_move (double cur_x, double cur_y)=0
virtual void display ()=0
virtual void init_gl_state ()=0
virtual void setup_lights ()=0
virtual void setup_model_view_projection ()=0

Protected Attributes

double m_fovy
 Field of view in the y-direction.
double m_aspect
 Aspect ratio.
double m_z_near
 Near clipping plane.
double m_z_far
 Far clipping plane.
int m_width
 Width of window in pixels.
int m_height
 Height of window in pixels.
int m_main_window
 Glut handle to main window of the application.
bool m_idle_on
 Boolean flag indicating whether the idle function is on or off.

Detailed Description

A base class for any application based on a GLUT binding.

This class defines the basic interface of an application. One uses this base class by making specialized derived types. See for instance the class PerspectiveViewApplication as an example.

The class also defines data needed for setting up a window mapping (width and height in pixels) and frustum (near and far clipping planes and fov).


Constructor & Destructor Documentation

OpenTissue::glut::Application::Application (  )  [inline]
virtual OpenTissue::glut::Application::~Application (  )  [inline, virtual]

Member Function Documentation

virtual void OpenTissue::glut::Application::action ( unsigned char  choice  )  [pure virtual]
double const& OpenTissue::glut::Application::aspect (  )  const [inline]
double& OpenTissue::glut::Application::aspect (  )  [inline]
virtual void OpenTissue::glut::Application::display (  )  [pure 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.

Implemented in OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >.

double const& OpenTissue::glut::Application::fovy (  )  const [inline]
double& OpenTissue::glut::Application::fovy (  )  [inline]
virtual char const* OpenTissue::glut::Application::get_title (  )  const [pure virtual]
int const& OpenTissue::glut::Application::height (  )  const [inline]
int& OpenTissue::glut::Application::height (  )  [inline]
bool& OpenTissue::glut::Application::idle (  )  [inline]
bool const& OpenTissue::glut::Application::idle (  )  const [inline]
virtual void OpenTissue::glut::Application::init (  )  [pure virtual]
virtual void OpenTissue::glut::Application::init_gl_state (  )  [pure virtual]

Initializes the openGL state.

Implemented in OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >.

virtual void OpenTissue::glut::Application::init_right_click_menu ( int  main_menu,
void   menuint entry 
) [pure virtual]
int const& OpenTissue::glut::Application::main_window (  )  const [inline]
int& OpenTissue::glut::Application::main_window (  )  [inline]
virtual void OpenTissue::glut::Application::mouse_down ( double  cur_x,
double  cur_y,
bool  shift,
bool  ctrl,
bool  alt,
bool  left,
bool  middle,
bool  right 
) [pure virtual]
virtual void OpenTissue::glut::Application::mouse_move ( double  cur_x,
double  cur_y 
) [pure virtual]
virtual void OpenTissue::glut::Application::mouse_up ( double  cur_x,
double  cur_y,
bool  shift,
bool  ctrl,
bool  alt,
bool  left,
bool  middle,
bool  right 
) [pure virtual]
virtual void OpenTissue::glut::Application::reshape (  )  [inline, virtual]
virtual void OpenTissue::glut::Application::run (  )  [pure virtual]
virtual void OpenTissue::glut::Application::setup_lights (  )  [pure virtual]

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

Implemented in OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >.

virtual void OpenTissue::glut::Application::setup_model_view_projection (  )  [pure virtual]

Intenden to Set up a default projection and initialize the modelview transformation. Upon return the modelview matrix stack should be left as the current openGL matrix stack.

Implemented in OpenTissue::glut::BasePerspectiveViewApplication< math_types_ >.

virtual void OpenTissue::glut::Application::shutdown (  )  [pure virtual]
virtual void OpenTissue::glut::Application::special_action ( int  choice  )  [pure virtual]
int const& OpenTissue::glut::Application::width (  )  const [inline]
int& OpenTissue::glut::Application::width (  )  [inline]
double& OpenTissue::glut::Application::z_far (  )  [inline]
double const& OpenTissue::glut::Application::z_far (  )  const [inline]
double const& OpenTissue::glut::Application::z_near (  )  const [inline]
double& OpenTissue::glut::Application::z_near (  )  [inline]

Member Data Documentation

Aspect ratio.

Field of view in the y-direction.

Height of window in pixels.

Boolean flag indicating whether the idle function is on or off.

Glut handle to main window of the application.

Width of window in pixels.

Far clipping plane.

Near clipping plane.


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