summaryrefslogtreecommitdiff
path: root/doc/classes/AABB.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/AABB.xml')
-rw-r--r--doc/classes/AABB.xml23
1 files changed, 19 insertions, 4 deletions
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index f353cd19b8..8f0b16c09d 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -9,9 +9,9 @@
[b]Note:[/b] Unlike [Rect2], [AABB] does not have a variant that uses integer coordinates.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
- <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
+ <link title="Advanced vector math">$DOCS_URL/tutorials/math/vectors_advanced.html</link>
</tutorials>
<constructors>
<constructor name="AABB">
@@ -54,7 +54,22 @@
<return type="AABB" />
<argument index="0" name="to_point" type="Vector3" />
<description>
- Returns this [AABB] expanded to include a given point.
+ Returns a copy of this [AABB] expanded to include a given point.
+ [b]Example:[/b]
+ [codeblocks]
+ [gdscript]
+ # position (-3, 2, 0), size (1, 1, 1)
+ var box = AABB(Vector3(-3, 2, 0), Vector3(1, 1, 1))
+ # position (-3, -1, 0), size (3, 4, 2), so we fit both the original AABB and Vector3(0, -1, 2)
+ var box2 = box.expand(Vector3(0, -1, 2))
+ [/gdscript]
+ [csharp]
+ // position (-3, 2, 0), size (1, 1, 1)
+ var box = new AABB(new Vector3(-3, 2, 0), new Vector3(1, 1, 1));
+ // position (-3, -1, 0), size (3, 4, 2), so we fit both the original AABB and Vector3(0, -1, 2)
+ var box2 = box.Expand(new Vector3(0, -1, 2));
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_center" qualifiers="const">