class_lightmapgidata.rst 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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/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. | :ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\] | :ref:`lightmap_textures<class_LightmapGIData_property_lightmap_textures>` | ``[]`` |
  24. +--------------------------------------------------------------------------+---------------------------------------------------------------------------+--------+
  25. .. rst-class:: classref-reftable-group
  26. Methods
  27. -------
  28. .. table::
  29. :widths: auto
  30. +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | |void| | :ref:`add_user<class_LightmapGIData_method_add_user>`\ (\ path\: :ref:`NodePath<class_NodePath>`, uv_scale\: :ref:`Rect2<class_Rect2>`, slice_index\: :ref:`int<class_int>`, sub_instance\: :ref:`int<class_int>`\ ) |
  32. +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | |void| | :ref:`clear_users<class_LightmapGIData_method_clear_users>`\ (\ ) |
  34. +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`int<class_int>` | :ref:`get_user_count<class_LightmapGIData_method_get_user_count>`\ (\ ) |const| |
  36. +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`NodePath<class_NodePath>` | :ref:`get_user_path<class_LightmapGIData_method_get_user_path>`\ (\ user_idx\: :ref:`int<class_int>`\ ) |const| |
  38. +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`bool<class_bool>` | :ref:`is_using_spherical_harmonics<class_LightmapGIData_method_is_using_spherical_harmonics>`\ (\ ) |const| |
  40. +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | |void| | :ref:`set_uses_spherical_harmonics<class_LightmapGIData_method_set_uses_spherical_harmonics>`\ (\ uses_spherical_harmonics\: :ref:`bool<class_bool>`\ ) |
  42. +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. .. rst-class:: classref-section-separator
  44. ----
  45. .. rst-class:: classref-descriptions-group
  46. Property Descriptions
  47. ---------------------
  48. .. _class_LightmapGIData_property_light_texture:
  49. .. rst-class:: classref-property
  50. :ref:`TextureLayered<class_TextureLayered>` **light_texture** :ref:`🔗<class_LightmapGIData_property_light_texture>`
  51. .. rst-class:: classref-property-setget
  52. - |void| **set_light_texture**\ (\ value\: :ref:`TextureLayered<class_TextureLayered>`\ )
  53. - :ref:`TextureLayered<class_TextureLayered>` **get_light_texture**\ (\ )
  54. **Deprecated:** The lightmap atlas can now contain multiple textures. See :ref:`lightmap_textures<class_LightmapGIData_property_lightmap_textures>`.
  55. The lightmap atlas texture generated by the lightmapper.
  56. .. rst-class:: classref-item-separator
  57. ----
  58. .. _class_LightmapGIData_property_lightmap_textures:
  59. .. rst-class:: classref-property
  60. :ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\] **lightmap_textures** = ``[]`` :ref:`🔗<class_LightmapGIData_property_lightmap_textures>`
  61. .. rst-class:: classref-property-setget
  62. - |void| **set_lightmap_textures**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\]\ )
  63. - :ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\] **get_lightmap_textures**\ (\ )
  64. The lightmap atlas textures generated by the lightmapper.
  65. .. rst-class:: classref-section-separator
  66. ----
  67. .. rst-class:: classref-descriptions-group
  68. Method Descriptions
  69. -------------------
  70. .. _class_LightmapGIData_method_add_user:
  71. .. rst-class:: classref-method
  72. |void| **add_user**\ (\ path\: :ref:`NodePath<class_NodePath>`, uv_scale\: :ref:`Rect2<class_Rect2>`, slice_index\: :ref:`int<class_int>`, sub_instance\: :ref:`int<class_int>`\ ) :ref:`🔗<class_LightmapGIData_method_add_user>`
  73. Adds an object that is considered baked within this **LightmapGIData**.
  74. .. rst-class:: classref-item-separator
  75. ----
  76. .. _class_LightmapGIData_method_clear_users:
  77. .. rst-class:: classref-method
  78. |void| **clear_users**\ (\ ) :ref:`🔗<class_LightmapGIData_method_clear_users>`
  79. Clear all objects that are considered baked within this **LightmapGIData**.
  80. .. rst-class:: classref-item-separator
  81. ----
  82. .. _class_LightmapGIData_method_get_user_count:
  83. .. rst-class:: classref-method
  84. :ref:`int<class_int>` **get_user_count**\ (\ ) |const| :ref:`🔗<class_LightmapGIData_method_get_user_count>`
  85. Returns the number of objects that are considered baked within this **LightmapGIData**.
  86. .. rst-class:: classref-item-separator
  87. ----
  88. .. _class_LightmapGIData_method_get_user_path:
  89. .. rst-class:: classref-method
  90. :ref:`NodePath<class_NodePath>` **get_user_path**\ (\ user_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_LightmapGIData_method_get_user_path>`
  91. Returns the :ref:`NodePath<class_NodePath>` of the baked object at index ``user_idx``.
  92. .. rst-class:: classref-item-separator
  93. ----
  94. .. _class_LightmapGIData_method_is_using_spherical_harmonics:
  95. .. rst-class:: classref-method
  96. :ref:`bool<class_bool>` **is_using_spherical_harmonics**\ (\ ) |const| :ref:`🔗<class_LightmapGIData_method_is_using_spherical_harmonics>`
  97. If ``true``, lightmaps were baked with directional information. See also :ref:`LightmapGI.directional<class_LightmapGI_property_directional>`.
  98. .. rst-class:: classref-item-separator
  99. ----
  100. .. _class_LightmapGIData_method_set_uses_spherical_harmonics:
  101. .. rst-class:: classref-method
  102. |void| **set_uses_spherical_harmonics**\ (\ uses_spherical_harmonics\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_LightmapGIData_method_set_uses_spherical_harmonics>`
  103. If ``uses_spherical_harmonics`` is ``true``, tells the engine to treat the lightmap data as if it was baked with directional information.
  104. \ **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.
  105. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  106. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  107. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  108. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  109. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  110. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  111. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  112. .. |void| replace:: :abbr:`void (No return value.)`