erebus
diff liberebus/src/bvol.h @ 0:4abdce1361b9
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 27 Apr 2014 16:02:47 +0300 |
parents | |
children | 474a0244f57d |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/liberebus/src/bvol.h Sun Apr 27 16:02:47 2014 +0300 1.3 @@ -0,0 +1,16 @@ 1.4 +#ifndef BVOL_H_ 1.5 +#define BVOL_H_ 1.6 + 1.7 +#include "vmath/ray.h" 1.8 + 1.9 +class AABox { 1.10 +public: 1.11 + Vector3 vmin, vmax; 1.12 + 1.13 + AABox() : vmin(-0.5, -0.5, -0.5), vmax(0.5, 0.5, 0.5) {} 1.14 + AABox(const Vector3 &v0, const Vector3 &v1) : vmin(v0), vmax(v1) {} 1.15 + 1.16 + bool intersect(const Ray &ray) const; 1.17 +}; 1.18 + 1.19 +#endif // BVOL_H_ 1.20 \ No newline at end of file