Box.h 418 B

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