class_navigationmesh.rst 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the NavigationMesh.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_NavigationMesh:
  6. NavigationMesh
  7. ==============
  8. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Properties
  13. ----------
  14. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`float<class_float>` | :ref:`agent/height<class_NavigationMesh_property_agent/height>` |
  16. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`float<class_float>` | :ref:`agent/max_climb<class_NavigationMesh_property_agent/max_climb>` |
  18. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`float<class_float>` | :ref:`agent/max_slope<class_NavigationMesh_property_agent/max_slope>` |
  20. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`float<class_float>` | :ref:`agent/radius<class_NavigationMesh_property_agent/radius>` |
  22. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`float<class_float>` | :ref:`cell/height<class_NavigationMesh_property_cell/height>` |
  24. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`float<class_float>` | :ref:`cell/size<class_NavigationMesh_property_cell/size>` |
  26. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`float<class_float>` | :ref:`detail/sample_distance<class_NavigationMesh_property_detail/sample_distance>` |
  28. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`float<class_float>` | :ref:`detail/sample_max_error<class_NavigationMesh_property_detail/sample_max_error>` |
  30. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`float<class_float>` | :ref:`edge/max_error<class_NavigationMesh_property_edge/max_error>` |
  32. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`float<class_float>` | :ref:`edge/max_length<class_NavigationMesh_property_edge/max_length>` |
  34. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`bool<class_bool>` | :ref:`filter/filter_walkable_low_height_spans<class_NavigationMesh_property_filter/filter_walkable_low_height_spans>` |
  36. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`bool<class_bool>` | :ref:`filter/ledge_spans<class_NavigationMesh_property_filter/ledge_spans>` |
  38. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`bool<class_bool>` | :ref:`filter/low_hanging_obstacles<class_NavigationMesh_property_filter/low_hanging_obstacles>` |
  40. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`float<class_float>` | :ref:`polygon/verts_per_poly<class_NavigationMesh_property_polygon/verts_per_poly>` |
  42. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`float<class_float>` | :ref:`region/merge_size<class_NavigationMesh_property_region/merge_size>` |
  44. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`float<class_float>` | :ref:`region/min_size<class_NavigationMesh_property_region/min_size>` |
  46. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`int<class_int>` | :ref:`sample_partition_type/sample_partition_type<class_NavigationMesh_property_sample_partition_type/sample_partition_type>` |
  48. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  49. Methods
  50. -------
  51. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  52. | void | :ref:`add_polygon<class_NavigationMesh_method_add_polygon>` **(** :ref:`PoolIntArray<class_PoolIntArray>` polygon **)** |
  53. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  54. | void | :ref:`clear_polygons<class_NavigationMesh_method_clear_polygons>` **(** **)** |
  55. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  56. | void | :ref:`create_from_mesh<class_NavigationMesh_method_create_from_mesh>` **(** :ref:`Mesh<class_Mesh>` mesh **)** |
  57. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`PoolIntArray<class_PoolIntArray>` | :ref:`get_polygon<class_NavigationMesh_method_get_polygon>` **(** :ref:`int<class_int>` idx **)** |
  59. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`int<class_int>` | :ref:`get_polygon_count<class_NavigationMesh_method_get_polygon_count>` **(** **)** const |
  61. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`PoolVector3Array<class_PoolVector3Array>` | :ref:`get_vertices<class_NavigationMesh_method_get_vertices>` **(** **)** const |
  63. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  64. | void | :ref:`set_vertices<class_NavigationMesh_method_set_vertices>` **(** :ref:`PoolVector3Array<class_PoolVector3Array>` vertices **)** |
  65. +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  66. Constants
  67. ---------
  68. .. _class_NavigationMesh_constant_SAMPLE_PARTITION_WATERSHED:
  69. .. _class_NavigationMesh_constant_SAMPLE_PARTITION_MONOTONE:
  70. .. _class_NavigationMesh_constant_SAMPLE_PARTITION_LAYERS:
  71. - **SAMPLE_PARTITION_WATERSHED** = **0**
  72. - **SAMPLE_PARTITION_MONOTONE** = **1**
  73. - **SAMPLE_PARTITION_LAYERS** = **2**
  74. Property Descriptions
  75. ---------------------
  76. .. _class_NavigationMesh_property_agent/height:
  77. - :ref:`float<class_float>` **agent/height**
  78. +----------+-------------------------+
  79. | *Setter* | set_agent_height(value) |
  80. +----------+-------------------------+
  81. | *Getter* | get_agent_height() |
  82. +----------+-------------------------+
  83. ----
  84. .. _class_NavigationMesh_property_agent/max_climb:
  85. - :ref:`float<class_float>` **agent/max_climb**
  86. +----------+----------------------------+
  87. | *Setter* | set_agent_max_climb(value) |
  88. +----------+----------------------------+
  89. | *Getter* | get_agent_max_climb() |
  90. +----------+----------------------------+
  91. ----
  92. .. _class_NavigationMesh_property_agent/max_slope:
  93. - :ref:`float<class_float>` **agent/max_slope**
  94. +----------+----------------------------+
  95. | *Setter* | set_agent_max_slope(value) |
  96. +----------+----------------------------+
  97. | *Getter* | get_agent_max_slope() |
  98. +----------+----------------------------+
  99. ----
  100. .. _class_NavigationMesh_property_agent/radius:
  101. - :ref:`float<class_float>` **agent/radius**
  102. +----------+-------------------------+
  103. | *Setter* | set_agent_radius(value) |
  104. +----------+-------------------------+
  105. | *Getter* | get_agent_radius() |
  106. +----------+-------------------------+
  107. ----
  108. .. _class_NavigationMesh_property_cell/height:
  109. - :ref:`float<class_float>` **cell/height**
  110. +----------+------------------------+
  111. | *Setter* | set_cell_height(value) |
  112. +----------+------------------------+
  113. | *Getter* | get_cell_height() |
  114. +----------+------------------------+
  115. ----
  116. .. _class_NavigationMesh_property_cell/size:
  117. - :ref:`float<class_float>` **cell/size**
  118. +----------+----------------------+
  119. | *Setter* | set_cell_size(value) |
  120. +----------+----------------------+
  121. | *Getter* | get_cell_size() |
  122. +----------+----------------------+
  123. ----
  124. .. _class_NavigationMesh_property_detail/sample_distance:
  125. - :ref:`float<class_float>` **detail/sample_distance**
  126. +----------+-----------------------------------+
  127. | *Setter* | set_detail_sample_distance(value) |
  128. +----------+-----------------------------------+
  129. | *Getter* | get_detail_sample_distance() |
  130. +----------+-----------------------------------+
  131. ----
  132. .. _class_NavigationMesh_property_detail/sample_max_error:
  133. - :ref:`float<class_float>` **detail/sample_max_error**
  134. +----------+------------------------------------+
  135. | *Setter* | set_detail_sample_max_error(value) |
  136. +----------+------------------------------------+
  137. | *Getter* | get_detail_sample_max_error() |
  138. +----------+------------------------------------+
  139. ----
  140. .. _class_NavigationMesh_property_edge/max_error:
  141. - :ref:`float<class_float>` **edge/max_error**
  142. +----------+---------------------------+
  143. | *Setter* | set_edge_max_error(value) |
  144. +----------+---------------------------+
  145. | *Getter* | get_edge_max_error() |
  146. +----------+---------------------------+
  147. ----
  148. .. _class_NavigationMesh_property_edge/max_length:
  149. - :ref:`float<class_float>` **edge/max_length**
  150. +----------+----------------------------+
  151. | *Setter* | set_edge_max_length(value) |
  152. +----------+----------------------------+
  153. | *Getter* | get_edge_max_length() |
  154. +----------+----------------------------+
  155. ----
  156. .. _class_NavigationMesh_property_filter/filter_walkable_low_height_spans:
  157. - :ref:`bool<class_bool>` **filter/filter_walkable_low_height_spans**
  158. +----------+---------------------------------------------+
  159. | *Setter* | set_filter_walkable_low_height_spans(value) |
  160. +----------+---------------------------------------------+
  161. | *Getter* | get_filter_walkable_low_height_spans() |
  162. +----------+---------------------------------------------+
  163. ----
  164. .. _class_NavigationMesh_property_filter/ledge_spans:
  165. - :ref:`bool<class_bool>` **filter/ledge_spans**
  166. +----------+-------------------------------+
  167. | *Setter* | set_filter_ledge_spans(value) |
  168. +----------+-------------------------------+
  169. | *Getter* | get_filter_ledge_spans() |
  170. +----------+-------------------------------+
  171. ----
  172. .. _class_NavigationMesh_property_filter/low_hanging_obstacles:
  173. - :ref:`bool<class_bool>` **filter/low_hanging_obstacles**
  174. +----------+-----------------------------------------+
  175. | *Setter* | set_filter_low_hanging_obstacles(value) |
  176. +----------+-----------------------------------------+
  177. | *Getter* | get_filter_low_hanging_obstacles() |
  178. +----------+-----------------------------------------+
  179. ----
  180. .. _class_NavigationMesh_property_polygon/verts_per_poly:
  181. - :ref:`float<class_float>` **polygon/verts_per_poly**
  182. +----------+---------------------------+
  183. | *Setter* | set_verts_per_poly(value) |
  184. +----------+---------------------------+
  185. | *Getter* | get_verts_per_poly() |
  186. +----------+---------------------------+
  187. ----
  188. .. _class_NavigationMesh_property_region/merge_size:
  189. - :ref:`float<class_float>` **region/merge_size**
  190. +----------+------------------------------+
  191. | *Setter* | set_region_merge_size(value) |
  192. +----------+------------------------------+
  193. | *Getter* | get_region_merge_size() |
  194. +----------+------------------------------+
  195. ----
  196. .. _class_NavigationMesh_property_region/min_size:
  197. - :ref:`float<class_float>` **region/min_size**
  198. +----------+----------------------------+
  199. | *Setter* | set_region_min_size(value) |
  200. +----------+----------------------------+
  201. | *Getter* | get_region_min_size() |
  202. +----------+----------------------------+
  203. ----
  204. .. _class_NavigationMesh_property_sample_partition_type/sample_partition_type:
  205. - :ref:`int<class_int>` **sample_partition_type/sample_partition_type**
  206. +----------+----------------------------------+
  207. | *Setter* | set_sample_partition_type(value) |
  208. +----------+----------------------------------+
  209. | *Getter* | get_sample_partition_type() |
  210. +----------+----------------------------------+
  211. Method Descriptions
  212. -------------------
  213. .. _class_NavigationMesh_method_add_polygon:
  214. - void **add_polygon** **(** :ref:`PoolIntArray<class_PoolIntArray>` polygon **)**
  215. ----
  216. .. _class_NavigationMesh_method_clear_polygons:
  217. - void **clear_polygons** **(** **)**
  218. ----
  219. .. _class_NavigationMesh_method_create_from_mesh:
  220. - void **create_from_mesh** **(** :ref:`Mesh<class_Mesh>` mesh **)**
  221. ----
  222. .. _class_NavigationMesh_method_get_polygon:
  223. - :ref:`PoolIntArray<class_PoolIntArray>` **get_polygon** **(** :ref:`int<class_int>` idx **)**
  224. ----
  225. .. _class_NavigationMesh_method_get_polygon_count:
  226. - :ref:`int<class_int>` **get_polygon_count** **(** **)** const
  227. ----
  228. .. _class_NavigationMesh_method_get_vertices:
  229. - :ref:`PoolVector3Array<class_PoolVector3Array>` **get_vertices** **(** **)** const
  230. ----
  231. .. _class_NavigationMesh_method_set_vertices:
  232. - void **set_vertices** **(** :ref:`PoolVector3Array<class_PoolVector3Array>` vertices **)**