1
2
3
4
5
6
7
8
9 #ifndef CG_SCOOTER_H
10 #define CG_SCOOTER_H
11
12 #include "cgapplication.h"
13
14 class CGScooter : public CGApplication {
15 public:
16 CGScooter();
17 virtual ~CGScooter();
18
19
20 virtual void onInit();
21 virtual void onDraw();
22 virtual void onIdle();
23 virtual void onDrag(double dx, double dy);
24 virtual void onKey(unsigned char key);
25 virtual void onSize(unsigned int newWidth, unsigned int newHeight);
26
27
28 unsigned char value(int x, int z) const;
29
30 private:
31 void drawSteering();
32 void drawScooter();
33 void drawBox();
34 void drawSphere();
35 void drawTorus(double innerRadius, double outerRadius);
36 void drawCylinder(bool caps = false);
37 void drawWheel();
38
39 bool rotate_;
40 bool run_;
41 bool axis_;
42 };
43
44 #endif // CG_SCOOTER_H
45
46
47