#include <Scene.h>
Öffentliche Methoden | |
void | addNode (Node *nde) |
void | addFish (Fish *nde) |
void | addShark (Shark *nde) |
virtual void | run () |
virtual | ~Scene () |
Öffentliche, statische Methoden | |
static Scene * | init (int width, int height, string title, bool fullscreen=false) |
Statische öffentliche Attribute | |
static Object * | namedObject = 0 |
Private Methoden | |
Scene (int width, int height, string title, bool fullscreen=false) | |
Private, statische Methoden | |
static void | screenshot () |
static void | nextCam () |
static void | timer (int id) |
static void | fpsTimer (int id) |
static void | display () |
static void | reshapeHandler (int w, int h) |
static void | keyboardDownHandler (unsigned char key, int x, int y) |
static void | keyboardUpHandler (unsigned char key, int x, int y) |
static void | mouseHandler (int button, int state, int u, int v) |
Private Attribute | |
bool | fullscreen |
Statische private Attribute | |
static bool | drawNames = false |
static bool | drawHelp = false |
static bool | tgaWriter = false |
static bool | calculateFishCount = false |
static bool | paused = false |
static int | maxFishCount = 0 |
static Text * | fpsDisplay = 0 |
static list< Text * > | helpDisplay |
static int | frames = 0 |
static int | activeCam = 0 |
static float | attenuation = 0.0f |
static bool | topLight = true |
static Vector * | camPos [4] |
static Scene * | singleton = 0 |
static Children * | graph = 0 |
static Children * | fishList = 0 |
static Children * | sharkList = 0 |
Scene::~Scene | ( | ) | [virtual] |
Default-Destruktor. Falls die Auflösung umgestellt wurde, wird hier die systemnative Auflösung wieder hergestellt
Scene::Scene | ( | int | width, | |
int | height, | |||
string | title, | |||
bool | fullscreen = false | |||
) | [private] |
Konstruktor, der das Singleton-Objekt anlegt
Scene * Scene::init | ( | int | width, | |
int | height, | |||
string | title, | |||
bool | fullscreen = false | |||
) | [static] |
Init-Methode zum Starten des Graphik-Systems
void Scene::addNode | ( | Node * | nde | ) |
Neuen Knoten zum Szenengraphen zufügen
void Scene::addFish | ( | Fish * | nde | ) |
Neuen Fisch zum Szenengraphen zufügen
void Scene::addShark | ( | Shark * | nde | ) |
Neuen Hai zum Szenengraphen zufügen
void Scene::run | ( | ) | [virtual] |
Startet die glutMainLoop
void Scene::screenshot | ( | ) | [static, private] |
Schreibt die Screenshot-Datei mit fortlaufendem Namen
void Scene::nextCam | ( | ) | [static, private] |
Wählt die nächste verfügbare Kamera aus
void Scene::timer | ( | int | id | ) | [static, private] |
Callback-Methode für glutTimerFunc
void Scene::fpsTimer | ( | int | id | ) | [static, private] |
Callback-Methode zum FPS zählen
void Scene::display | ( | ) | [static, private] |
Callback-Methode für glutDisplayFunc
void Scene::reshapeHandler | ( | int | w, | |
int | h | |||
) | [static, private] |
Callback-Methode für glutReshapeFunc
void Scene::keyboardDownHandler | ( | unsigned char | key, | |
int | x, | |||
int | y | |||
) | [static, private] |
Callback-Methode für glutKeyboardFunc
void Scene::keyboardUpHandler | ( | unsigned char | key, | |
int | x, | |||
int | y | |||
) | [static, private] |
Callback-Methode für glutKeyboardUpFunc
void Scene::mouseHandler | ( | int | button, | |
int | state, | |||
int | u, | |||
int | v | |||
) | [static, private] |
Callback-Methode für glutMouseFunc
Object * Scene::namedObject = 0 [static] |
bool Scene::fullscreen [private] |
Speichert, ob sich die Ausgabe im Vollbild befindet
bool Scene::drawNames = false [static, private] |
Speichert, ob die Fischnamen angezeigt werden soll
bool Scene::drawHelp = false [static, private] |
Speichert, ob die Onlinehilfe angezeigt werden soll
bool Scene::tgaWriter = false [static, private] |
Speichert, ob Screenshots geschrieben werden
bool Scene::calculateFishCount = false [static, private] |
Gibt an, ob die maximale Anzahl von Fischen berechnet wird
bool Scene::paused = false [static, private] |
Gibt an, ob jegliche Bewegung pausiert ist
int Scene::maxFishCount = 0 [static, private] |
Maximale Anzahl von Fischen, bevor die FPS unter 10 fallen
Text * Scene::fpsDisplay = 0 [static, private] |
Textobjekt zur Anzeige von FPS
list< Text * > Scene::helpDisplay [static, private] |
Textobjekt zur Anzeige von Onlinehilfe
int Scene::frames = 0 [static, private] |
Zählt die Frames
int Scene::activeCam = 0 [static, private] |
Speichert die Nummer der aktiven Kamera
float Scene::attenuation = 0.0f [static, private] |
Dämpfungswert für leuchtenden Fisch
bool Scene::topLight = true [static, private] |
Ist die Deckenlampe an?
Vector * Scene::camPos [static, private] |
Scene * Scene::singleton = 0 [static, private] |
Scene ist als Singleton implementiert, weil u.A. Callback-Funktionen keine Exemplarmethoden sein können, wohl aber Klassenmethoden. Hier wird die Instanz abgespeichert
Children * Scene::graph = 0 [static, private] |
Speichert den Szenengraph als Children-Node, der beliebig viele Kindknoten haben kann
Children * Scene::fishList = 0 [static, private] |
Speichert die Liste der Fische, die zusätzlich im Szenengraph hängen sollen
Children * Scene::sharkList = 0 [static, private] |
Speichert die Liste der Haie, die zusätzlich im Szenengraph hängen sollen