Box.h 460 B

12345678910111213141516171819
  1. #ifndef CORE_BOX_H
  2. #define CORE_BOX_H
  3. #include "core/Vector.h"
  4. typedef struct {
  5. Vector3 min;
  6. Vector3 max;
  7. } Box;
  8. #define BOX ((Box){0})
  9. void setBox(Box* box, const Vector3* size);
  10. void offsetBox(Box* box, const Vector3* offset);
  11. bool collidesWithBox(const Box* box, const Box* other);
  12. void expandBox(Box* box, const Vector3* offset);
  13. void growBox(Box* box, const Vector3* growth);
  14. size_t toStringBox(const Box* box, char* buffer, size_t n);
  15. #endif