class_navigationmesh.rst 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the NavigationMesh.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_NavigationMesh:
  5. NavigationMesh
  6. ==============
  7. **Inherits:** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Member Functions
  12. ----------------
  13. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  14. | void | :ref:`add_polygon<class_NavigationMesh_add_polygon>` **(** :ref:`PoolIntArray<class_poolintarray>` polygon **)** |
  15. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  16. | void | :ref:`clear_polygons<class_NavigationMesh_clear_polygons>` **(** **)** |
  17. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`create_from_mesh<class_NavigationMesh_create_from_mesh>` **(** :ref:`Mesh<class_mesh>` mesh **)** |
  19. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`float<class_float>` | :ref:`get_agent_height<class_NavigationMesh_get_agent_height>` **(** **)** const |
  21. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`float<class_float>` | :ref:`get_agent_max_climb<class_NavigationMesh_get_agent_max_climb>` **(** **)** const |
  23. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`float<class_float>` | :ref:`get_agent_max_slope<class_NavigationMesh_get_agent_max_slope>` **(** **)** const |
  25. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`float<class_float>` | :ref:`get_agent_radius<class_NavigationMesh_get_agent_radius>` **(** **)** |
  27. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`float<class_float>` | :ref:`get_cell_height<class_NavigationMesh_get_cell_height>` **(** **)** const |
  29. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`float<class_float>` | :ref:`get_cell_size<class_NavigationMesh_get_cell_size>` **(** **)** const |
  31. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`float<class_float>` | :ref:`get_detail_sample_distance<class_NavigationMesh_get_detail_sample_distance>` **(** **)** const |
  33. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`float<class_float>` | :ref:`get_detail_sample_max_error<class_NavigationMesh_get_detail_sample_max_error>` **(** **)** const |
  35. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`float<class_float>` | :ref:`get_edge_max_error<class_NavigationMesh_get_edge_max_error>` **(** **)** const |
  37. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`float<class_float>` | :ref:`get_edge_max_length<class_NavigationMesh_get_edge_max_length>` **(** **)** const |
  39. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`bool<class_bool>` | :ref:`get_filter_ledge_spans<class_NavigationMesh_get_filter_ledge_spans>` **(** **)** const |
  41. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`bool<class_bool>` | :ref:`get_filter_low_hanging_obstacles<class_NavigationMesh_get_filter_low_hanging_obstacles>` **(** **)** const |
  43. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`bool<class_bool>` | :ref:`get_filter_walkable_low_height_spans<class_NavigationMesh_get_filter_walkable_low_height_spans>` **(** **)** const |
  45. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`PoolIntArray<class_poolintarray>` | :ref:`get_polygon<class_NavigationMesh_get_polygon>` **(** :ref:`int<class_int>` idx **)** |
  47. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`int<class_int>` | :ref:`get_polygon_count<class_NavigationMesh_get_polygon_count>` **(** **)** const |
  49. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`float<class_float>` | :ref:`get_region_merge_size<class_NavigationMesh_get_region_merge_size>` **(** **)** const |
  51. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`float<class_float>` | :ref:`get_region_min_size<class_NavigationMesh_get_region_min_size>` **(** **)** const |
  53. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`int<class_int>` | :ref:`get_sample_partition_type<class_NavigationMesh_get_sample_partition_type>` **(** **)** const |
  55. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`PoolVector3Array<class_poolvector3array>` | :ref:`get_vertices<class_NavigationMesh_get_vertices>` **(** **)** const |
  57. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`float<class_float>` | :ref:`get_verts_per_poly<class_NavigationMesh_get_verts_per_poly>` **(** **)** const |
  59. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | void | :ref:`set_agent_height<class_NavigationMesh_set_agent_height>` **(** :ref:`float<class_float>` agent_height **)** |
  61. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | void | :ref:`set_agent_max_climb<class_NavigationMesh_set_agent_max_climb>` **(** :ref:`float<class_float>` agent_max_climb **)** |
  63. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | void | :ref:`set_agent_max_slope<class_NavigationMesh_set_agent_max_slope>` **(** :ref:`float<class_float>` agent_max_slope **)** |
  65. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | void | :ref:`set_agent_radius<class_NavigationMesh_set_agent_radius>` **(** :ref:`float<class_float>` agent_radius **)** |
  67. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | void | :ref:`set_cell_height<class_NavigationMesh_set_cell_height>` **(** :ref:`float<class_float>` cell_height **)** |
  69. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | void | :ref:`set_cell_size<class_NavigationMesh_set_cell_size>` **(** :ref:`float<class_float>` cell_size **)** |
  71. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | void | :ref:`set_detail_sample_distance<class_NavigationMesh_set_detail_sample_distance>` **(** :ref:`float<class_float>` detail_sample_dist **)** |
  73. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | void | :ref:`set_detail_sample_max_error<class_NavigationMesh_set_detail_sample_max_error>` **(** :ref:`float<class_float>` detail_sample_max_error **)** |
  75. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | void | :ref:`set_edge_max_error<class_NavigationMesh_set_edge_max_error>` **(** :ref:`float<class_float>` edge_max_error **)** |
  77. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | void | :ref:`set_edge_max_length<class_NavigationMesh_set_edge_max_length>` **(** :ref:`float<class_float>` edge_max_length **)** |
  79. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | void | :ref:`set_filter_ledge_spans<class_NavigationMesh_set_filter_ledge_spans>` **(** :ref:`bool<class_bool>` filter_ledge_spans **)** |
  81. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | void | :ref:`set_filter_low_hanging_obstacles<class_NavigationMesh_set_filter_low_hanging_obstacles>` **(** :ref:`bool<class_bool>` filter_low_hanging_obstacles **)** |
  83. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | void | :ref:`set_filter_walkable_low_height_spans<class_NavigationMesh_set_filter_walkable_low_height_spans>` **(** :ref:`bool<class_bool>` filter_walkable_low_height_spans **)** |
  85. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | void | :ref:`set_region_merge_size<class_NavigationMesh_set_region_merge_size>` **(** :ref:`float<class_float>` region_merge_size **)** |
  87. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | void | :ref:`set_region_min_size<class_NavigationMesh_set_region_min_size>` **(** :ref:`float<class_float>` region_min_size **)** |
  89. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | void | :ref:`set_sample_partition_type<class_NavigationMesh_set_sample_partition_type>` **(** :ref:`int<class_int>` sample_partition_type **)** |
  91. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | void | :ref:`set_vertices<class_NavigationMesh_set_vertices>` **(** :ref:`PoolVector3Array<class_poolvector3array>` vertices **)** |
  93. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | void | :ref:`set_verts_per_poly<class_NavigationMesh_set_verts_per_poly>` **(** :ref:`float<class_float>` verts_per_poly **)** |
  95. +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. Member Variables
  97. ----------------
  98. - :ref:`float<class_float>` **agent/height**
  99. - :ref:`float<class_float>` **agent/max_climb**
  100. - :ref:`float<class_float>` **agent/max_slope**
  101. - :ref:`float<class_float>` **agent/radius**
  102. - :ref:`float<class_float>` **cell/height**
  103. - :ref:`float<class_float>` **cell/size**
  104. - :ref:`float<class_float>` **detail/sample_distance**
  105. - :ref:`float<class_float>` **detail/sample_max_error**
  106. - :ref:`float<class_float>` **edge/max_error**
  107. - :ref:`float<class_float>` **edge/max_length**
  108. - :ref:`bool<class_bool>` **filter/filter_walkable_low_height_spans**
  109. - :ref:`bool<class_bool>` **filter/ledge_spans**
  110. - :ref:`bool<class_bool>` **filter/low_hanging_obstacles**
  111. - :ref:`float<class_float>` **polygon/verts_per_poly**
  112. - :ref:`Array<class_array>` **polygons**
  113. - :ref:`float<class_float>` **region/merge_size**
  114. - :ref:`float<class_float>` **region/min_size**
  115. - :ref:`int<class_int>` **sample_partition_type/sample_partition_type**
  116. - :ref:`PoolVector3Array<class_poolvector3array>` **vertices**
  117. Numeric Constants
  118. -----------------
  119. - **SAMPLE_PARTITION_WATERSHED** = **0**
  120. - **SAMPLE_PARTITION_MONOTONE** = **1**
  121. - **SAMPLE_PARTITION_LAYERS** = **2**
  122. Member Function Description
  123. ---------------------------
  124. .. _class_NavigationMesh_add_polygon:
  125. - void **add_polygon** **(** :ref:`PoolIntArray<class_poolintarray>` polygon **)**
  126. .. _class_NavigationMesh_clear_polygons:
  127. - void **clear_polygons** **(** **)**
  128. .. _class_NavigationMesh_create_from_mesh:
  129. - void **create_from_mesh** **(** :ref:`Mesh<class_mesh>` mesh **)**
  130. .. _class_NavigationMesh_get_agent_height:
  131. - :ref:`float<class_float>` **get_agent_height** **(** **)** const
  132. .. _class_NavigationMesh_get_agent_max_climb:
  133. - :ref:`float<class_float>` **get_agent_max_climb** **(** **)** const
  134. .. _class_NavigationMesh_get_agent_max_slope:
  135. - :ref:`float<class_float>` **get_agent_max_slope** **(** **)** const
  136. .. _class_NavigationMesh_get_agent_radius:
  137. - :ref:`float<class_float>` **get_agent_radius** **(** **)**
  138. .. _class_NavigationMesh_get_cell_height:
  139. - :ref:`float<class_float>` **get_cell_height** **(** **)** const
  140. .. _class_NavigationMesh_get_cell_size:
  141. - :ref:`float<class_float>` **get_cell_size** **(** **)** const
  142. .. _class_NavigationMesh_get_detail_sample_distance:
  143. - :ref:`float<class_float>` **get_detail_sample_distance** **(** **)** const
  144. .. _class_NavigationMesh_get_detail_sample_max_error:
  145. - :ref:`float<class_float>` **get_detail_sample_max_error** **(** **)** const
  146. .. _class_NavigationMesh_get_edge_max_error:
  147. - :ref:`float<class_float>` **get_edge_max_error** **(** **)** const
  148. .. _class_NavigationMesh_get_edge_max_length:
  149. - :ref:`float<class_float>` **get_edge_max_length** **(** **)** const
  150. .. _class_NavigationMesh_get_filter_ledge_spans:
  151. - :ref:`bool<class_bool>` **get_filter_ledge_spans** **(** **)** const
  152. .. _class_NavigationMesh_get_filter_low_hanging_obstacles:
  153. - :ref:`bool<class_bool>` **get_filter_low_hanging_obstacles** **(** **)** const
  154. .. _class_NavigationMesh_get_filter_walkable_low_height_spans:
  155. - :ref:`bool<class_bool>` **get_filter_walkable_low_height_spans** **(** **)** const
  156. .. _class_NavigationMesh_get_polygon:
  157. - :ref:`PoolIntArray<class_poolintarray>` **get_polygon** **(** :ref:`int<class_int>` idx **)**
  158. .. _class_NavigationMesh_get_polygon_count:
  159. - :ref:`int<class_int>` **get_polygon_count** **(** **)** const
  160. .. _class_NavigationMesh_get_region_merge_size:
  161. - :ref:`float<class_float>` **get_region_merge_size** **(** **)** const
  162. .. _class_NavigationMesh_get_region_min_size:
  163. - :ref:`float<class_float>` **get_region_min_size** **(** **)** const
  164. .. _class_NavigationMesh_get_sample_partition_type:
  165. - :ref:`int<class_int>` **get_sample_partition_type** **(** **)** const
  166. .. _class_NavigationMesh_get_vertices:
  167. - :ref:`PoolVector3Array<class_poolvector3array>` **get_vertices** **(** **)** const
  168. .. _class_NavigationMesh_get_verts_per_poly:
  169. - :ref:`float<class_float>` **get_verts_per_poly** **(** **)** const
  170. .. _class_NavigationMesh_set_agent_height:
  171. - void **set_agent_height** **(** :ref:`float<class_float>` agent_height **)**
  172. .. _class_NavigationMesh_set_agent_max_climb:
  173. - void **set_agent_max_climb** **(** :ref:`float<class_float>` agent_max_climb **)**
  174. .. _class_NavigationMesh_set_agent_max_slope:
  175. - void **set_agent_max_slope** **(** :ref:`float<class_float>` agent_max_slope **)**
  176. .. _class_NavigationMesh_set_agent_radius:
  177. - void **set_agent_radius** **(** :ref:`float<class_float>` agent_radius **)**
  178. .. _class_NavigationMesh_set_cell_height:
  179. - void **set_cell_height** **(** :ref:`float<class_float>` cell_height **)**
  180. .. _class_NavigationMesh_set_cell_size:
  181. - void **set_cell_size** **(** :ref:`float<class_float>` cell_size **)**
  182. .. _class_NavigationMesh_set_detail_sample_distance:
  183. - void **set_detail_sample_distance** **(** :ref:`float<class_float>` detail_sample_dist **)**
  184. .. _class_NavigationMesh_set_detail_sample_max_error:
  185. - void **set_detail_sample_max_error** **(** :ref:`float<class_float>` detail_sample_max_error **)**
  186. .. _class_NavigationMesh_set_edge_max_error:
  187. - void **set_edge_max_error** **(** :ref:`float<class_float>` edge_max_error **)**
  188. .. _class_NavigationMesh_set_edge_max_length:
  189. - void **set_edge_max_length** **(** :ref:`float<class_float>` edge_max_length **)**
  190. .. _class_NavigationMesh_set_filter_ledge_spans:
  191. - void **set_filter_ledge_spans** **(** :ref:`bool<class_bool>` filter_ledge_spans **)**
  192. .. _class_NavigationMesh_set_filter_low_hanging_obstacles:
  193. - void **set_filter_low_hanging_obstacles** **(** :ref:`bool<class_bool>` filter_low_hanging_obstacles **)**
  194. .. _class_NavigationMesh_set_filter_walkable_low_height_spans:
  195. - void **set_filter_walkable_low_height_spans** **(** :ref:`bool<class_bool>` filter_walkable_low_height_spans **)**
  196. .. _class_NavigationMesh_set_region_merge_size:
  197. - void **set_region_merge_size** **(** :ref:`float<class_float>` region_merge_size **)**
  198. .. _class_NavigationMesh_set_region_min_size:
  199. - void **set_region_min_size** **(** :ref:`float<class_float>` region_min_size **)**
  200. .. _class_NavigationMesh_set_sample_partition_type:
  201. - void **set_sample_partition_type** **(** :ref:`int<class_int>` sample_partition_type **)**
  202. .. _class_NavigationMesh_set_vertices:
  203. - void **set_vertices** **(** :ref:`PoolVector3Array<class_poolvector3array>` vertices **)**
  204. .. _class_NavigationMesh_set_verts_per_poly:
  205. - void **set_verts_per_poly** **(** :ref:`float<class_float>` verts_per_poly **)**