/* * ldrawparser.h * legotown3d * * Created by Nico Bernold on 08.01.05. * Copyright 2005 __MyCompanyName__. All rights reserved. * */ #include using namespace std; #include "stdincl.h" class Vector; 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 getHeightValue(int x, int z); // makes a call to glNormal and glVertex for supplied x and z void call_glNormal_and_glVertex(int x,int z,int top,int left,int height); // holds the loaded pixels SDL_Surface* bitmap; // holds normal vector for every vertex Vector* normals; };