blob: b321e5fa58815f817d5ebe10b9e07ac3c4ed7650 (
plain)
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
|
#ifndef TERRAIN_H
#define TERRAIN_H
#include "renderer/renderer_types.h"
#include "math/vector.h"
typedef struct
{
Texture *texture[4];
} TerrainTexturePack;
typedef struct
{
Mesh *mesh;
Texture *blendmap;
TerrainTexturePack textures;
GLfloat *height;
int w, l;
Vec3 position;
} Terrain;
extern Terrain *Terrain_Create( int w, int l, const char* heightmap_path, Texture *blendmap, TerrainTexturePack *textures);
extern GLfloat Terrain_GetHeightOfTerrain(Terrain *terrain, GLfloat x, GLfloat z);
extern void Terrain_Destroy( Terrain *terrain );
#endif // TERRAIN_H
|