MATH: added function to obtain size of AABBs

This commit is contained in:
neuromancer 2023-05-13 19:02:11 +02:00
parent 3eaebb47e2
commit 2e45130a70

View file

@ -38,6 +38,7 @@ public:
void transform(const Math::Matrix4 &matrix); void transform(const Math::Matrix4 &matrix);
Math::Vector3d getMin() const { return _min; } Math::Vector3d getMin() const { return _min; }
Math::Vector3d getMax() const { return _max; } Math::Vector3d getMax() const { return _max; }
Math::Vector3d getSize() const { return _max - _min; }
bool isValid() const { return _valid; } bool isValid() const { return _valid; }
bool collides(const AABB &aabb); bool collides(const AABB &aabb);