class_lightmapgidata.rst 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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.0/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/LightmapGIData.xml.
  6. .. _class_LightmapGIData:
  7. LightmapGIData
  8. ==============
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Contains baked lightmap and dynamic object probe data for :ref:`LightmapGI<class_LightmapGI>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **LightmapGIData** contains baked lightmap and dynamic object probe data for :ref:`LightmapGI<class_LightmapGI>`. It is replaced every time lightmaps are baked in :ref:`LightmapGI<class_LightmapGI>`.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +---------------------------------------------+-------------------------------------------------------------------+
  21. | :ref:`TextureLayered<class_TextureLayered>` | :ref:`light_texture<class_LightmapGIData_property_light_texture>` |
  22. +---------------------------------------------+-------------------------------------------------------------------+
  23. .. rst-class:: classref-reftable-group
  24. Methods
  25. -------
  26. .. table::
  27. :widths: auto
  28. +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`add_user<class_LightmapGIData_method_add_user>` **(** :ref:`NodePath<class_NodePath>` path, :ref:`Rect2<class_Rect2>` uv_scale, :ref:`int<class_int>` slice_index, :ref:`int<class_int>` sub_instance **)** |
  30. +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`clear_users<class_LightmapGIData_method_clear_users>` **(** **)** |
  32. +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`int<class_int>` | :ref:`get_user_count<class_LightmapGIData_method_get_user_count>` **(** **)** |const| |
  34. +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`NodePath<class_NodePath>` | :ref:`get_user_path<class_LightmapGIData_method_get_user_path>` **(** :ref:`int<class_int>` user_idx **)** |const| |
  36. +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`bool<class_bool>` | :ref:`is_using_spherical_harmonics<class_LightmapGIData_method_is_using_spherical_harmonics>` **(** **)** |const| |
  38. +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`set_uses_spherical_harmonics<class_LightmapGIData_method_set_uses_spherical_harmonics>` **(** :ref:`bool<class_bool>` uses_spherical_harmonics **)** |
  40. +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. .. rst-class:: classref-section-separator
  42. ----
  43. .. rst-class:: classref-descriptions-group
  44. Property Descriptions
  45. ---------------------
  46. .. _class_LightmapGIData_property_light_texture:
  47. .. rst-class:: classref-property
  48. :ref:`TextureLayered<class_TextureLayered>` **light_texture**
  49. .. rst-class:: classref-property-setget
  50. - void **set_light_texture** **(** :ref:`TextureLayered<class_TextureLayered>` value **)**
  51. - :ref:`TextureLayered<class_TextureLayered>` **get_light_texture** **(** **)**
  52. The lightmap atlas texture generated by the lightmapper.
  53. .. rst-class:: classref-section-separator
  54. ----
  55. .. rst-class:: classref-descriptions-group
  56. Method Descriptions
  57. -------------------
  58. .. _class_LightmapGIData_method_add_user:
  59. .. rst-class:: classref-method
  60. void **add_user** **(** :ref:`NodePath<class_NodePath>` path, :ref:`Rect2<class_Rect2>` uv_scale, :ref:`int<class_int>` slice_index, :ref:`int<class_int>` sub_instance **)**
  61. Adds an object that is considered baked within this **LightmapGIData**.
  62. .. rst-class:: classref-item-separator
  63. ----
  64. .. _class_LightmapGIData_method_clear_users:
  65. .. rst-class:: classref-method
  66. void **clear_users** **(** **)**
  67. Clear all objects that are considered baked within this **LightmapGIData**.
  68. .. rst-class:: classref-item-separator
  69. ----
  70. .. _class_LightmapGIData_method_get_user_count:
  71. .. rst-class:: classref-method
  72. :ref:`int<class_int>` **get_user_count** **(** **)** |const|
  73. Returns the number of objects that are considered baked within this **LightmapGIData**.
  74. .. rst-class:: classref-item-separator
  75. ----
  76. .. _class_LightmapGIData_method_get_user_path:
  77. .. rst-class:: classref-method
  78. :ref:`NodePath<class_NodePath>` **get_user_path** **(** :ref:`int<class_int>` user_idx **)** |const|
  79. Returns the :ref:`NodePath<class_NodePath>` of the baked object at index ``user_idx``.
  80. .. rst-class:: classref-item-separator
  81. ----
  82. .. _class_LightmapGIData_method_is_using_spherical_harmonics:
  83. .. rst-class:: classref-method
  84. :ref:`bool<class_bool>` **is_using_spherical_harmonics** **(** **)** |const|
  85. If ``true``, lightmaps were baked with directional information. See also :ref:`LightmapGI.directional<class_LightmapGI_property_directional>`.
  86. .. rst-class:: classref-item-separator
  87. ----
  88. .. _class_LightmapGIData_method_set_uses_spherical_harmonics:
  89. .. rst-class:: classref-method
  90. void **set_uses_spherical_harmonics** **(** :ref:`bool<class_bool>` uses_spherical_harmonics **)**
  91. If ``uses_spherical_harmonics`` is ``true``, tells the engine to treat the lightmap data as if it was baked with directional information.
  92. \ **Note:** Changing this value on already baked lightmaps will not cause them to be baked again. This means the material appearance will look incorrect until lightmaps are baked again, in which case the value set here is discarded as the entire **LightmapGIData** resource is replaced by the lightmapper.
  93. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  94. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  95. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  96. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  97. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  98. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`