class_meshlibrary.rst 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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 MeshLibrary.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_MeshLibrary:
  6. MeshLibrary
  7. ===========
  8. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Library of meshes.
  13. Methods
  14. -------
  15. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  16. | void | :ref:`clear<class_MeshLibrary_method_clear>` **(** **)** |
  17. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`create_item<class_MeshLibrary_method_create_item>` **(** :ref:`int<class_int>` id **)** |
  19. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`int<class_int>` | :ref:`find_item_by_name<class_MeshLibrary_method_find_item_by_name>` **(** :ref:`String<class_String>` name **)** const |
  21. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`PoolIntArray<class_PoolIntArray>` | :ref:`get_item_list<class_MeshLibrary_method_get_item_list>` **(** **)** const |
  23. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`Mesh<class_Mesh>` | :ref:`get_item_mesh<class_MeshLibrary_method_get_item_mesh>` **(** :ref:`int<class_int>` id **)** const |
  25. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`String<class_String>` | :ref:`get_item_name<class_MeshLibrary_method_get_item_name>` **(** :ref:`int<class_int>` id **)** const |
  27. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`NavigationMesh<class_NavigationMesh>` | :ref:`get_item_navmesh<class_MeshLibrary_method_get_item_navmesh>` **(** :ref:`int<class_int>` id **)** const |
  29. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`Texture<class_Texture>` | :ref:`get_item_preview<class_MeshLibrary_method_get_item_preview>` **(** :ref:`int<class_int>` id **)** const |
  31. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`Array<class_Array>` | :ref:`get_item_shapes<class_MeshLibrary_method_get_item_shapes>` **(** :ref:`int<class_int>` id **)** const |
  33. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`int<class_int>` | :ref:`get_last_unused_item_id<class_MeshLibrary_method_get_last_unused_item_id>` **(** **)** const |
  35. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | void | :ref:`remove_item<class_MeshLibrary_method_remove_item>` **(** :ref:`int<class_int>` id **)** |
  37. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | void | :ref:`set_item_mesh<class_MeshLibrary_method_set_item_mesh>` **(** :ref:`int<class_int>` id, :ref:`Mesh<class_Mesh>` mesh **)** |
  39. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`set_item_name<class_MeshLibrary_method_set_item_name>` **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)** |
  41. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | void | :ref:`set_item_navmesh<class_MeshLibrary_method_set_item_navmesh>` **(** :ref:`int<class_int>` id, :ref:`NavigationMesh<class_NavigationMesh>` navmesh **)** |
  43. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | void | :ref:`set_item_preview<class_MeshLibrary_method_set_item_preview>` **(** :ref:`int<class_int>` id, :ref:`Texture<class_Texture>` texture **)** |
  45. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | void | :ref:`set_item_shapes<class_MeshLibrary_method_set_item_shapes>` **(** :ref:`int<class_int>` id, :ref:`Array<class_Array>` shapes **)** |
  47. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. Description
  49. -----------
  50. Library of meshes. Contains a list of :ref:`Mesh<class_Mesh>` resources, each with name and ID. Useful for GridMap or painting Terrain.
  51. Method Descriptions
  52. -------------------
  53. .. _class_MeshLibrary_method_clear:
  54. - void **clear** **(** **)**
  55. Clear the library.
  56. ----
  57. .. _class_MeshLibrary_method_create_item:
  58. - void **create_item** **(** :ref:`int<class_int>` id **)**
  59. Create a new item in the library, supplied an id.
  60. ----
  61. .. _class_MeshLibrary_method_find_item_by_name:
  62. - :ref:`int<class_int>` **find_item_by_name** **(** :ref:`String<class_String>` name **)** const
  63. ----
  64. .. _class_MeshLibrary_method_get_item_list:
  65. - :ref:`PoolIntArray<class_PoolIntArray>` **get_item_list** **(** **)** const
  66. Returns the list of items.
  67. ----
  68. .. _class_MeshLibrary_method_get_item_mesh:
  69. - :ref:`Mesh<class_Mesh>` **get_item_mesh** **(** :ref:`int<class_int>` id **)** const
  70. Returns the mesh of the item.
  71. ----
  72. .. _class_MeshLibrary_method_get_item_name:
  73. - :ref:`String<class_String>` **get_item_name** **(** :ref:`int<class_int>` id **)** const
  74. Returns the name of the item.
  75. ----
  76. .. _class_MeshLibrary_method_get_item_navmesh:
  77. - :ref:`NavigationMesh<class_NavigationMesh>` **get_item_navmesh** **(** :ref:`int<class_int>` id **)** const
  78. ----
  79. .. _class_MeshLibrary_method_get_item_preview:
  80. - :ref:`Texture<class_Texture>` **get_item_preview** **(** :ref:`int<class_int>` id **)** const
  81. ----
  82. .. _class_MeshLibrary_method_get_item_shapes:
  83. - :ref:`Array<class_Array>` **get_item_shapes** **(** :ref:`int<class_int>` id **)** const
  84. ----
  85. .. _class_MeshLibrary_method_get_last_unused_item_id:
  86. - :ref:`int<class_int>` **get_last_unused_item_id** **(** **)** const
  87. Get an unused id for a new item.
  88. ----
  89. .. _class_MeshLibrary_method_remove_item:
  90. - void **remove_item** **(** :ref:`int<class_int>` id **)**
  91. Remove the item.
  92. ----
  93. .. _class_MeshLibrary_method_set_item_mesh:
  94. - void **set_item_mesh** **(** :ref:`int<class_int>` id, :ref:`Mesh<class_Mesh>` mesh **)**
  95. Set the mesh of the item.
  96. ----
  97. .. _class_MeshLibrary_method_set_item_name:
  98. - void **set_item_name** **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)**
  99. Set the name of the item.
  100. ----
  101. .. _class_MeshLibrary_method_set_item_navmesh:
  102. - void **set_item_navmesh** **(** :ref:`int<class_int>` id, :ref:`NavigationMesh<class_NavigationMesh>` navmesh **)**
  103. ----
  104. .. _class_MeshLibrary_method_set_item_preview:
  105. - void **set_item_preview** **(** :ref:`int<class_int>` id, :ref:`Texture<class_Texture>` texture **)**
  106. ----
  107. .. _class_MeshLibrary_method_set_item_shapes:
  108. - void **set_item_shapes** **(** :ref:`int<class_int>` id, :ref:`Array<class_Array>` shapes **)**