erebus
annotate 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 |
rev | line source |
---|---|
nuclear@0 | 1 #ifndef BVOL_H_ |
nuclear@0 | 2 #define BVOL_H_ |
nuclear@0 | 3 |
nuclear@0 | 4 #include "vmath/ray.h" |
nuclear@0 | 5 |
nuclear@0 | 6 class AABox { |
nuclear@0 | 7 public: |
nuclear@0 | 8 Vector3 vmin, vmax; |
nuclear@0 | 9 |
nuclear@0 | 10 AABox() : vmin(-0.5, -0.5, -0.5), vmax(0.5, 0.5, 0.5) {} |
nuclear@0 | 11 AABox(const Vector3 &v0, const Vector3 &v1) : vmin(v0), vmax(v1) {} |
nuclear@0 | 12 |
nuclear@0 | 13 bool intersect(const Ray &ray) const; |
nuclear@0 | 14 }; |
nuclear@0 | 15 |
nuclear@0 | 16 #endif // BVOL_H_ |