glm::vec3 high(glm::max(glm::abs(min), glm::abs(max)));
return glm::length(high);
}
+
+ void Move(const glm::vec3 &delta) noexcept {
+ min += delta;
+ max += delta;
+ }
};
std::ostream &operator <<(std::ostream &, const AABB &);
+bool Intersection(const AABB &, const AABB &) noexcept;
+
// TODO: this should really use setters/getters for dir and inv_dir so
// manipulating code doesn't "forget" to call Update()
struct Ray {