class_navigationmeshsourcegeometrydata2d.rst 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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/NavigationMeshSourceGeometryData2D.xml.
  6. .. _class_NavigationMeshSourceGeometryData2D:
  7. NavigationMeshSourceGeometryData2D
  8. ==================================
  9. **Experimental:** This class may be changed or removed in future versions.
  10. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  11. Container for parsed source geometry data used in navigation mesh baking.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. Container for parsed source geometry data used in navigation mesh baking.
  16. .. rst-class:: classref-reftable-group
  17. Methods
  18. -------
  19. .. table::
  20. :widths: auto
  21. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | |void| | :ref:`add_obstruction_outline<class_NavigationMeshSourceGeometryData2D_method_add_obstruction_outline>`\ (\ shape_outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) |
  23. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | |void| | :ref:`add_projected_obstruction<class_NavigationMeshSourceGeometryData2D_method_add_projected_obstruction>`\ (\ vertices\: :ref:`PackedVector2Array<class_PackedVector2Array>`, carve\: :ref:`bool<class_bool>`\ ) |
  25. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | |void| | :ref:`add_traversable_outline<class_NavigationMeshSourceGeometryData2D_method_add_traversable_outline>`\ (\ shape_outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) |
  27. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | |void| | :ref:`append_obstruction_outlines<class_NavigationMeshSourceGeometryData2D_method_append_obstruction_outlines>`\ (\ obstruction_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) |
  29. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | |void| | :ref:`append_traversable_outlines<class_NavigationMeshSourceGeometryData2D_method_append_traversable_outlines>`\ (\ traversable_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) |
  31. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | |void| | :ref:`clear<class_NavigationMeshSourceGeometryData2D_method_clear>`\ (\ ) |
  33. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | |void| | :ref:`clear_projected_obstructions<class_NavigationMeshSourceGeometryData2D_method_clear_projected_obstructions>`\ (\ ) |
  35. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`Rect2<class_Rect2>` | :ref:`get_bounds<class_NavigationMeshSourceGeometryData2D_method_get_bounds>`\ (\ ) |
  37. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`get_obstruction_outlines<class_NavigationMeshSourceGeometryData2D_method_get_obstruction_outlines>`\ (\ ) |const| |
  39. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`Array<class_Array>` | :ref:`get_projected_obstructions<class_NavigationMeshSourceGeometryData2D_method_get_projected_obstructions>`\ (\ ) |const| |
  41. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`get_traversable_outlines<class_NavigationMeshSourceGeometryData2D_method_get_traversable_outlines>`\ (\ ) |const| |
  43. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`bool<class_bool>` | :ref:`has_data<class_NavigationMeshSourceGeometryData2D_method_has_data>`\ (\ ) |
  45. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | |void| | :ref:`merge<class_NavigationMeshSourceGeometryData2D_method_merge>`\ (\ other_geometry\: :ref:`NavigationMeshSourceGeometryData2D<class_NavigationMeshSourceGeometryData2D>`\ ) |
  47. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | |void| | :ref:`set_obstruction_outlines<class_NavigationMeshSourceGeometryData2D_method_set_obstruction_outlines>`\ (\ obstruction_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) |
  49. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | |void| | :ref:`set_projected_obstructions<class_NavigationMeshSourceGeometryData2D_method_set_projected_obstructions>`\ (\ projected_obstructions\: :ref:`Array<class_Array>`\ ) |
  51. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | |void| | :ref:`set_traversable_outlines<class_NavigationMeshSourceGeometryData2D_method_set_traversable_outlines>`\ (\ traversable_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) |
  53. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. .. rst-class:: classref-section-separator
  55. ----
  56. .. rst-class:: classref-descriptions-group
  57. Method Descriptions
  58. -------------------
  59. .. _class_NavigationMeshSourceGeometryData2D_method_add_obstruction_outline:
  60. .. rst-class:: classref-method
  61. |void| **add_obstruction_outline**\ (\ shape_outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_add_obstruction_outline>`
  62. Adds the outline points of a shape as obstructed area.
  63. .. rst-class:: classref-item-separator
  64. ----
  65. .. _class_NavigationMeshSourceGeometryData2D_method_add_projected_obstruction:
  66. .. rst-class:: classref-method
  67. |void| **add_projected_obstruction**\ (\ vertices\: :ref:`PackedVector2Array<class_PackedVector2Array>`, carve\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_add_projected_obstruction>`
  68. Adds a projected obstruction shape to the source geometry. If ``carve`` is ``true`` the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process.
  69. .. rst-class:: classref-item-separator
  70. ----
  71. .. _class_NavigationMeshSourceGeometryData2D_method_add_traversable_outline:
  72. .. rst-class:: classref-method
  73. |void| **add_traversable_outline**\ (\ shape_outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_add_traversable_outline>`
  74. Adds the outline points of a shape as traversable area.
  75. .. rst-class:: classref-item-separator
  76. ----
  77. .. _class_NavigationMeshSourceGeometryData2D_method_append_obstruction_outlines:
  78. .. rst-class:: classref-method
  79. |void| **append_obstruction_outlines**\ (\ obstruction_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_append_obstruction_outlines>`
  80. Appends another array of ``obstruction_outlines`` at the end of the existing obstruction outlines array.
  81. .. rst-class:: classref-item-separator
  82. ----
  83. .. _class_NavigationMeshSourceGeometryData2D_method_append_traversable_outlines:
  84. .. rst-class:: classref-method
  85. |void| **append_traversable_outlines**\ (\ traversable_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_append_traversable_outlines>`
  86. Appends another array of ``traversable_outlines`` at the end of the existing traversable outlines array.
  87. .. rst-class:: classref-item-separator
  88. ----
  89. .. _class_NavigationMeshSourceGeometryData2D_method_clear:
  90. .. rst-class:: classref-method
  91. |void| **clear**\ (\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_clear>`
  92. Clears the internal data.
  93. .. rst-class:: classref-item-separator
  94. ----
  95. .. _class_NavigationMeshSourceGeometryData2D_method_clear_projected_obstructions:
  96. .. rst-class:: classref-method
  97. |void| **clear_projected_obstructions**\ (\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_clear_projected_obstructions>`
  98. Clears all projected obstructions.
  99. .. rst-class:: classref-item-separator
  100. ----
  101. .. _class_NavigationMeshSourceGeometryData2D_method_get_bounds:
  102. .. rst-class:: classref-method
  103. :ref:`Rect2<class_Rect2>` **get_bounds**\ (\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_get_bounds>`
  104. Returns an axis-aligned bounding box that covers all the stored geometry data. The bounds are calculated when calling this function with the result cached until further geometry changes are made.
  105. .. rst-class:: classref-item-separator
  106. ----
  107. .. _class_NavigationMeshSourceGeometryData2D_method_get_obstruction_outlines:
  108. .. rst-class:: classref-method
  109. :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **get_obstruction_outlines**\ (\ ) |const| :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_get_obstruction_outlines>`
  110. Returns all the obstructed area outlines arrays.
  111. .. rst-class:: classref-item-separator
  112. ----
  113. .. _class_NavigationMeshSourceGeometryData2D_method_get_projected_obstructions:
  114. .. rst-class:: classref-method
  115. :ref:`Array<class_Array>` **get_projected_obstructions**\ (\ ) |const| :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_get_projected_obstructions>`
  116. Returns the projected obstructions as an :ref:`Array<class_Array>` of dictionaries. Each :ref:`Dictionary<class_Dictionary>` contains the following entries:
  117. - ``vertices`` - A :ref:`PackedFloat32Array<class_PackedFloat32Array>` that defines the outline points of the projected shape.
  118. - ``carve`` - A :ref:`bool<class_bool>` that defines how the projected shape affects the navigation mesh baking. If ``true`` the projected shape will not be affected by addition offsets, e.g. agent radius.
  119. .. rst-class:: classref-item-separator
  120. ----
  121. .. _class_NavigationMeshSourceGeometryData2D_method_get_traversable_outlines:
  122. .. rst-class:: classref-method
  123. :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **get_traversable_outlines**\ (\ ) |const| :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_get_traversable_outlines>`
  124. Returns all the traversable area outlines arrays.
  125. .. rst-class:: classref-item-separator
  126. ----
  127. .. _class_NavigationMeshSourceGeometryData2D_method_has_data:
  128. .. rst-class:: classref-method
  129. :ref:`bool<class_bool>` **has_data**\ (\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_has_data>`
  130. Returns ``true`` when parsed source geometry data exists.
  131. .. rst-class:: classref-item-separator
  132. ----
  133. .. _class_NavigationMeshSourceGeometryData2D_method_merge:
  134. .. rst-class:: classref-method
  135. |void| **merge**\ (\ other_geometry\: :ref:`NavigationMeshSourceGeometryData2D<class_NavigationMeshSourceGeometryData2D>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_merge>`
  136. Adds the geometry data of another **NavigationMeshSourceGeometryData2D** to the navigation mesh baking data.
  137. .. rst-class:: classref-item-separator
  138. ----
  139. .. _class_NavigationMeshSourceGeometryData2D_method_set_obstruction_outlines:
  140. .. rst-class:: classref-method
  141. |void| **set_obstruction_outlines**\ (\ obstruction_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_set_obstruction_outlines>`
  142. Sets all the obstructed area outlines arrays.
  143. .. rst-class:: classref-item-separator
  144. ----
  145. .. _class_NavigationMeshSourceGeometryData2D_method_set_projected_obstructions:
  146. .. rst-class:: classref-method
  147. |void| **set_projected_obstructions**\ (\ projected_obstructions\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_set_projected_obstructions>`
  148. Sets the projected obstructions with an Array of Dictionaries with the following key value pairs:
  149. .. tabs::
  150. .. code-tab:: gdscript
  151. "vertices" : PackedFloat32Array
  152. "carve" : bool
  153. .. rst-class:: classref-item-separator
  154. ----
  155. .. _class_NavigationMeshSourceGeometryData2D_method_set_traversable_outlines:
  156. .. rst-class:: classref-method
  157. |void| **set_traversable_outlines**\ (\ traversable_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_set_traversable_outlines>`
  158. Sets all the traversable area outlines arrays.
  159. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  160. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  161. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  162. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  163. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  164. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  165. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  166. .. |void| replace:: :abbr:`void (No return value.)`