class_navigationpathqueryresult2d.rst 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/NavigationPathQueryResult2D.xml.
  6. .. _class_NavigationPathQueryResult2D:
  7. NavigationPathQueryResult2D
  8. ===========================
  9. **Experimental:** This class may be changed or removed in future versions.
  10. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  11. Represents the result of a 2D pathfinding query.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. This class stores the result of a 2D navigation path query from the :ref:`NavigationServer2D<class_NavigationServer2D>`.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Using NavigationPathQueryObjects <../tutorials/navigation/navigation_using_navigationpathqueryobjects>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+
  26. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`path<class_NavigationPathQueryResult2D_property_path>` | ``PackedVector2Array()`` |
  27. +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+
  28. | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`path_owner_ids<class_NavigationPathQueryResult2D_property_path_owner_ids>` | ``PackedInt64Array()`` |
  29. +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+
  30. | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`path_rids<class_NavigationPathQueryResult2D_property_path_rids>` | ``[]`` |
  31. +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+
  32. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`path_types<class_NavigationPathQueryResult2D_property_path_types>` | ``PackedInt32Array()`` |
  33. +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+
  34. .. rst-class:: classref-reftable-group
  35. Methods
  36. -------
  37. .. table::
  38. :widths: auto
  39. +--------+--------------------------------------------------------------------+
  40. | |void| | :ref:`reset<class_NavigationPathQueryResult2D_method_reset>`\ (\ ) |
  41. +--------+--------------------------------------------------------------------+
  42. .. rst-class:: classref-section-separator
  43. ----
  44. .. rst-class:: classref-descriptions-group
  45. Enumerations
  46. ------------
  47. .. _enum_NavigationPathQueryResult2D_PathSegmentType:
  48. .. rst-class:: classref-enumeration
  49. enum **PathSegmentType**: :ref:`🔗<enum_NavigationPathQueryResult2D_PathSegmentType>`
  50. .. _class_NavigationPathQueryResult2D_constant_PATH_SEGMENT_TYPE_REGION:
  51. .. rst-class:: classref-enumeration-constant
  52. :ref:`PathSegmentType<enum_NavigationPathQueryResult2D_PathSegmentType>` **PATH_SEGMENT_TYPE_REGION** = ``0``
  53. This segment of the path goes through a region.
  54. .. _class_NavigationPathQueryResult2D_constant_PATH_SEGMENT_TYPE_LINK:
  55. .. rst-class:: classref-enumeration-constant
  56. :ref:`PathSegmentType<enum_NavigationPathQueryResult2D_PathSegmentType>` **PATH_SEGMENT_TYPE_LINK** = ``1``
  57. This segment of the path goes through a link.
  58. .. rst-class:: classref-section-separator
  59. ----
  60. .. rst-class:: classref-descriptions-group
  61. Property Descriptions
  62. ---------------------
  63. .. _class_NavigationPathQueryResult2D_property_path:
  64. .. rst-class:: classref-property
  65. :ref:`PackedVector2Array<class_PackedVector2Array>` **path** = ``PackedVector2Array()`` :ref:`🔗<class_NavigationPathQueryResult2D_property_path>`
  66. .. rst-class:: classref-property-setget
  67. - |void| **set_path**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ )
  68. - :ref:`PackedVector2Array<class_PackedVector2Array>` **get_path**\ (\ )
  69. The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by :ref:`NavigationServer2D.map_get_path<class_NavigationServer2D_method_map_get_path>`.
  70. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details.
  71. .. rst-class:: classref-item-separator
  72. ----
  73. .. _class_NavigationPathQueryResult2D_property_path_owner_ids:
  74. .. rst-class:: classref-property
  75. :ref:`PackedInt64Array<class_PackedInt64Array>` **path_owner_ids** = ``PackedInt64Array()`` :ref:`🔗<class_NavigationPathQueryResult2D_property_path_owner_ids>`
  76. .. rst-class:: classref-property-setget
  77. - |void| **set_path_owner_ids**\ (\ value\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ )
  78. - :ref:`PackedInt64Array<class_PackedInt64Array>` **get_path_owner_ids**\ (\ )
  79. The ``ObjectID``\ s of the :ref:`Object<class_Object>`\ s which manage the regions and links each point of the path goes through.
  80. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt64Array<class_PackedInt64Array>` for more details.
  81. .. rst-class:: classref-item-separator
  82. ----
  83. .. _class_NavigationPathQueryResult2D_property_path_rids:
  84. .. rst-class:: classref-property
  85. :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **path_rids** = ``[]`` :ref:`🔗<class_NavigationPathQueryResult2D_property_path_rids>`
  86. .. rst-class:: classref-property-setget
  87. - |void| **set_path_rids**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\]\ )
  88. - :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_path_rids**\ (\ )
  89. The :ref:`RID<class_RID>`\ s of the regions and links that each point of the path goes through.
  90. .. rst-class:: classref-item-separator
  91. ----
  92. .. _class_NavigationPathQueryResult2D_property_path_types:
  93. .. rst-class:: classref-property
  94. :ref:`PackedInt32Array<class_PackedInt32Array>` **path_types** = ``PackedInt32Array()`` :ref:`🔗<class_NavigationPathQueryResult2D_property_path_types>`
  95. .. rst-class:: classref-property-setget
  96. - |void| **set_path_types**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ )
  97. - :ref:`PackedInt32Array<class_PackedInt32Array>` **get_path_types**\ (\ )
  98. The type of navigation primitive (region or link) that each point of the path goes through.
  99. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array<class_PackedInt32Array>` for more details.
  100. .. rst-class:: classref-section-separator
  101. ----
  102. .. rst-class:: classref-descriptions-group
  103. Method Descriptions
  104. -------------------
  105. .. _class_NavigationPathQueryResult2D_method_reset:
  106. .. rst-class:: classref-method
  107. |void| **reset**\ (\ ) :ref:`🔗<class_NavigationPathQueryResult2D_method_reset>`
  108. Reset the result object to its initial state. This is useful to reuse the object across multiple queries.
  109. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  110. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  111. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  112. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  113. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  114. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  115. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  116. .. |void| replace:: :abbr:`void (No return value.)`