sources:
cgapplication.cpp (3.8k)
cgapplication.h (3.7k)
cgscooter.cpp (8.6k)
cgscooter.h (973 bytes)


website:
more info here


screenshot:
studies/grafik/Computergrafik-Code6/cgscooter.h
download file

  1 //
  2 // Computergraphik I
  3 // Prof. Dr. Juergen Doellner
  4 // Sommersemester 2001
  5 //
  6 // Rahmenprogramm fuer Aufgabenzettel 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     // Ueberschreibe alle diese Ereignisse:
 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     // value Methode
 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