diff options
Diffstat (limited to 'gfx/aabb.cpp')
-rw-r--r-- | gfx/aabb.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gfx/aabb.cpp b/gfx/aabb.cpp index 862dacb..0a04ef4 100644 --- a/gfx/aabb.cpp +++ b/gfx/aabb.cpp @@ -22,3 +22,9 @@ AxisAlignedBoundingBox::operator+=(const GlobalPosition3D & point) max = glm::max(max, point); return *this; } + +AxisAlignedBoundingBox +AxisAlignedBoundingBox::operator-(const GlobalPosition3D & viewPoint) const +{ + return {min - viewPoint, max - viewPoint}; +} |