Torus.h

00001 #ifndef TORUS_
00002 #define TORUS_
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 Torus: public RawObject
00018 {
00019 public:
00028         Torus (double inner_radius, double outer_radius, int n_sides, int n_rings);
00029 
00033         ~Torus ();
00034 
00038         void Draw ();
00039 
00043         double GetBoundingRadius ();
00044 
00048         BoundingBox GetBoundingBox ();
00049 
00050 private:
00052         Torus ();
00053 
00055         double inner_radius;
00056 
00058         double outer_radius;
00059 
00061         int n_sides;
00062 
00064         int n_rings;
00065 };
00066 
00072 class Torus2: public VertexArrayObject
00073 {
00074 public:
00083         Torus2 (double radius_t, double radius_p, int n_sides, int n_rings);
00084 
00088         ~Torus2 ();
00089 
00093         double GetBoundingRadius ();
00094 
00098         BoundingBox GetBoundingBox ();
00099 
00103         void SetTexture (GLuint texture_id);
00104 
00105 
00106 private:
00108         Torus2 ();
00109 
00113         void Construct ();
00114 
00116         double r_t;
00117 
00119         double r_p;
00120 
00122         int n_sides;
00123 
00125         int n_rings;
00126 
00128         float * data;
00129 
00131         GLuint * indices;
00132 };
00133 
00134 
00135 #endif

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