Scene.h

gehe zur Dokumentation dieser Datei
00001 #ifndef SCENE_H_
00002 #define SCENE_H_
00003 #include <iostream>
00004 #include <sstream>
00005 #include <string>
00006 #include <list>
00007 #include <iomanip>
00008 #include <cstdlib>
00009 #include <GL/glut.h>
00010 #include "Object.h"
00011 #include "Translation.h"
00012 #include "Rotation.h"
00013 #include "Scale.h"
00014 #include "Children.h"
00015 #include "Material.h"
00016 #include "Vector.h"
00017 #include "Animation.h"
00018 #include "Text.h"
00019 #include "Fish.h"
00020 #include "Shark.h"
00021 using std::cout;
00022 using std::cerr;
00023 using std::endl;
00024 using std::string;
00025 using std::list;
00026 using std::ostringstream;
00027 using std::setw;
00028 using std::setfill;
00029 
00034 class Scene {
00035 public:
00036         static Object* namedObject;
00037 
00041         static Scene* init(int width, int height, string title, bool fullscreen = false);
00042 
00046         void addNode(Node* nde);
00047 
00051         void addFish(Fish* nde);
00052 
00056         void addShark(Shark* nde);
00057 
00061         virtual void run();
00062 
00067         virtual ~Scene();
00068 
00069 private:
00073         static void screenshot();
00074 
00078         bool fullscreen;
00079 
00083         static bool drawNames;
00084 
00088         static bool drawHelp;
00089 
00093         static bool tgaWriter;
00094 
00098         static bool calculateFishCount;
00099 
00103         static bool paused;
00104 
00108         static int maxFishCount;
00109 
00113         static Text* fpsDisplay;
00114 
00118         static list<Text*> helpDisplay;
00119 
00123         static int frames;
00124 
00128         static int activeCam;
00129 
00133         static float attenuation;
00134 
00138         static bool topLight;
00139 
00143         static Vector* camPos[4];
00144 
00150         static Scene* singleton;
00151 
00155         static Children* graph;
00156 
00160         static Children* fishList;
00161 
00165         static Children* sharkList;
00166 
00170         Scene(int width, int height, string title, bool fullscreen = false);
00171 
00175         static void nextCam();
00176 
00180         static void timer(int id);
00181 
00185         static void fpsTimer(int id);
00186 
00190         static void display();
00191 
00195         static void reshapeHandler(int w, int h);
00196 
00200         static void keyboardDownHandler(unsigned char key, int x, int y);
00201 
00205         static void keyboardUpHandler(unsigned char key, int x, int y);
00206 
00210         static void mouseHandler(int button, int state, int u, int v);
00211 };
00212 
00213 #endif /*SCENE_H_*/

Erzeugt am Sun Jun 10 13:47:51 2007 für Fishtank von  doxygen 1.5.2