Last change
on this file since 3384 was
3384,
checked in by bensch, 20 years ago
|
orxonox/branches/nico: moved hightmap to importer, there are still some files missing…
|
File size:
906 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> |
---|
11 | using namespace std; |
---|
12 | |
---|
13 | #include "../stdincl.h" |
---|
14 | |
---|
15 | #include "vector.h" |
---|
16 | |
---|
17 | |
---|
18 | class HeightMapTerrain |
---|
19 | { |
---|
20 | public: |
---|
21 | HeightMapTerrain(); |
---|
22 | ~HeightMapTerrain(); |
---|
23 | |
---|
24 | bool loadBitmap(char* fileName); |
---|
25 | |
---|
26 | bool createDisplayLists(int width, int height, int levelOfDetail); |
---|
27 | |
---|
28 | bool readIntoList(int left, int top, int width, int height, int levelOfDetail, GLuint displayListNr); |
---|
29 | |
---|
30 | // how many display lists are there |
---|
31 | int displayListCount; |
---|
32 | |
---|
33 | // tells from which integer our display lists start |
---|
34 | GLuint displayListStart; |
---|
35 | |
---|
36 | // array of display lists |
---|
37 | GLuint* displayLists; |
---|
38 | |
---|
39 | private: |
---|
40 | // returns the height value between 0 and 256 for a point (x,z) in the picture |
---|
41 | GLint heightValue(Uint8 x, Uint8 z); |
---|
42 | |
---|
43 | // holds the loaded pixels |
---|
44 | SDL_Surface* bitmap; |
---|
45 | |
---|
46 | |
---|
47 | |
---|
48 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.