// // Computergraphik II // Prof. Dr. Juergen Doellner // Wintersemester 2001/02 // // Rahmenprogramm zu Aufgabenzettel 7 // #ifndef CG_TEXTURE_H #define CG_TEXTURE_H #include "cgapplication.h" #include "vector.h" class CGTexture : public CGApplication { public: CGTexture(char* filename); virtual ~CGTexture(); virtual void onInit(); virtual void onDraw(); virtual void onIdle(); virtual void onKey(unsigned char key); virtual void onSize(unsigned int newWidth, unsigned int newHeight); void readImage(); // value Methode unsigned char value(int x, int z) const; private: void drawScene(); void drawObject(); void buildPatch(int detail); void handleVertex(const Vector& v); // dimension of viewport int width_; int height_; // size of mesh double zoom_; // filename of ppm-image char* filename_; // dimension of texture int texWidth_; int texHeight_; // image for texture GLubyte* image_; // texture ID GLuint textureID_; // rotate texture bool rotate_; bool run_; int num_; Vector* list_; }; #endif // CG_WAVE_H