MachineIntelligenceCore:Visualization
mic::opengl::application::OpenGLApplication Class Referenceabstract

An abstract class implementing basic functions for two-threaded, OpenGL-based applications. Introduces the execution phases that are typical for all learning/classification applications, imposes fine code granulation. More...

#include <OpenGLApplication.hpp>

Inheritance diagram for mic::opengl::application::OpenGLApplication:
Collaboration diagram for mic::opengl::application::OpenGLApplication:

Public Member Functions

 OpenGLApplication (std::string node_name_)
 
virtual ~OpenGLApplication ()
 
virtual void initialize (int argc, char *argv[])=0
 
virtual void run ()
 

Protected Member Functions

virtual void processingThread (void)
 Function realizing the processing thread. Implements basic quit/pause/single step functionality. In each step it calls the performSingleStep() method. Can be overridden by derived classes. More...
 
virtual void performInitialStep (void)
 The initial step - empty, to be overridden. More...
 
virtual void performFinalStep (void)
 The initial step - empty, to be overridden. More...
 

Detailed Description

An abstract class implementing basic functions for two-threaded, OpenGL-based applications. Introduces the execution phases that are typical for all learning/classification applications, imposes fine code granulation.

Author
tkornuta

Definition at line 44 of file OpenGLApplication.hpp.

Constructor & Destructor Documentation

mic::opengl::application::OpenGLApplication::OpenGLApplication ( std::string  node_name_)

Default Constructor. Sets the application/node name.

Parameters
node_name_Name of the application/node (in configuration file).

Definition at line 35 of file OpenGLApplication.cpp.

virtual mic::opengl::application::OpenGLApplication::~OpenGLApplication ( )
inlinevirtual

Virtual destructor. Empty for now.

Definition at line 56 of file OpenGLApplication.hpp.

Member Function Documentation

virtual void mic::opengl::application::OpenGLApplication::initialize ( int  argc,
char *  argv[] 
)
pure virtual

Initializes application. Abstract method. By default it should: initialize GLUT and all required OpenGL windows. (Note: all OpenGL windows - they must be created in the main application thread :])

Parameters
argcNumber of application parameters.
argvArray of application parameters.
virtual void mic::opengl::application::OpenGLApplication::performFinalStep ( void  )
inlineprotectedvirtual

The initial step - empty, to be overridden.

Author
gwburr

Definition at line 89 of file OpenGLApplication.hpp.

Referenced by processingThread().

virtual void mic::opengl::application::OpenGLApplication::performInitialStep ( void  )
inlineprotectedvirtual

The initial step - empty, to be overridden.

Author
gwburr

Definition at line 83 of file OpenGLApplication.hpp.

Referenced by processingThread().

void mic::opengl::application::OpenGLApplication::processingThread ( void  )
protectedvirtual

Function realizing the processing thread. Implements basic quit/pause/single step functionality. In each step it calls the performSingleStep() method. Can be overridden by derived classes.

Author
tkornuta

Reimplemented in mic::opengl::application::OpenGLEpisodicApplication.

Definition at line 53 of file OpenGLApplication.cpp.

References performFinalStep(), and performInitialStep().

Referenced by run().

Here is the call graph for this function:

void mic::opengl::application::OpenGLApplication::run ( )
virtual

Runs the application - the processing in an external thread and OpenGL in the main thread.

Definition at line 39 of file OpenGLApplication.cpp.

References processingThread(), and VGL_MANAGER.

Here is the call graph for this function:


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