Kiretu

/home/wu/Desktop/kiretu-0.8/Hud.h

Go to the documentation of this file.
00001 /* This file is part of the Kiretu, a Kinect reconstruction tutor.
00002  * 
00003  * http://pille.iwr.uni-heidelberg.de/~kinect01/
00004  * 
00005  * The code ist licensed to you under the terms of the GNU General Public 
00006  * License, version 2.0. See the GPL2 file for the text of the license or the 
00007  * following URL:
00008  * 
00009  * http://www.gnu.org/licenses/gpl-2.0.txt
00010  * 
00011  * If you redistribute this file in source form, modified or unmodified, you
00012  * have to leave this header intact and distribute it under the same terms with 
00013  * the GPL2 file.
00014  * 
00015  * Binary distributions must follow the binary distribution requirements of
00016  * either License.
00017  * 
00018  */
00019  
00020  /** \file Hud.h
00021  * 
00022  * Header file of the HUD. The HUD (Head Up Display) is used for displaying 
00023  * various information to the application using OpenGL.
00024  * 
00025  * \author      Daniel Wunderlich (d.wunderlich@stud.uni-heidelberg.de)
00026  * \version     0.6
00027  * \date        2011-01-16
00028  */
00029  
00030 #include <cstring>
00031 #include <string>
00032 
00033 #include <GL/glut.h>
00034 
00035 #include "Util.h"
00036 
00037 
00038 /** \class  Hud 
00039  *  \brief  C++-class which represents a HUD. The HUD (Head Up Display) is used 
00040  *          for displaying various information to the application using OpenGL.
00041  *  
00042  *  \author Daniel Wunderlich (d.wunderlich@stud.uni-heidelberg.de)
00043  *  \version 0.6
00044  *  \date   2011-01-16
00045  */
00046 class Hud {
00047     
00048     public:
00049     
00050 /** \brief Constructor of the Hud-class.
00051  */ 
00052         Hud();
00053 
00054 /** \brief Deconstructor of the Hud-class.
00055  */ 
00056         ~Hud();
00057 
00058 /** \brief  Prints text using OpenGL's 
00059  *          glutBitmapCharacter(void *font, int character) without 
00060  *          specifying a certain position.
00061  *
00062  *  \param  text        The text which should be printed.
00063  *  
00064  *  \param  printLarge  False: Text is printed with OpenGL's 
00065  *                      GLUT_BITMAP_HELVETICA_12. True: Text is printed with 
00066  *                      GLUT_BITMAP_HELVETICA_18.
00067  */         
00068         void printGLText(std::string text, bool printLarge);
00069 
00070 
00071 /** \brief  Calls printGLText(std::string text, bool printLarge) after setting 
00072  *          a specified position using OpenGL's 
00073  *          glRasterPos2i(GLint x, GLint y).
00074  *
00075  *  \param  x           X-coordinate of the wanted text-position.
00076  *  
00077  *  \param  y           Y-coordinate of the wanted text-position.
00078  *  
00079  *  \param  text        The text which should be printed.
00080  *  
00081  *  \param  printLarge  False: Text is printed with OpenGL's 
00082  *                      GLUT_BITMAP_HELVETICA_12. True: Text is printed with 
00083  *                      GLUT_BITMAP_HELVETICA_18.
00084  */ 
00085         void printGLTextPos(int x, int y, std::string text, bool printLarge);
00086 
00087 /** \brief  Prints the labels 'Depth Map' and 'Video Output' using 
00088  *          printGLTextPos(int x, int y, std::string text, bool printLarge).
00089  */ 
00090         void printGLLabel();
00091 
00092 
00093 /** \brief  Prints a 'Scanning'-label in the middle of the depth-map-frame while 
00094  *          scanning.
00095  * 
00096  *  \param  print   True: Label is printed. False: Label is not printed.
00097  */ 
00098         void printGLScanning(bool print);
00099 
00100 
00101 /** \brief  Prints the help-box in the lower left corner of the window.
00102  *  
00103  *  \param  print   True: Label is printed. False: Label is not printed.
00104  */ 
00105         void printGLHelp(bool print);
00106 
00107 
00108 /** \brief  Prints the state-box in the lower right corner of the window.
00109  *  
00110  *  \param  print   True: Label is printed. False: Label is not printed.
00111  *  
00112  *  \param  angle   The current Kinect's angle.
00113  * 
00114  *  \param  format  String with the current format of the video stream. Should 
00115  *                  be 'RGB', 'YUV-RGB' or 'IR'. 
00116  *  
00117  *  \param  states  Array with 5 element indicating the steps of the pointcloud 
00118  *                  reconstruction. The meaning of the steps are explained at 
00119  *                  KinectCloud::getReconstructionSteps().
00120  */ 
00121         void printGLState(bool print, int angle, std::string format, bool states[5]);
00122 };
 All Data Structures Files Functions Variables Enumerations Enumerator
[Page Up]