dungeon_crawler

view prototype/src/tile.h @ 7:8fb37db44fd8

first person motion
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 17 Aug 2012 14:29:37 +0300
parents 252a00508411
children e5567ddbf2ef
line source
1 #ifndef TILE_H_
2 #define TILE_H_
4 #include <vector>
5 #include <map>
6 #include <assimp/scene.h>
7 #include "mesh.h"
8 #include "light.h"
10 enum {
11 TILE_NORTH = 1,
12 TILE_SOUTH = 2,
13 TILE_EAST = 4,
14 TILE_WEST = 8,
15 TILE_ALL = 0xffff
16 };
18 class Tile {
19 private:
20 std::vector<Mesh*> meshes;
21 std::vector<unsigned int> mesh_side;
22 std::vector<Light*> lights;
24 int load_lights(const aiScene *scn);
25 int load_meshes(const aiScene *scn, const std::map<aiMesh*, aiNode*> &nmap);
27 public:
28 bool load(const char *fname);
30 void draw(unsigned int drawmask) const;
31 };
34 #endif // TILE_H_