summaryrefslogtreecommitdiffstats
path: root/core/math/aabb.h
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-09-21 21:30:30 +0200
committerGitHub <noreply@github.com>2021-09-21 21:30:30 +0200
commitba57252bd8d7928c29e818b1ccf557e279c33ca0 (patch)
tree6b037a4a0b8b6907d571b1b847ed6ab3bc7507c3 /core/math/aabb.h
parent726b826b310900ff475122ed65934d2499b8db4d (diff)
parent90908cd67d3f44ba70cc4b7b32f024ce508cc0ee (diff)
downloadredot-engine-ba57252bd8d7928c29e818b1ccf557e279c33ca0.tar.gz
Merge pull request #52878 from AnilBK/add-get-center
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 e16246902a..97d92fbe37 100644
--- a/core/math/aabb.h
+++ b/core/math/aabb.h
@@ -118,6 +118,10 @@ public:
return position + size;
}
+ _FORCE_INLINE_ Vector3 get_center() const {
+ return position + (size * 0.5);
+ }
+
operator String() const;
_FORCE_INLINE_ AABB() {}