Cube.h

00001 #ifndef CUBE_
00002 #define CUBE_
00003 
00004 #include <stdio.h>
00005 #include <windows.h>
00006 #include <GL/gl.h>
00007 #include <GL/glu.h>
00008 #include <GL/glut.h>
00009 
00010 #include "VertexArrayObject.h"
00011 
00017 class Cube: public RawObject
00018 {
00019 public:
00025         Cube (double size);
00026 
00030         ~Cube ();
00031 
00035         void Draw ();
00036 
00040         double GetBoundingRadius ();
00041 
00045         BoundingBox GetBoundingBox ();
00046 
00047 private:
00049         Cube ();
00050 
00052         double size;
00053 };
00054 
00060 class Cube2: public VertexArrayObject
00061 {
00062 public:
00068         Cube2 (float size);
00069 
00073         ~Cube2 ();
00074 
00080         void Construct (float size);
00081 
00082 private:
00084         Cube2 ();
00085 
00087         double size;
00088 
00090         float * v_data;
00091 
00093         GLuint * indices;
00094 };
00095 
00101 class TexturedCube: public RawObject
00102 {
00103 public:
00111         TexturedCube (float size, GLuint texture_id, bool allow_lighting);
00112 
00116         ~TexturedCube ();
00117 
00121         void Draw ();
00122 
00126         double GetBoundingRadius ();
00127 
00131         BoundingBox GetBoundingBox ();
00132 
00133 
00134 private:
00136         TexturedCube ();
00137 
00141         void ConstructDisplayList ();
00142 
00144         double half_size;
00145 
00147         GLuint texture_id;
00148 
00150         GLuint list_id;
00151 
00153         bool allow_lighting;
00154 };
00155 
00156 
00157 #endif

Generated on Sun Jul 2 13:20:39 2006 for Demo by  doxygen 1.4.6-NO