diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 63f0fbb806c..1bbf88cc1f9 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -674,7 +674,7 @@ Add a custom icon to the current script. The icon specified at ``icon_path`` is **@onready** **(** **)** -Mark the following property as assigned when the :ref:`Node` is ready. Values for these properties are not assigned immediately when the node is initialized (:ref:`Object._init`), and instead are computed and stored right before :ref:`Node._ready`. +Mark the following property as assigned when the :ref:`Node` is ready. Values for these properties are not assigned immediately when the node is initialized (:ref:`Object._init`), and instead are computed and stored right before :ref:`Node._ready`. :: diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 11ca3076501..ebb7762634a 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -4134,7 +4134,7 @@ Flag for a static method. :ref:`MethodFlags` **METHOD_FLAG_OBJECT_CORE** = ``64`` -Used internally. Allows to not dump core virtual methods (such as :ref:`Object._notification`) to the JSON API. +Used internally. Allows to not dump core virtual methods (such as :ref:`Object._notification`) to the JSON API. .. _class_@GlobalScope_constant_METHOD_FLAGS_DEFAULT: @@ -5416,7 +5416,7 @@ Decodes a byte array back to a :ref:`Variant` value. Decoding obj :ref:`Variant` **ceil** **(** :ref:`Variant` x **)** -Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`. +Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3`, :ref:`Vector3i`, :ref:`Vector4`, :ref:`Vector4i`. :: @@ -5718,7 +5718,7 @@ For exponents to other bases use the method :ref:`pow` **floor** **(** :ref:`Variant` x **)** -Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`. +Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3`, :ref:`Vector3i`, :ref:`Vector4`, :ref:`Vector4i`. :: @@ -6825,7 +6825,7 @@ If ``delta`` is negative, this function will rotate away from ``to``, toward the :ref:`Variant` **round** **(** :ref:`Variant` x **)** -Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`. +Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3`, :ref:`Vector3i`, :ref:`Vector4`, :ref:`Vector4i`. :: diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index 2b0a60ea6b6..113d74bdf4e 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -585,7 +585,11 @@ Returns ``true`` if the AABBs are not equal. :ref:`AABB` **operator *** **(** :ref:`Transform3D` right **)** -Inversely transforms (multiplies) the **AABB** by the given :ref:`Transform3D` transformation matrix. +Inversely transforms (multiplies) the **AABB** by the given :ref:`Transform3D` transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). + +\ ``aabb * transform`` is equivalent to ``transform.inverse() * aabb``. See :ref:`Transform3D.inverse`. + +For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * aabb`` can be used instead. See :ref:`Transform3D.affine_inverse`. .. rst-class:: classref-item-separator diff --git a/classes/class_animation.rst b/classes/class_animation.rst index 750d1d97101..2f8b3fc1ad5 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -877,7 +877,7 @@ Compress the animation and all its tracks in-place. This will make :ref:`track_i void **copy_track** **(** :ref:`int` track_idx, :ref:`Animation` to_animation **)** -Adds a new track that is a copy of the given track from ``to_animation``. +Adds a new track to ``to_animation`` that is a copy of the given track from this animation. .. rst-class:: classref-item-separator diff --git a/classes/class_animationlibrary.rst b/classes/class_animationlibrary.rst index 58047aa5f91..3352195f83c 100644 --- a/classes/class_animationlibrary.rst +++ b/classes/class_animationlibrary.rst @@ -30,18 +30,6 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- - -.. table:: - :widths: auto - - +-------------------------------------+-----------------------------------------------------+--------+ - | :ref:`Dictionary` | :ref:`_data` | ``{}`` | - +-------------------------------------+-----------------------------------------------------+--------+ - -.. rst-class:: classref-reftable-group - Methods ------- @@ -123,25 +111,6 @@ Emitted when the key for an :ref:`Animation` is changed, from ` .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- - -.. _class_AnimationLibrary_property__data: - -.. rst-class:: classref-property - -:ref:`Dictionary` **_data** = ``{}`` - -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - Method Descriptions ------------------- diff --git a/classes/class_animationmixer.rst b/classes/class_animationmixer.rst index 619664ba3ca..6cfc7d39f55 100644 --- a/classes/class_animationmixer.rst +++ b/classes/class_animationmixer.rst @@ -59,47 +59,47 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_post_process_key_value` **(** :ref:`Animation` animation, :ref:`int` track, :ref:`Variant` value, :ref:`Object` object, :ref:`int` object_idx **)** |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`add_animation_library` **(** :ref:`StringName` name, :ref:`AnimationLibrary` library **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`advance` **(** :ref:`float` delta **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_caches` **(** **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`find_animation` **(** :ref:`Animation` animation **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`find_animation_library` **(** :ref:`Animation` animation **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Animation` | :ref:`get_animation` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationLibrary` | :ref:`get_animation_library` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName[]` | :ref:`get_animation_library_list` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_animation_list` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_root_motion_position` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_root_motion_position_accumulator` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`get_root_motion_rotation` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`get_root_motion_rotation_accumulator` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_root_motion_scale` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_root_motion_scale_accumulator` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_animation` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_animation_library` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_animation_library` **(** :ref:`StringName` name **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_animation_library` **(** :ref:`StringName` name, :ref:`StringName` newname **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_post_process_key_value` **(** :ref:`Animation` animation, :ref:`int` track, :ref:`Variant` value, :ref:`Object` object, :ref:`int` object_idx **)** |virtual| |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`add_animation_library` **(** :ref:`StringName` name, :ref:`AnimationLibrary` library **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`advance` **(** :ref:`float` delta **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_caches` **(** **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`find_animation` **(** :ref:`Animation` animation **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`find_animation_library` **(** :ref:`Animation` animation **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Animation` | :ref:`get_animation` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationLibrary` | :ref:`get_animation_library` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName[]` | :ref:`get_animation_library_list` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_animation_list` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_root_motion_position` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_root_motion_position_accumulator` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_root_motion_rotation` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_root_motion_rotation_accumulator` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_root_motion_scale` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_root_motion_scale_accumulator` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_animation` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_animation_library` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_animation_library` **(** :ref:`StringName` name **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rename_animation_library` **(** :ref:`StringName` name, :ref:`StringName` newname **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -411,7 +411,7 @@ The node from which node path references will travel. Method Descriptions ------------------- -.. _class_AnimationMixer_method__post_process_key_value: +.. _class_AnimationMixer_private_method__post_process_key_value: .. rst-class:: classref-method diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 0b1e89fa87f..0ff11fb79b9 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -53,21 +53,21 @@ Methods :widths: auto +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_caption` **(** **)** |virtual| |const| | + | :ref:`String` | :ref:`_get_caption` **(** **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationNode` | :ref:`_get_child_by_name` **(** :ref:`StringName` name **)** |virtual| |const| | + | :ref:`AnimationNode` | :ref:`_get_child_by_name` **(** :ref:`StringName` name **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_child_nodes` **(** **)** |virtual| |const| | + | :ref:`Dictionary` | :ref:`_get_child_nodes` **(** **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_parameter_default_value` **(** :ref:`StringName` parameter **)** |virtual| |const| | + | :ref:`Variant` | :ref:`_get_parameter_default_value` **(** :ref:`StringName` parameter **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`_get_parameter_list` **(** **)** |virtual| |const| | + | :ref:`Array` | :ref:`_get_parameter_list` **(** **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_filter` **(** **)** |virtual| |const| | + | :ref:`bool` | :ref:`_has_filter` **(** **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_parameter_read_only` **(** :ref:`StringName` parameter **)** |virtual| |const| | + | :ref:`bool` | :ref:`_is_parameter_read_only` **(** :ref:`StringName` parameter **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_process` **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`bool` test_only **)** |virtual| |const| | + | :ref:`float` | :ref:`_process` **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`bool` test_only **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`add_input` **(** :ref:`String` name **)** | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -215,7 +215,7 @@ If ``true``, filtering is enabled. Method Descriptions ------------------- -.. _class_AnimationNode_method__get_caption: +.. _class_AnimationNode_private_method__get_caption: .. rst-class:: classref-method @@ -227,7 +227,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen ---- -.. _class_AnimationNode_method__get_child_by_name: +.. _class_AnimationNode_private_method__get_child_by_name: .. rst-class:: classref-method @@ -239,7 +239,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen ---- -.. _class_AnimationNode_method__get_child_nodes: +.. _class_AnimationNode_private_method__get_child_nodes: .. rst-class:: classref-method @@ -251,7 +251,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen ---- -.. _class_AnimationNode_method__get_parameter_default_value: +.. _class_AnimationNode_private_method__get_parameter_default_value: .. rst-class:: classref-method @@ -263,7 +263,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen ---- -.. _class_AnimationNode_method__get_parameter_list: +.. _class_AnimationNode_private_method__get_parameter_list: .. rst-class:: classref-method @@ -275,7 +275,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen ---- -.. _class_AnimationNode_method__has_filter: +.. _class_AnimationNode_private_method__has_filter: .. rst-class:: classref-method @@ -287,7 +287,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen ---- -.. _class_AnimationNode_method__is_parameter_read_only: +.. _class_AnimationNode_private_method__is_parameter_read_only: .. rst-class:: classref-method @@ -299,7 +299,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen ---- -.. _class_AnimationNode_method__process: +.. _class_AnimationNode_private_method__process: .. rst-class:: classref-method diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index fec15fd8acd..64e7de112cf 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -32,9 +32,9 @@ Methods :widths: auto +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | + | :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | + | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_point` **(** :ref:`int` id, :ref:`Vector2` position, :ref:`float` weight_scale=1.0 **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -92,7 +92,7 @@ Methods Method Descriptions ------------------- -.. _class_AStar2D_method__compute_cost: +.. _class_AStar2D_private_method__compute_cost: .. rst-class:: classref-method @@ -106,7 +106,7 @@ Note that this function is hidden in the default **AStar2D** class. ---- -.. _class_AStar2D_method__estimate_cost: +.. _class_AStar2D_private_method__estimate_cost: .. rst-class:: classref-method @@ -128,7 +128,7 @@ void **add_point** **(** :ref:`int` id, :ref:`Vector2` Adds a new point at the given position with the given identifier. The ``id`` must be 0 or larger, and the ``weight_scale`` must be 0.0 or greater. -The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. +The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. .. tabs:: @@ -522,7 +522,7 @@ Sets the ``position`` for the point with the given ``id``. void **set_point_weight_scale** **(** :ref:`int` id, :ref:`float` weight_scale **)** -Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. +Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_astar3d.rst b/classes/class_astar3d.rst index 6f63516c7c9..89f805f764a 100644 --- a/classes/class_astar3d.rst +++ b/classes/class_astar3d.rst @@ -23,7 +23,7 @@ A\* (A star) is a computer algorithm used in pathfinding and graph traversal, th You must add points manually with :ref:`add_point` and create segments manually with :ref:`connect_points`. Once done, you can test if there is a path between two points with the :ref:`are_points_connected` function, get a path containing indices by :ref:`get_id_path`, or one containing actual coordinates with :ref:`get_point_path`. -It is also possible to use non-Euclidean distances. To do so, create a class that extends **AStar3D** and override methods :ref:`_compute_cost` and :ref:`_estimate_cost`. Both take two indices and return a length, as is shown in the following example. +It is also possible to use non-Euclidean distances. To do so, create a class that extends **AStar3D** and override methods :ref:`_compute_cost` and :ref:`_estimate_cost`. Both take two indices and return a length, as is shown in the following example. .. tabs:: @@ -56,9 +56,9 @@ It is also possible to use non-Euclidean distances. To do so, create a class tha -\ :ref:`_estimate_cost` should return a lower bound of the distance, i.e. ``_estimate_cost(u, v) <= _compute_cost(u, v)``. This serves as a hint to the algorithm because the custom :ref:`_compute_cost` might be computation-heavy. If this is not the case, make :ref:`_estimate_cost` return the same value as :ref:`_compute_cost` to provide the algorithm with the most accurate information. +\ :ref:`_estimate_cost` should return a lower bound of the distance, i.e. ``_estimate_cost(u, v) <= _compute_cost(u, v)``. This serves as a hint to the algorithm because the custom :ref:`_compute_cost` might be computation-heavy. If this is not the case, make :ref:`_estimate_cost` return the same value as :ref:`_compute_cost` to provide the algorithm with the most accurate information. -If the default :ref:`_estimate_cost` and :ref:`_compute_cost` methods are used, or if the supplied :ref:`_estimate_cost` method returns a lower bound of the cost, then the paths returned by A\* will be the lowest-cost paths. Here, the cost of a path equals the sum of the :ref:`_compute_cost` results of all segments in the path multiplied by the ``weight_scale``\ s of the endpoints of the respective segments. If the default methods are used and the ``weight_scale``\ s of all points are set to ``1.0``, then this equals the sum of Euclidean distances of all segments in the path. +If the default :ref:`_estimate_cost` and :ref:`_compute_cost` methods are used, or if the supplied :ref:`_estimate_cost` method returns a lower bound of the cost, then the paths returned by A\* will be the lowest-cost paths. Here, the cost of a path equals the sum of the :ref:`_compute_cost` results of all segments in the path multiplied by the ``weight_scale``\ s of the endpoints of the respective segments. If the default methods are used and the ``weight_scale``\ s of all points are set to ``1.0``, then this equals the sum of Euclidean distances of all segments in the path. .. rst-class:: classref-reftable-group @@ -69,9 +69,9 @@ Methods :widths: auto +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | + | :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | + | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_point` **(** :ref:`int` id, :ref:`Vector3` position, :ref:`float` weight_scale=1.0 **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -129,7 +129,7 @@ Methods Method Descriptions ------------------- -.. _class_AStar3D_method__compute_cost: +.. _class_AStar3D_private_method__compute_cost: .. rst-class:: classref-method @@ -143,7 +143,7 @@ Note that this function is hidden in the default **AStar3D** class. ---- -.. _class_AStar3D_method__estimate_cost: +.. _class_AStar3D_private_method__estimate_cost: .. rst-class:: classref-method @@ -165,7 +165,7 @@ void **add_point** **(** :ref:`int` id, :ref:`Vector3` Adds a new point at the given position with the given identifier. The ``id`` must be 0 or larger, and the ``weight_scale`` must be 0.0 or greater. -The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. +The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. .. tabs:: @@ -557,7 +557,7 @@ Sets the ``position`` for the point with the given ``id``. void **set_point_weight_scale** **(** :ref:`int` id, :ref:`float` weight_scale **)** -Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. +Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_astargrid2d.rst b/classes/class_astargrid2d.rst index d35d11dacab..ccd712b40c9 100644 --- a/classes/class_astargrid2d.rst +++ b/classes/class_astargrid2d.rst @@ -82,39 +82,39 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_compute_cost` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill_solid_region` **(** :ref:`Rect2i` region, :ref:`bool` solid=true **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill_weight_scale_region` **(** :ref:`Rect2i` region, :ref:`float` weight_scale **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]` | :ref:`get_id_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`get_point_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`Vector2i` id **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`Vector2i` id **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_dirty` **(** **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_in_bounds` **(** :ref:`int` x, :ref:`int` y **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_in_boundsv` **(** :ref:`Vector2i` id **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_point_solid` **(** :ref:`Vector2i` id **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_solid` **(** :ref:`Vector2i` id, :ref:`bool` solid=true **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_weight_scale` **(** :ref:`Vector2i` id, :ref:`float` weight_scale **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_compute_cost` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill_solid_region` **(** :ref:`Rect2i` region, :ref:`bool` solid=true **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill_weight_scale_region` **(** :ref:`Rect2i` region, :ref:`float` weight_scale **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`get_id_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_point_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`Vector2i` id **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`Vector2i` id **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_dirty` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_bounds` **(** :ref:`int` x, :ref:`int` y **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_boundsv` **(** :ref:`Vector2i` id **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_point_solid` **(** :ref:`Vector2i` id **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_point_solid` **(** :ref:`Vector2i` id, :ref:`bool` solid=true **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_point_weight_scale` **(** :ref:`Vector2i` id, :ref:`float` weight_scale **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -287,7 +287,7 @@ The size of the point cell which will be applied to calculate the resulting poin - void **set_default_compute_heuristic** **(** :ref:`Heuristic` value **)** - :ref:`Heuristic` **get_default_compute_heuristic** **(** **)** -The default :ref:`Heuristic` which will be used to calculate the cost between two points if :ref:`_compute_cost` was not overridden. +The default :ref:`Heuristic` which will be used to calculate the cost between two points if :ref:`_compute_cost` was not overridden. .. rst-class:: classref-item-separator @@ -304,7 +304,7 @@ The default :ref:`Heuristic` which will be used to c - void **set_default_estimate_heuristic** **(** :ref:`Heuristic` value **)** - :ref:`Heuristic` **get_default_estimate_heuristic** **(** **)** -The default :ref:`Heuristic` which will be used to calculate the cost between the point and the end point if :ref:`_estimate_cost` was not overridden. +The default :ref:`Heuristic` which will be used to calculate the cost between the point and the end point if :ref:`_estimate_cost` was not overridden. .. rst-class:: classref-item-separator @@ -404,7 +404,7 @@ The size of the grid (number of cells of size :ref:`cell_size