Box.cppm 578 B

12345678910111213141516171819202122232425
  1. export module Core.Box;
  2. export import Core.Vector;
  3. export namespace Core {
  4. class Box final {
  5. Vector3 min;
  6. Vector3 max;
  7. Box(const Vector3& min, const Vector3& max);
  8. public:
  9. Box(const Vector3& size);
  10. Box offset(const Vector3& offset) const;
  11. bool collidesWith(const Box& other) const;
  12. Box expand(const Vector3& offset) const;
  13. Box grow(const Vector3& growth) const;
  14. const Vector3& getMin() const;
  15. const Vector3& getMax() const;
  16. size_t toString(char* s, size_t n) const;
  17. };
  18. }