class_bakedlight.rst 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  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_BakedLight:
  4. BakedLight
  5. ==========
  6. **Inherits:** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Member Functions
  11. ----------------
  12. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  13. | void | :ref:`set_mode<class_BakedLight_set_mode>` **(** :ref:`int<class_int>` mode **)** |
  14. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`get_mode<class_BakedLight_get_mode>` **(** **)** const |
  16. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`set_octree<class_BakedLight_set_octree>` **(** :ref:`RawArray<class_rawarray>` octree **)** |
  18. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`RawArray<class_rawarray>` | :ref:`get_octree<class_BakedLight_get_octree>` **(** **)** const |
  20. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`set_light<class_BakedLight_set_light>` **(** :ref:`RawArray<class_rawarray>` light **)** |
  22. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`RawArray<class_rawarray>` | :ref:`get_light<class_BakedLight_get_light>` **(** **)** const |
  24. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`set_sampler_octree<class_BakedLight_set_sampler_octree>` **(** :ref:`IntArray<class_intarray>` sampler_octree **)** |
  26. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`IntArray<class_intarray>` | :ref:`get_sampler_octree<class_BakedLight_get_sampler_octree>` **(** **)** const |
  28. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`add_lightmap<class_BakedLight_add_lightmap>` **(** :ref:`Texture<class_texture>` texture, :ref:`Vector2<class_vector2>` gen_size **)** |
  30. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`erase_lightmap<class_BakedLight_erase_lightmap>` **(** :ref:`int<class_int>` id **)** |
  32. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`clear_lightmaps<class_BakedLight_clear_lightmaps>` **(** **)** |
  34. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`set_cell_subdivision<class_BakedLight_set_cell_subdivision>` **(** :ref:`int<class_int>` cell_subdivision **)** |
  36. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`int<class_int>` | :ref:`get_cell_subdivision<class_BakedLight_get_cell_subdivision>` **(** **)** const |
  38. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`set_initial_lattice_subdiv<class_BakedLight_set_initial_lattice_subdiv>` **(** :ref:`int<class_int>` cell_subdivision **)** |
  40. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`int<class_int>` | :ref:`get_initial_lattice_subdiv<class_BakedLight_get_initial_lattice_subdiv>` **(** **)** const |
  42. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | void | :ref:`set_plot_size<class_BakedLight_set_plot_size>` **(** :ref:`float<class_float>` plot_size **)** |
  44. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`float<class_float>` | :ref:`get_plot_size<class_BakedLight_get_plot_size>` **(** **)** const |
  46. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | void | :ref:`set_bounces<class_BakedLight_set_bounces>` **(** :ref:`int<class_int>` bounces **)** |
  48. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`int<class_int>` | :ref:`get_bounces<class_BakedLight_get_bounces>` **(** **)** const |
  50. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | void | :ref:`set_cell_extra_margin<class_BakedLight_set_cell_extra_margin>` **(** :ref:`float<class_float>` cell_extra_margin **)** |
  52. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | :ref:`float<class_float>` | :ref:`get_cell_extra_margin<class_BakedLight_get_cell_extra_margin>` **(** **)** const |
  54. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | void | :ref:`set_edge_damp<class_BakedLight_set_edge_damp>` **(** :ref:`float<class_float>` edge_damp **)** |
  56. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`float<class_float>` | :ref:`get_edge_damp<class_BakedLight_get_edge_damp>` **(** **)** const |
  58. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | void | :ref:`set_normal_damp<class_BakedLight_set_normal_damp>` **(** :ref:`float<class_float>` normal_damp **)** |
  60. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | :ref:`float<class_float>` | :ref:`get_normal_damp<class_BakedLight_get_normal_damp>` **(** **)** const |
  62. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | void | :ref:`set_tint<class_BakedLight_set_tint>` **(** :ref:`float<class_float>` tint **)** |
  64. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`float<class_float>` | :ref:`get_tint<class_BakedLight_get_tint>` **(** **)** const |
  66. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | void | :ref:`set_saturation<class_BakedLight_set_saturation>` **(** :ref:`float<class_float>` saturation **)** |
  68. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`float<class_float>` | :ref:`get_saturation<class_BakedLight_get_saturation>` **(** **)** const |
  70. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | void | :ref:`set_ao_radius<class_BakedLight_set_ao_radius>` **(** :ref:`float<class_float>` ao_radius **)** |
  72. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | :ref:`float<class_float>` | :ref:`get_ao_radius<class_BakedLight_get_ao_radius>` **(** **)** const |
  74. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | void | :ref:`set_ao_strength<class_BakedLight_set_ao_strength>` **(** :ref:`float<class_float>` ao_strength **)** |
  76. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`float<class_float>` | :ref:`get_ao_strength<class_BakedLight_get_ao_strength>` **(** **)** const |
  78. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | void | :ref:`set_format<class_BakedLight_set_format>` **(** :ref:`int<class_int>` format **)** |
  80. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | :ref:`int<class_int>` | :ref:`get_format<class_BakedLight_get_format>` **(** **)** const |
  82. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | void | :ref:`set_transfer_lightmaps_only_to_uv2<class_BakedLight_set_transfer_lightmaps_only_to_uv2>` **(** :ref:`bool<class_bool>` enable **)** |
  84. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | :ref:`bool<class_bool>` | :ref:`get_transfer_lightmaps_only_to_uv2<class_BakedLight_get_transfer_lightmaps_only_to_uv2>` **(** **)** const |
  86. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | void | :ref:`set_energy_multiplier<class_BakedLight_set_energy_multiplier>` **(** :ref:`float<class_float>` energy_multiplier **)** |
  88. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | :ref:`float<class_float>` | :ref:`get_energy_multiplier<class_BakedLight_get_energy_multiplier>` **(** **)** const |
  90. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | void | :ref:`set_gamma_adjust<class_BakedLight_set_gamma_adjust>` **(** :ref:`float<class_float>` gamma_adjust **)** |
  92. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | :ref:`float<class_float>` | :ref:`get_gamma_adjust<class_BakedLight_get_gamma_adjust>` **(** **)** const |
  94. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | void | :ref:`set_bake_flag<class_BakedLight_set_bake_flag>` **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` enabled **)** |
  96. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | :ref:`bool<class_bool>` | :ref:`get_bake_flag<class_BakedLight_get_bake_flag>` **(** :ref:`int<class_int>` flag **)** const |
  98. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  99. Numeric Constants
  100. -----------------
  101. - **MODE_OCTREE** = **0**
  102. - **MODE_LIGHTMAPS** = **1**
  103. - **BAKE_DIFFUSE** = **0**
  104. - **BAKE_SPECULAR** = **1**
  105. - **BAKE_TRANSLUCENT** = **2**
  106. - **BAKE_CONSERVE_ENERGY** = **3**
  107. - **BAKE_MAX** = **5**
  108. Member Function Description
  109. ---------------------------
  110. .. _class_BakedLight_set_mode:
  111. - void **set_mode** **(** :ref:`int<class_int>` mode **)**
  112. .. _class_BakedLight_get_mode:
  113. - :ref:`int<class_int>` **get_mode** **(** **)** const
  114. .. _class_BakedLight_set_octree:
  115. - void **set_octree** **(** :ref:`RawArray<class_rawarray>` octree **)**
  116. .. _class_BakedLight_get_octree:
  117. - :ref:`RawArray<class_rawarray>` **get_octree** **(** **)** const
  118. .. _class_BakedLight_set_light:
  119. - void **set_light** **(** :ref:`RawArray<class_rawarray>` light **)**
  120. .. _class_BakedLight_get_light:
  121. - :ref:`RawArray<class_rawarray>` **get_light** **(** **)** const
  122. .. _class_BakedLight_set_sampler_octree:
  123. - void **set_sampler_octree** **(** :ref:`IntArray<class_intarray>` sampler_octree **)**
  124. .. _class_BakedLight_get_sampler_octree:
  125. - :ref:`IntArray<class_intarray>` **get_sampler_octree** **(** **)** const
  126. .. _class_BakedLight_add_lightmap:
  127. - void **add_lightmap** **(** :ref:`Texture<class_texture>` texture, :ref:`Vector2<class_vector2>` gen_size **)**
  128. .. _class_BakedLight_erase_lightmap:
  129. - void **erase_lightmap** **(** :ref:`int<class_int>` id **)**
  130. .. _class_BakedLight_clear_lightmaps:
  131. - void **clear_lightmaps** **(** **)**
  132. .. _class_BakedLight_set_cell_subdivision:
  133. - void **set_cell_subdivision** **(** :ref:`int<class_int>` cell_subdivision **)**
  134. .. _class_BakedLight_get_cell_subdivision:
  135. - :ref:`int<class_int>` **get_cell_subdivision** **(** **)** const
  136. .. _class_BakedLight_set_initial_lattice_subdiv:
  137. - void **set_initial_lattice_subdiv** **(** :ref:`int<class_int>` cell_subdivision **)**
  138. .. _class_BakedLight_get_initial_lattice_subdiv:
  139. - :ref:`int<class_int>` **get_initial_lattice_subdiv** **(** **)** const
  140. .. _class_BakedLight_set_plot_size:
  141. - void **set_plot_size** **(** :ref:`float<class_float>` plot_size **)**
  142. .. _class_BakedLight_get_plot_size:
  143. - :ref:`float<class_float>` **get_plot_size** **(** **)** const
  144. .. _class_BakedLight_set_bounces:
  145. - void **set_bounces** **(** :ref:`int<class_int>` bounces **)**
  146. .. _class_BakedLight_get_bounces:
  147. - :ref:`int<class_int>` **get_bounces** **(** **)** const
  148. .. _class_BakedLight_set_cell_extra_margin:
  149. - void **set_cell_extra_margin** **(** :ref:`float<class_float>` cell_extra_margin **)**
  150. .. _class_BakedLight_get_cell_extra_margin:
  151. - :ref:`float<class_float>` **get_cell_extra_margin** **(** **)** const
  152. .. _class_BakedLight_set_edge_damp:
  153. - void **set_edge_damp** **(** :ref:`float<class_float>` edge_damp **)**
  154. .. _class_BakedLight_get_edge_damp:
  155. - :ref:`float<class_float>` **get_edge_damp** **(** **)** const
  156. .. _class_BakedLight_set_normal_damp:
  157. - void **set_normal_damp** **(** :ref:`float<class_float>` normal_damp **)**
  158. .. _class_BakedLight_get_normal_damp:
  159. - :ref:`float<class_float>` **get_normal_damp** **(** **)** const
  160. .. _class_BakedLight_set_tint:
  161. - void **set_tint** **(** :ref:`float<class_float>` tint **)**
  162. .. _class_BakedLight_get_tint:
  163. - :ref:`float<class_float>` **get_tint** **(** **)** const
  164. .. _class_BakedLight_set_saturation:
  165. - void **set_saturation** **(** :ref:`float<class_float>` saturation **)**
  166. .. _class_BakedLight_get_saturation:
  167. - :ref:`float<class_float>` **get_saturation** **(** **)** const
  168. .. _class_BakedLight_set_ao_radius:
  169. - void **set_ao_radius** **(** :ref:`float<class_float>` ao_radius **)**
  170. .. _class_BakedLight_get_ao_radius:
  171. - :ref:`float<class_float>` **get_ao_radius** **(** **)** const
  172. .. _class_BakedLight_set_ao_strength:
  173. - void **set_ao_strength** **(** :ref:`float<class_float>` ao_strength **)**
  174. .. _class_BakedLight_get_ao_strength:
  175. - :ref:`float<class_float>` **get_ao_strength** **(** **)** const
  176. .. _class_BakedLight_set_format:
  177. - void **set_format** **(** :ref:`int<class_int>` format **)**
  178. .. _class_BakedLight_get_format:
  179. - :ref:`int<class_int>` **get_format** **(** **)** const
  180. .. _class_BakedLight_set_transfer_lightmaps_only_to_uv2:
  181. - void **set_transfer_lightmaps_only_to_uv2** **(** :ref:`bool<class_bool>` enable **)**
  182. .. _class_BakedLight_get_transfer_lightmaps_only_to_uv2:
  183. - :ref:`bool<class_bool>` **get_transfer_lightmaps_only_to_uv2** **(** **)** const
  184. .. _class_BakedLight_set_energy_multiplier:
  185. - void **set_energy_multiplier** **(** :ref:`float<class_float>` energy_multiplier **)**
  186. .. _class_BakedLight_get_energy_multiplier:
  187. - :ref:`float<class_float>` **get_energy_multiplier** **(** **)** const
  188. .. _class_BakedLight_set_gamma_adjust:
  189. - void **set_gamma_adjust** **(** :ref:`float<class_float>` gamma_adjust **)**
  190. .. _class_BakedLight_get_gamma_adjust:
  191. - :ref:`float<class_float>` **get_gamma_adjust** **(** **)** const
  192. .. _class_BakedLight_set_bake_flag:
  193. - void **set_bake_flag** **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` enabled **)**
  194. .. _class_BakedLight_get_bake_flag:
  195. - :ref:`bool<class_bool>` **get_bake_flag** **(** :ref:`int<class_int>` flag **)** const