summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/@GlobalScope.xml7
-rw-r--r--doc/classes/AnimationTree.xml4
-rw-r--r--doc/classes/BitmapFont.xml11
-rw-r--r--doc/classes/ConvexPolygonShape2D.xml2
-rw-r--r--doc/classes/DirectionalLight3D.xml8
-rw-r--r--doc/classes/DynamicFontData.xml2
-rw-r--r--doc/classes/Font.xml11
-rw-r--r--doc/classes/Geometry2D.xml (renamed from doc/classes/Geometry.xml)232
-rw-r--r--doc/classes/Geometry3D.xml194
-rw-r--r--doc/classes/ProjectSettings.xml2
-rw-r--r--doc/classes/Rect2i.xml122
-rw-r--r--doc/classes/RichTextLabel.xml4
-rw-r--r--doc/classes/TabContainer.xml4
-rw-r--r--doc/classes/Vector2i.xml29
-rw-r--r--doc/classes/Vector3i.xml32
-rwxr-xr-xdoc/tools/makerst.py72
16 files changed, 434 insertions, 302 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 03eb733e54..41811a48b1 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -27,8 +27,11 @@
<member name="Engine" type="Engine" setter="" getter="">
The [Engine] singleton.
</member>
- <member name="Geometry" type="Geometry" setter="" getter="">
- The [Geometry] singleton.
+ <member name="Geometry2D" type="Geometry2D" setter="" getter="">
+ The [Geometry2D] singleton.
+ </member>
+ <member name="Geometry3D" type="Geometry3D" setter="" getter="">
+ The [Geometry3D] singleton.
</member>
<member name="IP" type="IP" setter="" getter="">
The [IP] singleton.
diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml
index 9642dd1c70..dd04f4ce3f 100644
--- a/doc/classes/AnimationTree.xml
+++ b/doc/classes/AnimationTree.xml
@@ -4,6 +4,7 @@
A node to be used for advanced animation transitions in an [AnimationPlayer].
</brief_description>
<description>
+ Note: When linked with an [AnimationPlayer], several properties and methods of the corresponding [AnimationPlayer] will not function as expected. Playback and transitions should be handled using only the [AnimationTree] and its constituent [AnimationNode](s). The [AnimationPlayer] node should be used solely for adding, deleting, and editing animations.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
@@ -23,6 +24,7 @@
<return type="Transform">
</return>
<description>
+ Retrieve the motion of the [member root_motion_track] as a [Transform] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM], returns an identity transformation.
</description>
</method>
<method name="rename_parameter">
@@ -47,6 +49,8 @@
The process mode of this [AnimationTree]. See [enum AnimationProcessMode] for available modes.
</member>
<member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)">
+ The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
+ If the track has type [constant Animation.TYPE_TRANSFORM], the transformation will be cancelled visually, and the animation will appear to stay in place.
</member>
<member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root">
The root animation node of this [AnimationTree]. See [AnimationNode].
diff --git a/doc/classes/BitmapFont.xml b/doc/classes/BitmapFont.xml
index 421b405808..87cffdaca0 100644
--- a/doc/classes/BitmapFont.xml
+++ b/doc/classes/BitmapFont.xml
@@ -65,17 +65,6 @@
Creates a BitmapFont from the [code]*.fnt[/code] file at [code]path[/code].
</description>
</method>
- <method name="get_char_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="char" type="int">
- </argument>
- <argument index="1" name="next" type="int" default="0">
- </argument>
- <description>
- Returns the size of a character, optionally taking kerning into account if the next character is provided.
- </description>
- </method>
<method name="get_kerning_pair" qualifiers="const">
<return type="int">
</return>
diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml
index cba446fff8..42951e2158 100644
--- a/doc/classes/ConvexPolygonShape2D.xml
+++ b/doc/classes/ConvexPolygonShape2D.xml
@@ -16,7 +16,7 @@
<argument index="0" name="point_cloud" type="PackedVector2Array">
</argument>
<description>
- Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry.convex_hull_2d] for details.
+ Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry2D.convex_hull] for details.
</description>
</method>
</methods>
diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml
index 6c88dcf42e..f66be6ddde 100644
--- a/doc/classes/DirectionalLight3D.xml
+++ b/doc/classes/DirectionalLight3D.xml
@@ -42,19 +42,19 @@
</members>
<constants>
<constant name="SHADOW_ORTHOGONAL" value="0" enum="ShadowMode">
- Renders the entire scene's shadow map from an orthogonal point of view. May result in blockier shadows on close objects.
+ Renders the entire scene's shadow map from an orthogonal point of view. This is the fastest directional shadow mode. May result in blurrier shadows on close objects.
</constant>
<constant name="SHADOW_PARALLEL_2_SPLITS" value="1" enum="ShadowMode">
- Splits the view frustum in 2 areas, each with its own shadow map.
+ Splits the view frustum in 2 areas, each with its own shadow map. This shadow mode is a compromise between [constant SHADOW_ORTHOGONAL] and [constant SHADOW_PARALLEL_4_SPLITS] in terms of performance.
</constant>
<constant name="SHADOW_PARALLEL_4_SPLITS" value="2" enum="ShadowMode">
- Splits the view frustum in 4 areas, each with its own shadow map.
+ Splits the view frustum in 4 areas, each with its own shadow map. This is the slowest directional shadow mode.
</constant>
<constant name="SHADOW_DEPTH_RANGE_STABLE" value="0" enum="ShadowDepthRange">
Keeps the shadow stable when the camera moves, at the cost of lower effective shadow resolution.
</constant>
<constant name="SHADOW_DEPTH_RANGE_OPTIMIZED" value="1" enum="ShadowDepthRange">
- Tries to achieve maximum shadow resolution. May result in saw effect on shadow edges.
+ Tries to achieve maximum shadow resolution. May result in saw effect on shadow edges. This mode typically works best in games where the camera will often move at high speeds, such as most racing games.
</constant>
</constants>
</class>
diff --git a/doc/classes/DynamicFontData.xml b/doc/classes/DynamicFontData.xml
index 2b4ec17bf1..483da96f3f 100644
--- a/doc/classes/DynamicFontData.xml
+++ b/doc/classes/DynamicFontData.xml
@@ -12,7 +12,7 @@
</methods>
<members>
<member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased" default="true">
- If [code]true[/code], the font is rendered with anti-aliasing.
+ If [code]true[/code], the font is rendered with anti-aliasing. This property applies both to the main font and its outline (if it has one).
</member>
<member name="font_path" type="String" setter="set_font_path" getter="get_font_path" default="&quot;&quot;">
The path to the vector font file.
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 882f819e37..30b8c1fe76 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -54,6 +54,17 @@
Returns the font ascent (number of pixels above the baseline).
</description>
</method>
+ <method name="get_char_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="char" type="int">
+ </argument>
+ <argument index="1" name="next" type="int" default="0">
+ </argument>
+ <description>
+ Returns the size of a character, optionally taking kerning into account if the next character is provided.
+ </description>
+ </method>
<method name="get_descent" qualifiers="const">
<return type="float">
</return>
diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry2D.xml
index 4d6f7b60a3..ffd4bd108d 100644
--- a/doc/classes/Geometry.xml
+++ b/doc/classes/Geometry2D.xml
@@ -1,67 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Geometry" inherits="Object" version="4.0">
+<class name="Geometry2D" inherits="Object" version="4.0">
<brief_description>
- Helper node to calculate generic geometry operations.
+ Helper node to calculate generic geometry operations in 2D space.
</brief_description>
<description>
- Geometry provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations.
+ Geometry2D provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="build_box_planes">
- <return type="Array">
- </return>
- <argument index="0" name="extents" type="Vector3">
- </argument>
- <description>
- Returns an array with 6 [Plane]s that describe the sides of a box centered at the origin. The box size is defined by [code]extents[/code], which represents one (positive) corner of the box (i.e. half its actual size).
- </description>
- </method>
- <method name="build_capsule_planes">
- <return type="Array">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <argument index="1" name="height" type="float">
- </argument>
- <argument index="2" name="sides" type="int">
- </argument>
- <argument index="3" name="lats" type="int">
- </argument>
- <argument index="4" name="axis" type="int" enum="Vector3.Axis" default="2">
- </argument>
- <description>
- Returns an array of [Plane]s closely bounding a faceted capsule centered at the origin with radius [code]radius[/code] and height [code]height[/code]. The parameter [code]sides[/code] defines how many planes will be generated for the side part of the capsule, whereas [code]lats[/code] gives the number of latitudinal steps at the bottom and top of the capsule. The parameter [code]axis[/code] describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z).
- </description>
- </method>
- <method name="build_cylinder_planes">
- <return type="Array">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <argument index="1" name="height" type="float">
- </argument>
- <argument index="2" name="sides" type="int">
- </argument>
- <argument index="3" name="axis" type="int" enum="Vector3.Axis" default="2">
- </argument>
- <description>
- Returns an array of [Plane]s closely bounding a faceted cylinder centered at the origin with radius [code]radius[/code] and height [code]height[/code]. The parameter [code]sides[/code] defines how many planes will be generated for the round part of the cylinder. The parameter [code]axis[/code] describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z).
- </description>
- </method>
- <method name="clip_polygon">
- <return type="PackedVector3Array">
- </return>
- <argument index="0" name="points" type="PackedVector3Array">
- </argument>
- <argument index="1" name="plane" type="Plane">
- </argument>
- <description>
- Clips the polygon defined by the points in [code]points[/code] against the [code]plane[/code] and returns the points of the clipped polygon.
- </description>
- </method>
- <method name="clip_polygons_2d">
+ <method name="clip_polygons">
<return type="Array">
</return>
<argument index="0" name="polygon_a" type="PackedVector2Array">
@@ -73,7 +21,7 @@
If [code]polygon_b[/code] is enclosed by [code]polygon_a[/code], returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
- <method name="clip_polyline_with_polygon_2d">
+ <method name="clip_polyline_with_polygon">
<return type="Array">
</return>
<argument index="0" name="polyline" type="PackedVector2Array">
@@ -84,7 +32,7 @@
Clips [code]polyline[/code] against [code]polygon[/code] and returns an array of clipped polylines. This performs [constant OPERATION_DIFFERENCE] between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape.
</description>
</method>
- <method name="convex_hull_2d">
+ <method name="convex_hull">
<return type="PackedVector2Array">
</return>
<argument index="0" name="points" type="PackedVector2Array">
@@ -93,7 +41,7 @@
Given an array of [Vector2]s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one.
</description>
</method>
- <method name="exclude_polygons_2d">
+ <method name="exclude_polygons">
<return type="Array">
</return>
<argument index="0" name="polygon_a" type="PackedVector2Array">
@@ -101,24 +49,11 @@
<argument index="1" name="polygon_b" type="PackedVector2Array">
</argument>
<description>
- Mutually excludes common area defined by intersection of [code]polygon_a[/code] and [code]polygon_b[/code] (see [method intersect_polygons_2d]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons.
+ Mutually excludes common area defined by intersection of [code]polygon_a[/code] and [code]polygon_b[/code] (see [method intersect_polygons]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons.
The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
<method name="get_closest_point_to_segment">
- <return type="Vector3">
- </return>
- <argument index="0" name="point" type="Vector3">
- </argument>
- <argument index="1" name="s1" type="Vector3">
- </argument>
- <argument index="2" name="s2" type="Vector3">
- </argument>
- <description>
- Returns the 3D point on the 3D segment ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment.
- </description>
- </method>
- <method name="get_closest_point_to_segment_2d">
<return type="Vector2">
</return>
<argument index="0" name="point" type="Vector2">
@@ -132,19 +67,6 @@
</description>
</method>
<method name="get_closest_point_to_segment_uncapped">
- <return type="Vector3">
- </return>
- <argument index="0" name="point" type="Vector3">
- </argument>
- <argument index="1" name="s1" type="Vector3">
- </argument>
- <argument index="2" name="s2" type="Vector3">
- </argument>
- <description>
- Returns the 3D point on the 3D line defined by ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point can be inside the segment ([code]s1[/code], [code]s2[/code]) or outside of it, i.e. somewhere on the line extending from the segment.
- </description>
- </method>
- <method name="get_closest_point_to_segment_uncapped_2d">
<return type="Vector2">
</return>
<argument index="0" name="point" type="Vector2">
@@ -158,21 +80,6 @@
</description>
</method>
<method name="get_closest_points_between_segments">
- <return type="PackedVector3Array">
- </return>
- <argument index="0" name="p1" type="Vector3">
- </argument>
- <argument index="1" name="p2" type="Vector3">
- </argument>
- <argument index="2" name="q1" type="Vector3">
- </argument>
- <argument index="3" name="q2" type="Vector3">
- </argument>
- <description>
- Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
- </description>
- </method>
- <method name="get_closest_points_between_segments_2d">
<return type="PackedVector2Array">
</return>
<argument index="0" name="p1" type="Vector2">
@@ -187,16 +94,7 @@
Given the two 2D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
</description>
</method>
- <method name="get_uv84_normal_bit">
- <return type="int">
- </return>
- <argument index="0" name="normal" type="Vector3">
- </argument>
- <description>
- Used internally by the engine.
- </description>
- </method>
- <method name="intersect_polygons_2d">
+ <method name="intersect_polygons">
<return type="Array">
</return>
<argument index="0" name="polygon_a" type="PackedVector2Array">
@@ -208,7 +106,7 @@
The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
- <method name="intersect_polyline_with_polygon_2d">
+ <method name="intersect_polyline_with_polygon">
<return type="Array">
</return>
<argument index="0" name="polyline" type="PackedVector2Array">
@@ -252,7 +150,7 @@
Returns [code]true[/code] if [code]polygon[/code]'s vertices are ordered in clockwise order, otherwise returns [code]false[/code].
</description>
</method>
- <method name="line_intersects_line_2d">
+ <method name="line_intersects_line">
<return type="Variant">
</return>
<argument index="0" name="from_a" type="Vector2">
@@ -277,7 +175,7 @@
Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is a vector of [Vector2] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2].
</description>
</method>
- <method name="merge_polygons_2d">
+ <method name="merge_polygons">
<return type="Array">
</return>
<argument index="0" name="polygon_a" type="PackedVector2Array">
@@ -289,14 +187,14 @@
The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
- <method name="offset_polygon_2d">
+ <method name="offset_polygon">
<return type="Array">
</return>
<argument index="0" name="polygon" type="PackedVector2Array">
</argument>
<argument index="1" name="delta" type="float">
</argument>
- <argument index="2" name="join_type" type="int" enum="Geometry.PolyJoinType" default="0">
+ <argument index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0">
</argument>
<description>
Inflates or deflates [code]polygon[/code] by [code]delta[/code] units (pixels). If [code]delta[/code] is positive, makes the polygon grow outward. If [code]delta[/code] is negative, shrinks the polygon inward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. Returns an empty array if [code]delta[/code] is negative and the absolute value of it approximately exceeds the minimum bounding rectangle dimensions of the polygon.
@@ -304,16 +202,16 @@
The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
- <method name="offset_polyline_2d">
+ <method name="offset_polyline">
<return type="Array">
</return>
<argument index="0" name="polyline" type="PackedVector2Array">
</argument>
<argument index="1" name="delta" type="float">
</argument>
- <argument index="2" name="join_type" type="int" enum="Geometry.PolyJoinType" default="0">
+ <argument index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0">
</argument>
- <argument index="3" name="end_type" type="int" enum="Geometry.PolyEndType" default="3">
+ <argument index="3" name="end_type" type="int" enum="Geometry2D.PolyEndType" default="3">
</argument>
<description>
Inflates or deflates [code]polyline[/code] by [code]delta[/code] units (pixels), producing polygons. If [code]delta[/code] is positive, makes the polyline grow outward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. If [code]delta[/code] is negative, returns an empty array.
@@ -337,67 +235,7 @@
Returns if [code]point[/code] is inside the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code].
</description>
</method>
- <method name="ray_intersects_triangle">
- <return type="Variant">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="dir" type="Vector3">
- </argument>
- <argument index="2" name="a" type="Vector3">
- </argument>
- <argument index="3" name="b" type="Vector3">
- </argument>
- <argument index="4" name="c" type="Vector3">
- </argument>
- <description>
- Tests if the 3D ray starting at [code]from[/code] with the direction of [code]dir[/code] intersects the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [Variant] is returned.
- </description>
- </method>
- <method name="segment_intersects_circle">
- <return type="float">
- </return>
- <argument index="0" name="segment_from" type="Vector2">
- </argument>
- <argument index="1" name="segment_to" type="Vector2">
- </argument>
- <argument index="2" name="circle_position" type="Vector2">
- </argument>
- <argument index="3" name="circle_radius" type="float">
- </argument>
- <description>
- Given the 2D segment ([code]segment_from[/code], [code]segment_to[/code]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [code]circle_position[/code] and has radius [code]circle_radius[/code]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not).
- </description>
- </method>
- <method name="segment_intersects_convex">
- <return type="PackedVector3Array">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="to" type="Vector3">
- </argument>
- <argument index="2" name="planes" type="Array">
- </argument>
- <description>
- Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty.
- </description>
- </method>
- <method name="segment_intersects_cylinder">
- <return type="PackedVector3Array">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="to" type="Vector3">
- </argument>
- <argument index="2" name="height" type="float">
- </argument>
- <argument index="3" name="radius" type="float">
- </argument>
- <description>
- Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection.
- </description>
- </method>
- <method name="segment_intersects_segment_2d">
+ <method name="segment_intersects_segment">
<return type="Variant">
</return>
<argument index="0" name="from_a" type="Vector2">
@@ -412,39 +250,7 @@
Checks if the two segments ([code]from_a[/code], [code]to_a[/code]) and ([code]from_b[/code], [code]to_b[/code]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns an empty [Variant].
</description>
</method>
- <method name="segment_intersects_sphere">
- <return type="PackedVector3Array">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="to" type="Vector3">
- </argument>
- <argument index="2" name="sphere_position" type="Vector3">
- </argument>
- <argument index="3" name="sphere_radius" type="float">
- </argument>
- <description>
- Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection.
- </description>
- </method>
- <method name="segment_intersects_triangle">
- <return type="Variant">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="to" type="Vector3">
- </argument>
- <argument index="2" name="a" type="Vector3">
- </argument>
- <argument index="3" name="b" type="Vector3">
- </argument>
- <argument index="4" name="c" type="Vector3">
- </argument>
- <description>
- Tests if the segment ([code]from[/code], [code]to[/code]) intersects the triangle [code]a[/code], [code]b[/code], [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [Variant] is returned.
- </description>
- </method>
- <method name="triangulate_delaunay_2d">
+ <method name="triangulate_delaunay">
<return type="PackedInt32Array">
</return>
<argument index="0" name="points" type="PackedVector2Array">
diff --git a/doc/classes/Geometry3D.xml b/doc/classes/Geometry3D.xml
new file mode 100644
index 0000000000..ec685a5ce7
--- /dev/null
+++ b/doc/classes/Geometry3D.xml
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Geometry3D" inherits="Object" version="4.0">
+ <brief_description>
+ Helper node to calculate generic geometry operations in 3D space.
+ </brief_description>
+ <description>
+ Geometry3D provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="build_box_planes">
+ <return type="Array">
+ </return>
+ <argument index="0" name="extents" type="Vector3">
+ </argument>
+ <description>
+ Returns an array with 6 [Plane]s that describe the sides of a box centered at the origin. The box size is defined by [code]extents[/code], which represents one (positive) corner of the box (i.e. half its actual size).
+ </description>
+ </method>
+ <method name="build_capsule_planes">
+ <return type="Array">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <argument index="1" name="height" type="float">
+ </argument>
+ <argument index="2" name="sides" type="int">
+ </argument>
+ <argument index="3" name="lats" type="int">
+ </argument>
+ <argument index="4" name="axis" type="int" enum="Vector3.Axis" default="2">
+ </argument>
+ <description>
+ Returns an array of [Plane]s closely bounding a faceted capsule centered at the origin with radius [code]radius[/code] and height [code]height[/code]. The parameter [code]sides[/code] defines how many planes will be generated for the side part of the capsule, whereas [code]lats[/code] gives the number of latitudinal steps at the bottom and top of the capsule. The parameter [code]axis[/code] describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z).
+ </description>
+ </method>
+ <method name="build_cylinder_planes">
+ <return type="Array">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <argument index="1" name="height" type="float">
+ </argument>
+ <argument index="2" name="sides" type="int">
+ </argument>
+ <argument index="3" name="axis" type="int" enum="Vector3.Axis" default="2">
+ </argument>
+ <description>
+ Returns an array of [Plane]s closely bounding a faceted cylinder centered at the origin with radius [code]radius[/code] and height [code]height[/code]. The parameter [code]sides[/code] defines how many planes will be generated for the round part of the cylinder. The parameter [code]axis[/code] describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z).
+ </description>
+ </method>
+ <method name="clip_polygon">
+ <return type="PackedVector3Array">
+ </return>
+ <argument index="0" name="points" type="PackedVector3Array">
+ </argument>
+ <argument index="1" name="plane" type="Plane">
+ </argument>
+ <description>
+ Clips the polygon defined by the points in [code]points[/code] against the [code]plane[/code] and returns the points of the clipped polygon.
+ </description>
+ </method>
+ <method name="get_closest_point_to_segment">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="point" type="Vector3">
+ </argument>
+ <argument index="1" name="s1" type="Vector3">
+ </argument>
+ <argument index="2" name="s2" type="Vector3">
+ </argument>
+ <description>
+ Returns the 3D point on the 3D segment ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment.
+ </description>
+ </method>
+ <method name="get_closest_point_to_segment_uncapped">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="point" type="Vector3">
+ </argument>
+ <argument index="1" name="s1" type="Vector3">
+ </argument>
+ <argument index="2" name="s2" type="Vector3">
+ </argument>
+ <description>
+ Returns the 3D point on the 3D line defined by ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point can be inside the segment ([code]s1[/code], [code]s2[/code]) or outside of it, i.e. somewhere on the line extending from the segment.
+ </description>
+ </method>
+ <method name="get_closest_points_between_segments">
+ <return type="PackedVector3Array">
+ </return>
+ <argument index="0" name="p1" type="Vector3">
+ </argument>
+ <argument index="1" name="p2" type="Vector3">
+ </argument>
+ <argument index="2" name="q1" type="Vector3">
+ </argument>
+ <argument index="3" name="q2" type="Vector3">
+ </argument>
+ <description>
+ Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
+ </description>
+ </method>
+ <method name="get_uv84_normal_bit">
+ <return type="int">
+ </return>
+ <argument index="0" name="normal" type="Vector3">
+ </argument>
+ <description>
+ Used internally by the engine.
+ </description>
+ </method>
+ <method name="ray_intersects_triangle">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="dir" type="Vector3">
+ </argument>
+ <argument index="2" name="a" type="Vector3">
+ </argument>
+ <argument index="3" name="b" type="Vector3">
+ </argument>
+ <argument index="4" name="c" type="Vector3">
+ </argument>
+ <description>
+ Tests if the 3D ray starting at [code]from[/code] with the direction of [code]dir[/code] intersects the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [Variant] is returned.
+ </description>
+ </method>
+ <method name="segment_intersects_convex">
+ <return type="PackedVector3Array">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <argument index="2" name="planes" type="Array">
+ </argument>
+ <description>
+ Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty.
+ </description>
+ </method>
+ <method name="segment_intersects_cylinder">
+ <return type="PackedVector3Array">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <argument index="2" name="height" type="float">
+ </argument>
+ <argument index="3" name="radius" type="float">
+ </argument>
+ <description>
+ Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection.
+ </description>
+ </method>
+ <method name="segment_intersects_sphere">
+ <return type="PackedVector3Array">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <argument index="2" name="sphere_position" type="Vector3">
+ </argument>
+ <argument index="3" name="sphere_radius" type="float">
+ </argument>
+ <description>
+ Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection.
+ </description>
+ </method>
+ <method name="segment_intersects_triangle">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <argument index="2" name="a" type="Vector3">
+ </argument>
+ <argument index="3" name="b" type="Vector3">
+ </argument>
+ <argument index="4" name="c" type="Vector3">
+ </argument>
+ <description>
+ Tests if the segment ([code]from[/code], [code]to[/code]) intersects the triangle [code]a[/code], [code]b[/code], [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [Variant] is returned.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index daf8cb1d2f..92e5b4a84f 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -137,7 +137,7 @@
<argument index="0" name="file" type="String">
</argument>
<description>
- Saves the configuration to a custom file.
+ Saves the configuration to a custom file. The file extension must be [code].godot[/code] (to save in text-based [ConfigFile] format) or [code].binary[/code] (to save in binary format).
</description>
</method>
<method name="set_initial_value">
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
index 2e8be384c1..f3a7ba0476 100644
--- a/doc/classes/Rect2i.xml
+++ b/doc/classes/Rect2i.xml
@@ -46,7 +46,129 @@
Constructs a new [Rect2i] from [Rect2]. The floating point coordinates will be truncated.
</description>
</method>
+ <method name="abs">
+ <return type="Rect2i">
+ </return>
+ <description>
+ Returns a [Rect2i] with equivalent position and area, modified so that the top-left corner is the origin and [code]width[/code] and [code]height[/code] are positive.
+ </description>
+ </method>
+ <method name="clip">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="b" type="Rect2i">
+ </argument>
+ <description>
+ Returns the intersection of this [Rect2i] and b.
+ </description>
+ </method>
+ <method name="encloses">
+ <return type="bool">
+ </return>
+ <argument index="0" name="b" type="Rect2i">
+ </argument>
+ <description>
+ Returns [code]true[/code] if this [Rect2i] completely encloses another one.
+ </description>
+ </method>
+ <method name="expand">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="to" type="Vector2i">
+ </argument>
+ <description>
+ Returns this [Rect2i] expanded to include a given point.
+ </description>
+ </method>
+ <method name="get_area">
+ <return type="int">
+ </return>
+ <description>
+ Returns the area of the [Rect2i].
+ </description>
+ </method>
+ <method name="grow">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="by" type="int">
+ </argument>
+ <description>
+ Returns a copy of the [Rect2i] grown a given amount of units towards all the sides.
+ </description>
+ </method>
+ <method name="grow_individual">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="left" type="int">
+ </argument>
+ <argument index="1" name="top" type="int">
+ </argument>
+ <argument index="2" name="right" type="int">
+ </argument>
+ <argument index="3" name=" bottom" type="int">
+ </argument>
+ <description>
+ Returns a copy of the [Rect2i] grown a given amount of units towards each direction individually.
+ </description>
+ </method>
+ <method name="grow_margin">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="margin" type="int">
+ </argument>
+ <argument index="1" name="by" type="int">
+ </argument>
+ <description>
+ Returns a copy of the [Rect2i] grown a given amount of units towards the [enum Margin] direction.
+ </description>
+ </method>
+ <method name="has_no_area">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the [Rect2i] is flat or empty.
+ </description>
+ </method>
+ <method name="has_point">
+ <return type="bool">
+ </return>
+ <argument index="0" name="point" type="Vector2i">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the [Rect2i] contains a point.
+ </description>
+ </method>
+ <method name="intersects">
+ <return type="bool">
+ </return>
+ <argument index="0" name="b" type="Rect2i">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the [Rect2i] overlaps with [code]b[/code] (i.e. they have at least one point in common).
+ If [code]include_borders[/code] is [code]true[/code], they will also be considered overlapping if their borders touch, even without intersection.
+ </description>
+ </method>
+ <method name="merge">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="b" type="Rect2i">
+ </argument>
+ <description>
+ Returns a larger [Rect2i] that contains this [Rect2i] and [code]b[/code].
+ </description>
+ </method>
</methods>
+ <members>
+ <member name="end" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )">
+ Ending corner.
+ </member>
+ <member name="position" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )">
+ Position (starting corner).
+ </member>
+ <member name="size" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )">
+ Size from position to end.
+ </member>
+ </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index efc0c9d600..db036d7d88 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -20,8 +20,10 @@
</argument>
<argument index="2" name="height" type="int" default="0">
</argument>
+ <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
<description>
- Adds an image's opening and closing tags to the tag stack, optionally providing a [code]width[/code] and [code]height[/code] to resize the image.
+ Adds an image's opening and closing tags to the tag stack, optionally providing a [code]width[/code] and [code]height[/code] to resize the image and a [code]color[/code] to tint the image.
If [code]width[/code] or [code]height[/code] is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
</description>
</method>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 22e92ae5d9..d56781105b 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -204,8 +204,8 @@
<theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Font color of the currently selected tab.
</theme_item>
- <theme_item name="hseparation" type="int" default="4">
- Horizontal separation between tabs.
+ <theme_item name="icon_separation" type="int" default="4">
+ Space between tab's name and its icon.
</theme_item>
<theme_item name="increment" type="Texture2D">
Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent.
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index a516eb01dd..71c7aaa4e5 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -31,7 +31,36 @@
Constructs a new [Vector2i] from [Vector2]. The floating point coordinates will be truncated.
</description>
</method>
+ <method name="abs">
+ <return type="Vector2i">
+ </return>
+ <description>
+ Returns a new vector with all components in absolute values (i.e. positive).
+ </description>
+ </method>
+ <method name="aspect">
+ <return type="float">
+ </return>
+ <description>
+ Returns the ratio of [member x] to [member y].
+ </description>
+ </method>
+ <method name="sign">
+ <return type="Vector2i">
+ </return>
+ <description>
+ Returns the vector with each component set to one or negative one, depending on the signs of the components.
+ </description>
+ </method>
</methods>
+ <members>
+ <member name="x" type="int" setter="" getter="" default="0">
+ The vector's X component. Also accessible by using the index position [code][0][/code].
+ </member>
+ <member name="y" type="int" setter="" getter="" default="0">
+ The vector's Y component. Also accessible by using the index position [code][1][/code].
+ </member>
+ </members>
<constants>
<constant name="AXIS_X" value="0">
Enumerated value for the X axis.
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index 4f5a658b89..c5aa3d0347 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -33,7 +33,39 @@
Constructs a new [Vector3i] from [Vector3]. The floating point coordinates will be truncated.
</description>
</method>
+ <method name="max_axis">
+ <return type="int">
+ </return>
+ <description>
+ Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants.
+ </description>
+ </method>
+ <method name="min_axis">
+ <return type="int">
+ </return>
+ <description>
+ Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants.
+ </description>
+ </method>
+ <method name="sign">
+ <return type="Vector3i">
+ </return>
+ <description>
+ Returns the vector with each component set to one or negative one, depending on the signs of the components.
+ </description>
+ </method>
</methods>
+ <members>
+ <member name="x" type="int" setter="" getter="" default="0">
+ The vector's X component. Also accessible by using the index position [code][0][/code].
+ </member>
+ <member name="y" type="int" setter="" getter="" default="0">
+ The vector's Y component. Also accessible by using the index position [code][1][/code].
+ </member>
+ <member name="z" type="int" setter="" getter="" default="0">
+ The vector's Z component. Also accessible by using the index position [code][2][/code].
+ </member>
+ </members>
<constants>
<constant name="AXIS_X" value="0">
Enumerated value for the X axis.
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py
index a14ef7c665..c0bba38799 100755
--- a/doc/tools/makerst.py
+++ b/doc/tools/makerst.py
@@ -287,6 +287,8 @@ def main(): # type: () -> None
)
args = parser.parse_args()
+ print("Checking for errors in the XML class reference...")
+
file_list = [] # type: List[str]
for path in args.path:
@@ -345,7 +347,10 @@ def main(): # type: () -> None
state.current_class = class_name
make_rst_class(class_def, state, args.dry_run, args.output)
- if state.errored:
+ if not state.errored:
+ print("No errors found.")
+ else:
+ print("Errors were found in the class reference XML. Please check the messages above.")
exit(1)
@@ -561,71 +566,6 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S
index += 1
-def make_class_list(class_list, columns): # type: (List[str], int) -> None
- # This function is no longer used.
- f = open("class_list.rst", "w", encoding="utf-8")
- col_max = len(class_list) // columns + 1
- print(("col max is ", col_max))
- fit_columns = [] # type: List[List[str]]
-
- for _ in range(0, columns):
- fit_columns.append([])
-
- indexers = [] # type List[str]
- last_initial = ""
-
- for idx, name in enumerate(class_list):
- col = idx // col_max
- if col >= columns:
- col = columns - 1
- fit_columns[col].append(name)
- idx += 1
- if name[:1] != last_initial:
- indexers.append(name)
- last_initial = name[:1]
-
- row_max = 0
- f.write("\n")
-
- for n in range(0, columns):
- if len(fit_columns[n]) > row_max:
- row_max = len(fit_columns[n])
-
- f.write("| ")
- for n in range(0, columns):
- f.write(" | |")
-
- f.write("\n")
- f.write("+")
- for n in range(0, columns):
- f.write("--+-------+")
- f.write("\n")
-
- for r in range(0, row_max):
- s = "+ "
- for c in range(0, columns):
- if r >= len(fit_columns[c]):
- continue
-
- classname = fit_columns[c][r]
- initial = classname[0]
- if classname in indexers:
- s += "**" + initial + "** | "
- else:
- s += " | "
-
- s += "[" + classname + "](class_" + classname.lower() + ") | "
-
- s += "\n"
- f.write(s)
-
- for n in range(0, columns):
- f.write("--+-------+")
- f.write("\n")
-
- f.close()
-
-
def escape_rst(text, until_pos=-1): # type: (str) -> str
# Escape \ character, otherwise it ends up as an escape character in rst
pos = 0