class_meshlibrary.rst 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_MeshLibrary:
  4. MeshLibrary
  5. ===========
  6. **Inherits:** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Library of meshes.
  11. Member Functions
  12. ----------------
  13. +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  14. | void | :ref:`create_item<class_MeshLibrary_create_item>` **(** :ref:`int<class_int>` id **)** |
  15. +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  16. | void | :ref:`set_item_name<class_MeshLibrary_set_item_name>` **(** :ref:`int<class_int>` id, :ref:`String<class_string>` name **)** |
  17. +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`set_item_mesh<class_MeshLibrary_set_item_mesh>` **(** :ref:`int<class_int>` id, :ref:`Mesh<class_mesh>` mesh **)** |
  19. +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  20. | void | :ref:`set_item_shape<class_MeshLibrary_set_item_shape>` **(** :ref:`int<class_int>` id, :ref:`Shape<class_shape>` shape **)** |
  21. +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`String<class_string>` | :ref:`get_item_name<class_MeshLibrary_get_item_name>` **(** :ref:`int<class_int>` id **)** const |
  23. +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`Mesh<class_mesh>` | :ref:`get_item_mesh<class_MeshLibrary_get_item_mesh>` **(** :ref:`int<class_int>` id **)** const |
  25. +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`Shape<class_shape>` | :ref:`get_item_shape<class_MeshLibrary_get_item_shape>` **(** :ref:`int<class_int>` id **)** const |
  27. +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`remove_item<class_MeshLibrary_remove_item>` **(** :ref:`int<class_int>` id **)** |
  29. +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`clear<class_MeshLibrary_clear>` **(** **)** |
  31. +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`IntArray<class_intarray>` | :ref:`get_item_list<class_MeshLibrary_get_item_list>` **(** **)** const |
  33. +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`int<class_int>` | :ref:`get_last_unused_item_id<class_MeshLibrary_get_last_unused_item_id>` **(** **)** const |
  35. +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  36. Description
  37. -----------
  38. Library of meshes. Contains a list of :ref:`Mesh<class_mesh>` resources, each with name and ID. Useful for GridMap or painting Terrain.
  39. Member Function Description
  40. ---------------------------
  41. .. _class_MeshLibrary_create_item:
  42. - void **create_item** **(** :ref:`int<class_int>` id **)**
  43. Create a new item in the library, supplied an id.
  44. .. _class_MeshLibrary_set_item_name:
  45. - void **set_item_name** **(** :ref:`int<class_int>` id, :ref:`String<class_string>` name **)**
  46. Set the name of the item.
  47. .. _class_MeshLibrary_set_item_mesh:
  48. - void **set_item_mesh** **(** :ref:`int<class_int>` id, :ref:`Mesh<class_mesh>` mesh **)**
  49. Set the mesh of the item.
  50. .. _class_MeshLibrary_set_item_shape:
  51. - void **set_item_shape** **(** :ref:`int<class_int>` id, :ref:`Shape<class_shape>` shape **)**
  52. .. _class_MeshLibrary_get_item_name:
  53. - :ref:`String<class_string>` **get_item_name** **(** :ref:`int<class_int>` id **)** const
  54. Return the name of the item.
  55. .. _class_MeshLibrary_get_item_mesh:
  56. - :ref:`Mesh<class_mesh>` **get_item_mesh** **(** :ref:`int<class_int>` id **)** const
  57. Return the mesh of the item.
  58. .. _class_MeshLibrary_get_item_shape:
  59. - :ref:`Shape<class_shape>` **get_item_shape** **(** :ref:`int<class_int>` id **)** const
  60. .. _class_MeshLibrary_remove_item:
  61. - void **remove_item** **(** :ref:`int<class_int>` id **)**
  62. Remove the item.
  63. .. _class_MeshLibrary_clear:
  64. - void **clear** **(** **)**
  65. Clear the library.
  66. .. _class_MeshLibrary_get_item_list:
  67. - :ref:`IntArray<class_intarray>` **get_item_list** **(** **)** const
  68. Return the list of items.
  69. .. _class_MeshLibrary_get_last_unused_item_id:
  70. - :ref:`int<class_int>` **get_last_unused_item_id** **(** **)** const
  71. Get an unused id for a new item.