Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/heightMap/src/lib/graphics/importer/heightMapTerrain.h @ 3919

Last change on this file since 3919 was 3919, checked in by bensch, 19 years ago

orxonox/branches/heightMap: branche heightmap compiles again

File size: 1.1 KB
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 "stdincl.h"
14class Vector;
15
16class HeightMapTerrain
17{
18public:
19        HeightMapTerrain();
20        ~HeightMapTerrain();   
21
22        bool loadBitmap(char* fileName);
23       
24        bool createDisplayLists(int width, int height, int levelOfDetail);
25       
26        bool readIntoList(int left, int top, int width, int height, int levelOfDetail, GLuint displayListNr);
27
28        // how many display lists are there
29        int displayListCount;
30       
31        // tells from which integer our display lists start
32        GLuint displayListStart;
33       
34        // array of display lists
35        //GLuint* displayLists;
36
37private:
38        // returns the height value between 0 and 256 for a point (x,z) in the picture
39        GLint getHeightValue(int x, int z);
40       
41        // makes a call to glNormal and glVertex for supplied x and z
42        void call_glNormal_and_glVertex(int x,int z,int top,int left,int height);
43
44        // holds the loaded pixels
45        SDL_Surface* bitmap;
46       
47        // holds normal vector for every vertex
48        Vector* normals;
49};
50
51
Note: See TracBrowser for help on using the repository browser.