class_navigationmeshsourcegeometrydata3d.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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/NavigationMeshSourceGeometryData3D.xml.
  6. .. _class_NavigationMeshSourceGeometryData3D:
  7. NavigationMeshSourceGeometryData3D
  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_faces<class_NavigationMeshSourceGeometryData3D_method_add_faces>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` faces, :ref:`Transform3D<class_Transform3D>` xform **)** |
  23. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`add_mesh<class_NavigationMeshSourceGeometryData3D_method_add_mesh>` **(** :ref:`Mesh<class_Mesh>` mesh, :ref:`Transform3D<class_Transform3D>` xform **)** |
  25. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`add_mesh_array<class_NavigationMeshSourceGeometryData3D_method_add_mesh_array>` **(** :ref:`Array<class_Array>` mesh_array, :ref:`Transform3D<class_Transform3D>` xform **)** |
  27. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`clear<class_NavigationMeshSourceGeometryData3D_method_clear>` **(** **)** |
  29. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_indices<class_NavigationMeshSourceGeometryData3D_method_get_indices>` **(** **)** |const| |
  31. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`get_vertices<class_NavigationMeshSourceGeometryData3D_method_get_vertices>` **(** **)** |const| |
  33. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`bool<class_bool>` | :ref:`has_data<class_NavigationMeshSourceGeometryData3D_method_has_data>` **(** **)** |
  35. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | void | :ref:`set_indices<class_NavigationMeshSourceGeometryData3D_method_set_indices>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` indices **)** |
  37. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | void | :ref:`set_vertices<class_NavigationMeshSourceGeometryData3D_method_set_vertices>` **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` vertices **)** |
  39. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. .. rst-class:: classref-section-separator
  41. ----
  42. .. rst-class:: classref-descriptions-group
  43. Method Descriptions
  44. -------------------
  45. .. _class_NavigationMeshSourceGeometryData3D_method_add_faces:
  46. .. rst-class:: classref-method
  47. void **add_faces** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` faces, :ref:`Transform3D<class_Transform3D>` xform **)**
  48. 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``.
  49. .. rst-class:: classref-item-separator
  50. ----
  51. .. _class_NavigationMeshSourceGeometryData3D_method_add_mesh:
  52. .. rst-class:: classref-method
  53. void **add_mesh** **(** :ref:`Mesh<class_Mesh>` mesh, :ref:`Transform3D<class_Transform3D>` xform **)**
  54. 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``.
  55. .. rst-class:: classref-item-separator
  56. ----
  57. .. _class_NavigationMeshSourceGeometryData3D_method_add_mesh_array:
  58. .. rst-class:: classref-method
  59. void **add_mesh_array** **(** :ref:`Array<class_Array>` mesh_array, :ref:`Transform3D<class_Transform3D>` xform **)**
  60. 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``.
  61. .. rst-class:: classref-item-separator
  62. ----
  63. .. _class_NavigationMeshSourceGeometryData3D_method_clear:
  64. .. rst-class:: classref-method
  65. void **clear** **(** **)**
  66. Clears the internal data.
  67. .. rst-class:: classref-item-separator
  68. ----
  69. .. _class_NavigationMeshSourceGeometryData3D_method_get_indices:
  70. .. rst-class:: classref-method
  71. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_indices** **(** **)** |const|
  72. Returns the parsed source geometry data indices array.
  73. .. rst-class:: classref-item-separator
  74. ----
  75. .. _class_NavigationMeshSourceGeometryData3D_method_get_vertices:
  76. .. rst-class:: classref-method
  77. :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_vertices** **(** **)** |const|
  78. Returns the parsed source geometry data vertices array.
  79. .. rst-class:: classref-item-separator
  80. ----
  81. .. _class_NavigationMeshSourceGeometryData3D_method_has_data:
  82. .. rst-class:: classref-method
  83. :ref:`bool<class_bool>` **has_data** **(** **)**
  84. Returns ``true`` when parsed source geometry data exists.
  85. .. rst-class:: classref-item-separator
  86. ----
  87. .. _class_NavigationMeshSourceGeometryData3D_method_set_indices:
  88. .. rst-class:: classref-method
  89. void **set_indices** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` indices **)**
  90. Sets the parsed source geometry data indices. The indices need to be matched with appropriated vertices.
  91. \ **Warning:** Inappropriate data can crash the baking process of the involved third-party libraries.
  92. .. rst-class:: classref-item-separator
  93. ----
  94. .. _class_NavigationMeshSourceGeometryData3D_method_set_vertices:
  95. .. rst-class:: classref-method
  96. void **set_vertices** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` vertices **)**
  97. Sets the parsed source geometry data vertices. The vertices need to be matched with appropriated indices.
  98. \ **Warning:** Inappropriate data can crash the baking process of the involved third-party libraries.
  99. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  100. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  101. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  102. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  103. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  104. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  105. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`