/* * ldrawparser.h * legotown3d * * Created by Nico Bernold on 08.01.05. * Copyright 2005 __MyCompanyName__. All rights reserved. * */ #include using namespace std; #include "SDL.h" #include #include "vector.h" class HeightMapTerrain { public: HeightMapTerrain(); ~HeightMapTerrain(); bool loadBitmap(char* fileName); bool createDisplayLists(int width, int height, int levelOfDetail); bool readIntoList(int left, int top, int width, int height, int levelOfDetail, GLuint displayListNr); // how many display lists are there int displayListCount; // tells from which integer our display lists start GLuint displayListStart; // array of display lists GLuint* displayLists; private: // returns the height value between 0 and 256 for a point (x,z) in the picture GLint heightValue(Uint8 x, Uint8 z); // holds the loaded pixels SDL_Surface* bitmap; };