class_navigationmeshsourcegeometrydata2d.rst 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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:`clear<class_NavigationMeshSourceGeometryData2D_method_clear>`\ (\ ) |
  29. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | |void| | :ref:`clear_projected_obstructions<class_NavigationMeshSourceGeometryData2D_method_clear_projected_obstructions>`\ (\ ) |
  31. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`get_obstruction_outlines<class_NavigationMeshSourceGeometryData2D_method_get_obstruction_outlines>`\ (\ ) |const| |
  33. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`Array<class_Array>` | :ref:`get_projected_obstructions<class_NavigationMeshSourceGeometryData2D_method_get_projected_obstructions>`\ (\ ) |const| |
  35. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`get_traversable_outlines<class_NavigationMeshSourceGeometryData2D_method_get_traversable_outlines>`\ (\ ) |const| |
  37. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`bool<class_bool>` | :ref:`has_data<class_NavigationMeshSourceGeometryData2D_method_has_data>`\ (\ ) |
  39. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | |void| | :ref:`merge<class_NavigationMeshSourceGeometryData2D_method_merge>`\ (\ other_geometry\: :ref:`NavigationMeshSourceGeometryData2D<class_NavigationMeshSourceGeometryData2D>`\ ) |
  41. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | |void| | :ref:`set_obstruction_outlines<class_NavigationMeshSourceGeometryData2D_method_set_obstruction_outlines>`\ (\ obstruction_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) |
  43. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | |void| | :ref:`set_projected_obstructions<class_NavigationMeshSourceGeometryData2D_method_set_projected_obstructions>`\ (\ projected_obstructions\: :ref:`Array<class_Array>`\ ) |
  45. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | |void| | :ref:`set_traversable_outlines<class_NavigationMeshSourceGeometryData2D_method_set_traversable_outlines>`\ (\ traversable_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) |
  47. +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. .. rst-class:: classref-section-separator
  49. ----
  50. .. rst-class:: classref-descriptions-group
  51. Method Descriptions
  52. -------------------
  53. .. _class_NavigationMeshSourceGeometryData2D_method_add_obstruction_outline:
  54. .. rst-class:: classref-method
  55. |void| **add_obstruction_outline**\ (\ shape_outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ )
  56. Adds the outline points of a shape as obstructed area.
  57. .. rst-class:: classref-item-separator
  58. ----
  59. .. _class_NavigationMeshSourceGeometryData2D_method_add_projected_obstruction:
  60. .. rst-class:: classref-method
  61. |void| **add_projected_obstruction**\ (\ vertices\: :ref:`PackedVector2Array<class_PackedVector2Array>`, carve\: :ref:`bool<class_bool>`\ )
  62. 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.
  63. .. rst-class:: classref-item-separator
  64. ----
  65. .. _class_NavigationMeshSourceGeometryData2D_method_add_traversable_outline:
  66. .. rst-class:: classref-method
  67. |void| **add_traversable_outline**\ (\ shape_outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ )
  68. Adds the outline points of a shape as traversable area.
  69. .. rst-class:: classref-item-separator
  70. ----
  71. .. _class_NavigationMeshSourceGeometryData2D_method_clear:
  72. .. rst-class:: classref-method
  73. |void| **clear**\ (\ )
  74. Clears the internal data.
  75. .. rst-class:: classref-item-separator
  76. ----
  77. .. _class_NavigationMeshSourceGeometryData2D_method_clear_projected_obstructions:
  78. .. rst-class:: classref-method
  79. |void| **clear_projected_obstructions**\ (\ )
  80. Clears all projected obstructions.
  81. .. rst-class:: classref-item-separator
  82. ----
  83. .. _class_NavigationMeshSourceGeometryData2D_method_get_obstruction_outlines:
  84. .. rst-class:: classref-method
  85. :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **get_obstruction_outlines**\ (\ ) |const|
  86. Returns all the obstructed area outlines arrays.
  87. .. rst-class:: classref-item-separator
  88. ----
  89. .. _class_NavigationMeshSourceGeometryData2D_method_get_projected_obstructions:
  90. .. rst-class:: classref-method
  91. :ref:`Array<class_Array>` **get_projected_obstructions**\ (\ ) |const|
  92. Returns the projected obstructions as an :ref:`Array<class_Array>` of dictionaries. Each :ref:`Dictionary<class_Dictionary>` contains the following entries:
  93. - ``vertices`` - A :ref:`PackedFloat32Array<class_PackedFloat32Array>` that defines the outline points of the projected shape.
  94. - ``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.
  95. .. rst-class:: classref-item-separator
  96. ----
  97. .. _class_NavigationMeshSourceGeometryData2D_method_get_traversable_outlines:
  98. .. rst-class:: classref-method
  99. :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **get_traversable_outlines**\ (\ ) |const|
  100. Returns all the traversable area outlines arrays.
  101. .. rst-class:: classref-item-separator
  102. ----
  103. .. _class_NavigationMeshSourceGeometryData2D_method_has_data:
  104. .. rst-class:: classref-method
  105. :ref:`bool<class_bool>` **has_data**\ (\ )
  106. Returns ``true`` when parsed source geometry data exists.
  107. .. rst-class:: classref-item-separator
  108. ----
  109. .. _class_NavigationMeshSourceGeometryData2D_method_merge:
  110. .. rst-class:: classref-method
  111. |void| **merge**\ (\ other_geometry\: :ref:`NavigationMeshSourceGeometryData2D<class_NavigationMeshSourceGeometryData2D>`\ )
  112. Adds the geometry data of another **NavigationMeshSourceGeometryData2D** to the navigation mesh baking data.
  113. .. rst-class:: classref-item-separator
  114. ----
  115. .. _class_NavigationMeshSourceGeometryData2D_method_set_obstruction_outlines:
  116. .. rst-class:: classref-method
  117. |void| **set_obstruction_outlines**\ (\ obstruction_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ )
  118. Sets all the obstructed area outlines arrays.
  119. .. rst-class:: classref-item-separator
  120. ----
  121. .. _class_NavigationMeshSourceGeometryData2D_method_set_projected_obstructions:
  122. .. rst-class:: classref-method
  123. |void| **set_projected_obstructions**\ (\ projected_obstructions\: :ref:`Array<class_Array>`\ )
  124. Sets the projected obstructions with an Array of Dictionaries with the following key value pairs:
  125. .. tabs::
  126. .. code-tab:: gdscript
  127. "vertices" : PackedFloat32Array
  128. "carve" : bool
  129. .. rst-class:: classref-item-separator
  130. ----
  131. .. _class_NavigationMeshSourceGeometryData2D_method_set_traversable_outlines:
  132. .. rst-class:: classref-method
  133. |void| **set_traversable_outlines**\ (\ traversable_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ )
  134. Sets all the traversable area outlines arrays.
  135. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  136. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  137. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  138. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  139. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  140. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  141. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  142. .. |void| replace:: :abbr:`void (No return value.)`