GLSnapshot.h

00001 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
00002 /* 
00003  * Copyright (C) 2008 Micha Hersch, EPFL
00004  * RobotCub Consortium, European Commission FP6 Project IST-004370
00005  * email:   micha.hersch@robotcub.org
00006  * website: www.robotcub.org
00007  * Permission is granted to copy, distribute, and/or modify this program
00008  * under the terms of the GNU General Public License, version 2 or any
00009  * later version published by the Free Software Foundation.
00010  *
00011  * A copy of the license can be found at
00012  * http://www.robotcub.org/icub/license/gpl.txt
00013  *
00014  * This program is distributed in the hope that it will be useful, but
00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
00017  * Public License for more details
00018  */
00019 #ifndef __GLSNAPSHOT_H__
00020 #define __GLSNAPSHOT_H__
00021 
00022 #include <stdio.h>
00023 #include <stdlib.h>
00024 #include <string.h>
00025 
00026 #include "gl2ps.h"
00027 
00028 #ifndef TRUE
00029 #define TRUE 1
00030 #endif
00031 
00032 #ifndef FALSE
00033 #define FALSE 0
00034 #endif
00035 
00036 
00037 enum GLSnapshotMode{
00038   GLSnap_NONE,
00039   GLSnap_EPS,
00040   GLSnap_RGB
00041 };
00042 
00043 class GLSnapshot
00044 {
00045 private:
00046   FILE           *m_File;
00047   GLSnapshotMode  m_Mode;
00048 
00049   char            m_Filename[512];
00050 
00051   int             m_Width;
00052   int             m_Height;
00053 
00054 public:
00055   GLSnapshot();
00056   ~GLSnapshot();
00057 
00058   void  SetViewport(int width, int height);
00059   void  SetFilename(const char *filename);
00060   void  SetMode(GLSnapshotMode mode);
00061   int   Begin();
00062   int   Finish();
00063 };
00064 
00065 
00066 #endif
 All Data Structures Functions Variables

Generated on Wed Sep 22 16:51:25 2010 for Body_Schema_Learning by  doxygen 1.6.1