sources:
cgapplication.cpp (3.2k)
cgapplication.h (3.5k)
cgwave.cpp (8.5k)
cgwave.h (1.0k)
vector.cpp (1.4k)
vector.h (4.9k)


binaries:
Release/wave.exe (27.0k)


website:
more info here


screenshot:
studies/grafik2/Computergrafik-Code5/cgwave.h
download file

  1 //
  2 // Computergraphik II
  3 // Prof. Dr. Juergen Doellner
  4 // Wintersemester 2001/02
  5 //
  6 // Rahmenprogramm zu Aufgabenzettel 5
  7 //
  8
  9 #ifndef CG_WAVE_H
 10 #define CG_WAVE_H
 11
 12 #include "cgapplication.h"
 13 #include "vector.h"
 14
 15 class CGWave : public CGApplication {
 16 public:
 17     CGWave();
 18     virtual ~CGWave();
 19
 20     // Ueberschreibe alle diese Ereignisse:
 21     virtual void onInit();
 22     virtual void onDraw();       
 23     virtual void onIdle();
 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
 32     void drawScene();
 33     void drawObject();
 34     void buildPatch(int detail);
 35     void handleVertex(const Vector& v) const;
 36     Vector WavedNormal(const Vector& v) const;
 37
 38     int width_;
 39     int height_;
 40     double zoom_;
 41     double rot_;
 42     double periode_;
 43
 44     bool culling_;
 45     bool run_;
 46     bool showNormals_;
 47     bool periodAnim_;
 48     bool lightAnim_;
 49     int num_;
 50     Vector* list_;
 51 };
 52
 53 #endif // CG_WAVE_H
 54
 55
 56