-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTerrain.h
36 lines (30 loc) · 1.14 KB
/
Terrain.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#define MAX_TERRAIN_SIZE 300
class Terrain {
public:
/****************************************
* CUSTOM STRUCTS
****************************************/
typedef enum {SOLID, WIREFRAME, BOTH} WireframeMode;
typedef enum {FAULT, CIRCLE} TerrainAlgorithm;
/***************************************
* FUNCTION DECLARATIONS
****************************************/
Terrain(int size); //constructor
void drawTerrain();
void generateTerrain();
void smoothTerrain(float);
void changeWireframeMode();
void changeTerrainAlgorithm(TerrainAlgorithm);
void calculateVertexNormals();
void calculateFaceNormals();
char* getWireframeMode();
char* getAlgorithm();
/***************************************
* PUBLIC GLOBAL VARIABLES
****************************************/
WireframeMode wireframeMode = SOLID;
TerrainAlgorithm terrainAlgorithm = FAULT;
float** heightMap;
int terrainSize = 100;
bool usingVertexNormals = true;
};