bloboland

view src/level.h @ 4:9021a906c5d3

lots of stuff
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 18 Dec 2012 06:13:09 +0200
parents cfe68befb7cc
children
line source
1 #ifndef LEVEL_H_
2 #define LEVEL_H_
4 #include <vector>
5 #include "volume.h"
7 struct Blob {
8 Vector3 pos;
9 Vector3 velocity;
10 };
12 class Level {
13 public:
14 Volume *terrain;
15 std::vector<Blob> blobs;
17 Vector3 world_size;
19 Level();
20 ~Level();
22 void generate();
24 bool load(const char *fname);
25 bool save(const char *fname) const;
27 const Vector4 &get_voxel(const Vector3 &pos) const;
28 Vector3 calc_normal(const Vector3 &pos) const;
30 bool collision(const Vector3 &pos0, const Vector3 &pos1, Vector3 *outpos, Vector3 *outnorm) const;
31 };
33 #endif // LEVEL_H_