first pass at bvh construction (SAH), untested
[cyberay] / src / level.h
index b5385a7..fad5463 100644 (file)
@@ -2,17 +2,20 @@
 #define LEVEL_H_
 
 #include "rt.h"
-#include "geom.h"
+#include "bvh.h"
 
 struct level {
        struct bvhnode *st_root;
        struct bvhnode *dyn_root;
 
-       struct material *mtls;
+       struct mesh *meshlist;
 };
 
 int load_level(struct level *lvl, const char *fname);
+void destroy_level(struct level *lvl);
 
-int ray_level(cgm_ray *ray, struct level *lvl, float maxt, struct hitpoint *hit);
+int ray_level(cgm_ray *ray, struct level *lvl, float tmax, struct rayhit *hit);
+
+void draw_level(struct level *lvl);
 
 #endif /* LEVEL_H_ */