/* * legotown.h * legotown3d * * Created by Nico Bernold on 08.01.05. * Copyright 2005 __MyCompanyName__. All rights reserved. * */ #include using namespace std; #include "heightMapTerrain.h" #include "windowhandler.h" #include "vector.h" #include "SDL.h" #include #define WIDTH 640 #define HEIGHT 480 #define FULLSCREEN false /* #define WIDTH 1280 #define HEIGHT 854 #define FULLSCREEN true */ class HeightMapViewer { public: HeightMapViewer(); ~HeightMapViewer(); bool init(char* fileName); bool run(); private: void drawScene(); void updateView(); WindowHandler windowhandler; HeightMapTerrain terrain; bool wireframe; bool mousedown; Vector cameraPos; Vector sightDirection; Vector lookAt; Vector upVector; // used for some movement calculations Vector perpendicularToSight; Quaternion rotator; };