1 // Computergrafik I
2 // Prof. Dr. Juergen Doellner
3 // Sommersemester 2001
4 //
5 // Programmrahmen fuer Aufgabe 4
6
7 // Stephan Brumme, 702544
8 // last changes: May 07, 2001
9
10 #ifndef CG_SPHERE_H
11 #define CG_SPHERE_H
12
13 #include "cgapplication.h"
14 #include "vector.h"
15
16
17 class CGSphere : public CGApplication {
18 public:
19 CGSphere();
20 virtual ~CGSphere();
21
22 // The following event methods will be implemented.
23 virtual void onInit();
24 virtual void onDraw();
25 virtual void onSize(int newWidth, int newHeight);
26 virtual void onKey(unsigned char key);
27
28 private:
29 void TessellateTriangle(const Vector& v1, const Vector& v2, const Vector& v3, int nLevel);
30 GLfloat m_fRadius;
31 GLint m_nTessellationLevel;
32 bool m_bUseFlatShade;
33 bool m_bUseWireframe;
34 bool m_bUseTriangleTessellation;
35 };
36
37 #endif // CG_SPHERE_H
38
39
40