Box.h 737 B

1234567891011121314151617181920212223242526272829
  1. #ifndef CORE_BOX_H
  2. #define CORE_BOX_H
  3. #include "core/Vector.h"
  4. struct CoreBoxT {
  5. CoreVector3 min;
  6. CoreVector3 max;
  7. };
  8. typedef struct CoreBoxT CoreBox;
  9. #define CORE_BOX ((CoreBox){0})
  10. void coreSetBox(CoreBox* box, const CoreVector3* size);
  11. void coreOffsetBox(CoreBox* box, const CoreVector3* offset);
  12. bool coreCollidesWithBox(const CoreBox* box, const CoreBox* other);
  13. void coreExpandBox(CoreBox* box, const CoreVector3* offset);
  14. void coreGrowBox(CoreBox* box, const CoreVector3* growth);
  15. #ifdef IMPORT_CORE
  16. #define Box CoreBox
  17. #define BOX CORE_BOX
  18. #define setBox coreSetBox
  19. #define offsetBox coreOffsetBox
  20. #define collidesWithBox coreCollidesWithBox
  21. #define expandBox coreExpandBox
  22. #define growBox coreGrowBox
  23. #endif
  24. #endif