summaryrefslogtreecommitdiff
path: root/core/math/aabb.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/aabb.h')
-rw-r--r--core/math/aabb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/math/aabb.h b/core/math/aabb.h
index 4106fbb93c..bd1f3a1a36 100644
--- a/core/math/aabb.h
+++ b/core/math/aabb.h
@@ -99,6 +99,10 @@ public:
_FORCE_INLINE_ void project_range_in_plane(const Plane &p_plane, real_t &r_min, real_t &r_max) const;
_FORCE_INLINE_ void expand_to(const Vector3 &p_vector); /** expand to contain a point if necessary */
+ _FORCE_INLINE_ AABB abs() const {
+ return AABB(Vector3(position.x + MIN(size.x, 0), position.y + MIN(size.y, 0), position.z + MIN(size.z, 0)), size.abs());
+ }
+
operator String() const;
_FORCE_INLINE_ AABB() {}