class_navigationmeshsourcegeometrydata3d.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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/4.2/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.2/doc/classes/NavigationMeshSourceGeometryData3D.xml.
  6. .. _class_NavigationMeshSourceGeometryData3D:
  7. NavigationMeshSourceGeometryData3D
  8. ==================================
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Container for parsed source geometry data used in navigation mesh baking.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Container for parsed source geometry data used in navigation mesh baking.
  15. .. rst-class:: classref-reftable-group
  16. Methods
  17. -------
  18. .. table::
  19. :widths: auto
  20. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`add_faces<class_NavigationMeshSourceGeometryData3D_method_add_faces>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` faces, :ref:`Transform3D<class_Transform3D>` xform **)** |
  22. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`add_mesh<class_NavigationMeshSourceGeometryData3D_method_add_mesh>` **(** :ref:`Mesh<class_Mesh>` mesh, :ref:`Transform3D<class_Transform3D>` xform **)** |
  24. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`add_mesh_array<class_NavigationMeshSourceGeometryData3D_method_add_mesh_array>` **(** :ref:`Array<class_Array>` mesh_array, :ref:`Transform3D<class_Transform3D>` xform **)** |
  26. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`clear<class_NavigationMeshSourceGeometryData3D_method_clear>` **(** **)** |
  28. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_indices<class_NavigationMeshSourceGeometryData3D_method_get_indices>` **(** **)** |const| |
  30. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`get_vertices<class_NavigationMeshSourceGeometryData3D_method_get_vertices>` **(** **)** |const| |
  32. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`bool<class_bool>` | :ref:`has_data<class_NavigationMeshSourceGeometryData3D_method_has_data>` **(** **)** |
  34. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`set_indices<class_NavigationMeshSourceGeometryData3D_method_set_indices>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` indices **)** |
  36. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`set_vertices<class_NavigationMeshSourceGeometryData3D_method_set_vertices>` **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` vertices **)** |
  38. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. .. rst-class:: classref-section-separator
  40. ----
  41. .. rst-class:: classref-descriptions-group
  42. Method Descriptions
  43. -------------------
  44. .. _class_NavigationMeshSourceGeometryData3D_method_add_faces:
  45. .. rst-class:: classref-method
  46. void **add_faces** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` faces, :ref:`Transform3D<class_Transform3D>` xform **)**
  47. Adds an array of vertex positions to the geometry data for navigation mesh baking to form triangulated faces. For each face the array must have three vertex positions in clockwise winding order. Since :ref:`NavigationMesh<class_NavigationMesh>` resources have no transform, all vertex positions need to be offset by the node's transform using ``xform``.
  48. .. rst-class:: classref-item-separator
  49. ----
  50. .. _class_NavigationMeshSourceGeometryData3D_method_add_mesh:
  51. .. rst-class:: classref-method
  52. void **add_mesh** **(** :ref:`Mesh<class_Mesh>` mesh, :ref:`Transform3D<class_Transform3D>` xform **)**
  53. Adds the geometry data of a :ref:`Mesh<class_Mesh>` resource to the navigation mesh baking data. The mesh must have valid triangulated mesh data to be considered. Since :ref:`NavigationMesh<class_NavigationMesh>` resources have no transform, all vertex positions need to be offset by the node's transform using ``xform``.
  54. .. rst-class:: classref-item-separator
  55. ----
  56. .. _class_NavigationMeshSourceGeometryData3D_method_add_mesh_array:
  57. .. rst-class:: classref-method
  58. void **add_mesh_array** **(** :ref:`Array<class_Array>` mesh_array, :ref:`Transform3D<class_Transform3D>` xform **)**
  59. Adds an :ref:`Array<class_Array>` the size of :ref:`Mesh.ARRAY_MAX<class_Mesh_constant_ARRAY_MAX>` and with vertices at index :ref:`Mesh.ARRAY_VERTEX<class_Mesh_constant_ARRAY_VERTEX>` and indices at index :ref:`Mesh.ARRAY_INDEX<class_Mesh_constant_ARRAY_INDEX>` to the navigation mesh baking data. The array must have valid triangulated mesh data to be considered. Since :ref:`NavigationMesh<class_NavigationMesh>` resources have no transform, all vertex positions need to be offset by the node's transform using ``xform``.
  60. .. rst-class:: classref-item-separator
  61. ----
  62. .. _class_NavigationMeshSourceGeometryData3D_method_clear:
  63. .. rst-class:: classref-method
  64. void **clear** **(** **)**
  65. Clears the internal data.
  66. .. rst-class:: classref-item-separator
  67. ----
  68. .. _class_NavigationMeshSourceGeometryData3D_method_get_indices:
  69. .. rst-class:: classref-method
  70. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_indices** **(** **)** |const|
  71. Returns the parsed source geometry data indices array.
  72. .. rst-class:: classref-item-separator
  73. ----
  74. .. _class_NavigationMeshSourceGeometryData3D_method_get_vertices:
  75. .. rst-class:: classref-method
  76. :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_vertices** **(** **)** |const|
  77. Returns the parsed source geometry data vertices array.
  78. .. rst-class:: classref-item-separator
  79. ----
  80. .. _class_NavigationMeshSourceGeometryData3D_method_has_data:
  81. .. rst-class:: classref-method
  82. :ref:`bool<class_bool>` **has_data** **(** **)**
  83. Returns ``true`` when parsed source geometry data exists.
  84. .. rst-class:: classref-item-separator
  85. ----
  86. .. _class_NavigationMeshSourceGeometryData3D_method_set_indices:
  87. .. rst-class:: classref-method
  88. void **set_indices** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` indices **)**
  89. Sets the parsed source geometry data indices. The indices need to be matched with appropriated vertices.
  90. \ **Warning:** Inappropriate data can crash the baking process of the involved third-party libraries.
  91. .. rst-class:: classref-item-separator
  92. ----
  93. .. _class_NavigationMeshSourceGeometryData3D_method_set_vertices:
  94. .. rst-class:: classref-method
  95. void **set_vertices** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` vertices **)**
  96. Sets the parsed source geometry data vertices. The vertices need to be matched with appropriated indices.
  97. \ **Warning:** Inappropriate data can crash the baking process of the involved third-party libraries.
  98. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  99. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  100. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  101. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  102. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  103. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  104. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`