#include #include #include #include #include #include "scene.h" Bbox boundpt(Bbox b, Point3 pt) { if(pt.x < b.min.x) b.min.x = pt.x; if(pt.y < b.min.y) b.min.y = pt.y; if(pt.z < b.min.z) b.min.z = pt.z; if(pt.w < b.min.w) b.min.w = pt.w; if(pt.x > b.max.x) b.max.x = pt.x; if(pt.y > b.max.y) b.max.y = pt.y; if(pt.z > b.max.z) b.max.z = pt.z; if(pt.w > b.max.w) b.max.w = pt.w; return b; } #define MAX(a, b) (a>b?a:b) #define MIN(a, b) (a