Visualizer.h

Go to the documentation of this file.
00001 #ifndef GLUTWINDOW_H
00002 #define GLUTWINDOW_H
00003 
00011 #if defined(__WIN32__) || defined(_WIN32) || defined(__CYGWIN__) 
00012   #include <windows.h>
00013 #else
00014 #endif
00015 
00016 #include <GL/glut.h>
00017 
00018 #ifndef BUILDING_DOX
00019 class TriangleSetExt;
00020 #endif
00021 
00025 class Visualizer{
00026   public:
00033     static void visualize(const char *title, TriangleSetExt *te); /* visualize of scene in GLUT window */
00034     
00042     static void takeScreenshot(char *fileName, TriangleSetExt *te);   /* do screenshot of scene to file .tga */
00043   
00044   private:
00045     typedef enum { INTERPOLATE_RADIOSITY, INTERPOLATE_RADIOSITY_RAW, RADIOSITY_LAST, RADIOSITY, REFLECTIVITY, EMISSION, REFLECT_EMISS } TColorInput;
00046   
00047     static TriangleSetExt * patchSequenceEnumerator_;
00048     static TColorInput colorInput;
00049   
00050     static GLuint scene_;
00051   
00052     static int   xnew, ynew, znew;                  /* actual position */
00053     static int   xold, yold, zold;                  /* old position */
00054     static int   xx1, yy1, zz1;                     /* mouse position*/
00055     static int   mouseState;                      /* mouse button state */
00056     static int   xshift, yshift;                    /* shifting in space*/
00057   
00058     static float fov;                               /* field of view */
00059     static float near_plane;                        /* trim plain */
00060     static float far_plane;                         /* farther trim plain */
00061     static float point_size;                        /* size of point */
00062     static float line_width;                        /* width of line */
00063     static int   WindowWidth;                       /* width and height of window */
00064     static int   WindowHeight;
00065     static int   ObjectType;                        /* type of paint object */
00066     static int   Solid;                             /* fill or wireframe model */
00067     
00068     static bool doScreenshot;
00069     static const char * screenshotFileName;
00070   
00071     // callbacks
00072     static void onDisplay(void);
00073     static void onReshape(int w, int h);
00074     static void onKeyboard(unsigned char key, int x, int y);
00075     static void onSpecial(int key, int, int);
00076     static void onMouseClick(int button, int state, int x, int y);
00077     static void onMouseMotion(int x, int y);
00078   
00079     static void start(TriangleSetExt * patchEnumerator, TColorInput colorInput);
00080   
00081     Visualizer();
00082   
00083     static void createWindow(const char * title);           
00084     static void saveScreenshot(const char * filename);
00085     static void createCallList(void);
00086 };
00087 
00088 #endif

Generated on Thu Dec 6 19:33:11 2007 for Radiosity Renderer and Visualizer by  doxygen 1.5.2