Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/nico/src/heightMap/heightMapTerrain.h @ 3382

Last change on this file since 3382 was 3381, checked in by nico, 20 years ago

developing heightMap

File size: 921 bytes
Line 
1/*
2 *  ldrawparser.h
3 *  legotown3d
4 *
5 *  Created by Nico Bernold on 08.01.05.
6 *  Copyright 2005 __MyCompanyName__. All rights reserved.
7 *
8 */
9
10#include <iostream>
11using namespace std;
12
13#include "SDL.h"
14#include <GLUT/glut.h>
15
16#include "vector.h"
17
18
19class HeightMapTerrain
20{
21public:
22        HeightMapTerrain();
23        ~HeightMapTerrain();   
24
25        bool loadBitmap(char* fileName);
26       
27        bool createDisplayLists(int width, int height, int levelOfDetail);
28       
29        bool readIntoList(int left, int top, int width, int height, int levelOfDetail, GLuint displayListNr);
30
31        // how many display lists are there
32        int displayListCount;
33       
34        // tells from which integer our display lists start
35        GLuint displayListStart;
36       
37        // array of display lists
38        GLuint* displayLists;
39
40private:
41        // returns the height value between 0 and 256 for a point (x,z) in the picture
42        GLint heightValue(Uint8 x, Uint8 z);
43               
44        // holds the loaded pixels
45        SDL_Surface* bitmap;
46       
47
48       
49};
Note: See TracBrowser for help on using the repository browser.