2022-07-26 04:36:32 +00:00
|
|
|
#ifndef __CAABOX_HPP__
|
|
|
|
#define __CAABOX_HPP__
|
|
|
|
|
|
|
|
#include "Kyoto/Math/CVector3f.hpp"
|
|
|
|
|
|
|
|
class CAABox {
|
2022-08-13 01:26:00 +00:00
|
|
|
public:
|
2022-09-21 05:18:07 +00:00
|
|
|
// CAABox() {
|
|
|
|
// // TODO
|
|
|
|
// }
|
2022-09-18 06:05:46 +00:00
|
|
|
CAABox(const CVector3f& min, const CVector3f& max); // : min(min), max(max) {}
|
2022-09-21 05:18:07 +00:00
|
|
|
// CAABox(const CAABox& other)
|
|
|
|
// : minX(other.minX)
|
|
|
|
// , minY(other.minY)
|
|
|
|
// , minZ(other.minZ)
|
|
|
|
// , maxX(other.maxX)
|
|
|
|
// , maxY(other.maxY)
|
|
|
|
// , maxZ(other.maxZ) {}
|
|
|
|
|
|
|
|
CAABox& operator=(const CAABox&);
|
2022-08-16 02:14:28 +00:00
|
|
|
|
|
|
|
CVector3f ClosestPointAlongVector(const CVector3f& vec) const;
|
2022-08-13 01:26:00 +00:00
|
|
|
|
2022-09-21 05:18:07 +00:00
|
|
|
static const CAABox& Identity() { return mskNullBox; }
|
|
|
|
static const CAABox& MakeMaxInvertedBox() { return mskInvertedBox; }
|
2022-08-13 01:26:00 +00:00
|
|
|
|
|
|
|
private:
|
2022-09-21 05:18:07 +00:00
|
|
|
f32 minX, minY, minZ;
|
|
|
|
f32 maxX, maxY, maxZ;
|
|
|
|
|
|
|
|
static CAABox mskInvertedBox;
|
|
|
|
static CAABox mskNullBox;
|
2022-07-26 04:36:32 +00:00
|
|
|
};
|
2022-08-13 01:26:00 +00:00
|
|
|
CHECK_SIZEOF(CAABox, 0x18)
|
2022-07-26 04:36:32 +00:00
|
|
|
|
|
|
|
#endif // __CAABOX_HPP__
|