sources:


website:
more info here


screenshot:
studies/grafik2/Computergrafik-Code4/Aufgabe10/cgillumination.h
download file

  1 //
  2 // Computergraphik II
  3 // Prof. Dr. Juergen Doellner
  4 // Wintersemester 2001/02
  5 //
  6 // Rahmenprogramm zu Aufgabenzettel 1
  7 //
  8
  9 #ifndef CG_ILUM_H
 10 #define CG_ILUM_H
 11
 12 #include "cgapplication.h"
 13 #include "triangle.h"
 14
 15 class Context;
 16
 17 class CGIllumination : public CGApplication {
 18 public:
 19     CGIllumination();
 20     virtual ~CGIllumination();
 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 private:     
 30    
 31     void setPhongIllumination(const Vector& point, const Vector& normal);
 32 double fatt(const Vector& punkt, const Vector& licht, const int li);
 33
 34     int size_;
 35     Triangle* tris_;
 36     Context* ctx_;
 37
 38     float zoom_;
 39     float rotate_;
 40
 41     // state vars
 42     bool stop_;
 43     bool phong_;
 44
 45 };
 46
 47 #endif // CG_ILUM_H
 48
 49
 50