#ifndef COLLISION_BOX_H #define COLLISION_BOX_H #include "math/Vector.h" #include "utils/StringBuffer.h" class Box { Vector3 min; Vector3 max; Box(const Vector3& min, const Vector3& max); public: Box(const Vector3& size); Box offset(const Vector3& offset) const; bool collidesWith(const Box& other) const; Box expand(const Vector3& offset) const; const Vector3& getMin() const; const Vector3& getMax() const; template void toString(StringBuffer& s) const { s.append("Box(").append(min).append(", ").append(max).append(")"); } }; #endif