Box.cppm 655 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) noexcept;
  8. public:
  9. Box(const Vector3& size) noexcept;
  10. Box offset(const Vector3& offset) const noexcept;
  11. bool collidesWith(const Box& other) const noexcept;
  12. Box expand(const Vector3& offset) const noexcept;
  13. Box grow(const Vector3& growth) const noexcept;
  14. const Vector3& getMin() const noexcept;
  15. const Vector3& getMax() const noexcept;
  16. size_t toString(StringBase& b) const noexcept;
  17. };
  18. }