1 //
2 // Computergraphik II
3 // Prof. Dr. Juergen Doellner
4 // Wintersemester 2001/02
5 //
6 // Rahmenprogramm zu Aufgabenzettel 4
7 //
8
9 #ifndef CG_MATERIAL_H
10 #define CG_MATERIAL_H
11
12 #include "cgapplication.h"
13
14 static const int XWindows = 4;
15 static const int YWindows = 4;
16
17 class CGMaterial : public CGApplication {
18 public:
19 CGMaterial();
20 virtual ~CGMaterial();
21
22 // Ueberschreibe alle diese Ereignisse:
23 virtual void onInit();
24 virtual void onDraw();
25 virtual void onIdle();
26 virtual void onKey(unsigned char key);
27 virtual void onSize(unsigned int newWidth, unsigned int newHeight);
28
29 // value Methode
30 unsigned char value(int x, int z) const;
31
32 private:
33
34 void setLight(int x, int y);
35 void setMaterial(int x, int y);
36 void setSmallViewport(int x, int y);
37 void drawScene();
38
39 int width_;
40 int height_;
41 double zoom_;
42 bool run_;
43 int mode_;
44 };
45
46 #endif
47
48
49