Skip to content
Snippets Groups Projects
Commit 98ac3237 authored by Yoel's avatar Yoel
Browse files

Added siye method for AABB

parent 37c23573
No related branches found
No related tags found
No related merge requests found
......@@ -127,6 +127,9 @@ bool AxisAlignedBoundingBox::partiallyContains(
if (contains(v)) return true;
return false;
}
float AxisAlignedBoundingBox::size() const {
return (maxBound() - minBound()).length();
}
Vec3 AxisAlignedBoundingBox::center() const {
return (max + min) / 2;
}
......
......@@ -20,6 +20,7 @@ class AxisAlignedBoundingBox {
bool contains(const Vec3& v) const;
bool contains(const AxisAlignedBoundingBox& bb) const;
bool partiallyContains(const AxisAlignedBoundingBox& bb) const;
float size() const;
Vec3 center() const;
Vec3 minBound() const;
Vec3 maxBound() const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment