summaryrefslogtreecommitdiff
path: root/core/math/aabb.h
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2020-07-21 14:07:00 -0400
committerAaron Franke <arnfranke@yahoo.com>2020-07-21 14:44:53 -0400
commit83e324d670ca05993403c5d0ad7762aa096a7978 (patch)
treee011b47e7cf86301c72668a2e6c3a2e8ec13255d /core/math/aabb.h
parent41d6c965907730debb2bd6dcc7ccbe6f1ba5d015 (diff)
Update core documentation to match recent C# changes
Also a few minor API changes like adding AABB.abs() Co-authored-by: RĂ©mi Verschelde <rverschelde@gmail.com>
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() {}