class_bakedlight.rst 24 KB

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