010e0505a6e0a75fe61a74414d8a4292c93ac1b8
[cyberay] / src / level.h
1 #ifndef LEVEL_H_
2 #define LEVEL_H_
3
4 #include "rt.h"
5 #include "bvh.h"
6
7 struct level {
8         struct bvhnode *st_root;
9         struct bvhnode *dyn_root;
10
11         struct material *mtls;
12         int num_mtls, max_mtls;
13 };
14
15 int load_level(struct level *lvl, const char *fname);
16 void destroy_level(struct level *lvl);
17
18 int ray_level(cgm_ray *ray, struct level *lvl, float tmax, struct rayhit *hit);
19
20 void draw_level(struct level *lvl);
21
22 #endif  /* LEVEL_H_ */