class_cubemap.rst 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/CubeMap.xml.
  6. .. _class_CubeMap:
  7. CubeMap
  8. =======
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. A CubeMap is a 6-sided 3D texture.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A 6-sided 3D texture typically used for faking reflections. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +--------------------------------------+----------------------------------------------------------------------------+---------+
  21. | :ref:`int<class_int>` | :ref:`flags<class_CubeMap_property_flags>` | ``7`` |
  22. +--------------------------------------+----------------------------------------------------------------------------+---------+
  23. | :ref:`float<class_float>` | :ref:`lossy_storage_quality<class_CubeMap_property_lossy_storage_quality>` | ``0.7`` |
  24. +--------------------------------------+----------------------------------------------------------------------------+---------+
  25. | :ref:`Storage<enum_CubeMap_Storage>` | :ref:`storage_mode<class_CubeMap_property_storage_mode>` | ``0`` |
  26. +--------------------------------------+----------------------------------------------------------------------------+---------+
  27. .. rst-class:: classref-reftable-group
  28. Methods
  29. -------
  30. .. table::
  31. :widths: auto
  32. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`int<class_int>` | :ref:`get_height<class_CubeMap_method_get_height>` **(** **)** |const| |
  34. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`Image<class_Image>` | :ref:`get_side<class_CubeMap_method_get_side>` **(** :ref:`Side<enum_CubeMap_Side>` side **)** |const| |
  36. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`int<class_int>` | :ref:`get_width<class_CubeMap_method_get_width>` **(** **)** |const| |
  38. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`set_side<class_CubeMap_method_set_side>` **(** :ref:`Side<enum_CubeMap_Side>` side, :ref:`Image<class_Image>` image **)** |
  40. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  41. .. rst-class:: classref-section-separator
  42. ----
  43. .. rst-class:: classref-descriptions-group
  44. Enumerations
  45. ------------
  46. .. _enum_CubeMap_Storage:
  47. .. rst-class:: classref-enumeration
  48. enum **Storage**:
  49. .. _class_CubeMap_constant_STORAGE_RAW:
  50. .. rst-class:: classref-enumeration-constant
  51. :ref:`Storage<enum_CubeMap_Storage>` **STORAGE_RAW** = ``0``
  52. Store the **CubeMap** without any compression.
  53. .. _class_CubeMap_constant_STORAGE_COMPRESS_LOSSY:
  54. .. rst-class:: classref-enumeration-constant
  55. :ref:`Storage<enum_CubeMap_Storage>` **STORAGE_COMPRESS_LOSSY** = ``1``
  56. Store the **CubeMap** with strong compression that reduces image quality.
  57. .. _class_CubeMap_constant_STORAGE_COMPRESS_LOSSLESS:
  58. .. rst-class:: classref-enumeration-constant
  59. :ref:`Storage<enum_CubeMap_Storage>` **STORAGE_COMPRESS_LOSSLESS** = ``2``
  60. Store the **CubeMap** with moderate compression that doesn't reduce image quality.
  61. .. rst-class:: classref-item-separator
  62. ----
  63. .. _enum_CubeMap_Side:
  64. .. rst-class:: classref-enumeration
  65. enum **Side**:
  66. .. _class_CubeMap_constant_SIDE_LEFT:
  67. .. rst-class:: classref-enumeration-constant
  68. :ref:`Side<enum_CubeMap_Side>` **SIDE_LEFT** = ``0``
  69. Identifier for the left face of the **CubeMap**.
  70. .. _class_CubeMap_constant_SIDE_RIGHT:
  71. .. rst-class:: classref-enumeration-constant
  72. :ref:`Side<enum_CubeMap_Side>` **SIDE_RIGHT** = ``1``
  73. Identifier for the right face of the **CubeMap**.
  74. .. _class_CubeMap_constant_SIDE_BOTTOM:
  75. .. rst-class:: classref-enumeration-constant
  76. :ref:`Side<enum_CubeMap_Side>` **SIDE_BOTTOM** = ``2``
  77. Identifier for the bottom face of the **CubeMap**.
  78. .. _class_CubeMap_constant_SIDE_TOP:
  79. .. rst-class:: classref-enumeration-constant
  80. :ref:`Side<enum_CubeMap_Side>` **SIDE_TOP** = ``3``
  81. Identifier for the top face of the **CubeMap**.
  82. .. _class_CubeMap_constant_SIDE_FRONT:
  83. .. rst-class:: classref-enumeration-constant
  84. :ref:`Side<enum_CubeMap_Side>` **SIDE_FRONT** = ``4``
  85. Identifier for the front face of the **CubeMap**.
  86. .. _class_CubeMap_constant_SIDE_BACK:
  87. .. rst-class:: classref-enumeration-constant
  88. :ref:`Side<enum_CubeMap_Side>` **SIDE_BACK** = ``5``
  89. Identifier for the back face of the **CubeMap**.
  90. .. rst-class:: classref-item-separator
  91. ----
  92. .. _enum_CubeMap_Flags:
  93. .. rst-class:: classref-enumeration
  94. enum **Flags**:
  95. .. _class_CubeMap_constant_FLAG_MIPMAPS:
  96. .. rst-class:: classref-enumeration-constant
  97. :ref:`Flags<enum_CubeMap_Flags>` **FLAG_MIPMAPS** = ``1``
  98. Generate mipmaps, to enable smooth zooming out of the texture.
  99. .. _class_CubeMap_constant_FLAG_REPEAT:
  100. .. rst-class:: classref-enumeration-constant
  101. :ref:`Flags<enum_CubeMap_Flags>` **FLAG_REPEAT** = ``2``
  102. Repeat (instead of clamp to edge).
  103. .. _class_CubeMap_constant_FLAG_FILTER:
  104. .. rst-class:: classref-enumeration-constant
  105. :ref:`Flags<enum_CubeMap_Flags>` **FLAG_FILTER** = ``4``
  106. Turn on magnifying filter, to enable smooth zooming in of the texture.
  107. .. _class_CubeMap_constant_FLAGS_DEFAULT:
  108. .. rst-class:: classref-enumeration-constant
  109. :ref:`Flags<enum_CubeMap_Flags>` **FLAGS_DEFAULT** = ``7``
  110. Default flags. Generate mipmaps, repeat, and filter are enabled.
  111. .. rst-class:: classref-section-separator
  112. ----
  113. .. rst-class:: classref-descriptions-group
  114. Property Descriptions
  115. ---------------------
  116. .. _class_CubeMap_property_flags:
  117. .. rst-class:: classref-property
  118. :ref:`int<class_int>` **flags** = ``7``
  119. .. rst-class:: classref-property-setget
  120. - void **set_flags** **(** :ref:`int<class_int>` value **)**
  121. - :ref:`int<class_int>` **get_flags** **(** **)**
  122. The render flags for the **CubeMap**. See the :ref:`Flags<enum_CubeMap_Flags>` constants for details.
  123. .. rst-class:: classref-item-separator
  124. ----
  125. .. _class_CubeMap_property_lossy_storage_quality:
  126. .. rst-class:: classref-property
  127. :ref:`float<class_float>` **lossy_storage_quality** = ``0.7``
  128. .. rst-class:: classref-property-setget
  129. - void **set_lossy_storage_quality** **(** :ref:`float<class_float>` value **)**
  130. - :ref:`float<class_float>` **get_lossy_storage_quality** **(** **)**
  131. The lossy storage quality of the **CubeMap** if the storage mode is set to :ref:`STORAGE_COMPRESS_LOSSY<class_CubeMap_constant_STORAGE_COMPRESS_LOSSY>`.
  132. .. rst-class:: classref-item-separator
  133. ----
  134. .. _class_CubeMap_property_storage_mode:
  135. .. rst-class:: classref-property
  136. :ref:`Storage<enum_CubeMap_Storage>` **storage_mode** = ``0``
  137. .. rst-class:: classref-property-setget
  138. - void **set_storage** **(** :ref:`Storage<enum_CubeMap_Storage>` value **)**
  139. - :ref:`Storage<enum_CubeMap_Storage>` **get_storage** **(** **)**
  140. The **CubeMap**'s storage mode. See :ref:`Storage<enum_CubeMap_Storage>` constants.
  141. .. rst-class:: classref-section-separator
  142. ----
  143. .. rst-class:: classref-descriptions-group
  144. Method Descriptions
  145. -------------------
  146. .. _class_CubeMap_method_get_height:
  147. .. rst-class:: classref-method
  148. :ref:`int<class_int>` **get_height** **(** **)** |const|
  149. Returns the **CubeMap**'s height.
  150. .. rst-class:: classref-item-separator
  151. ----
  152. .. _class_CubeMap_method_get_side:
  153. .. rst-class:: classref-method
  154. :ref:`Image<class_Image>` **get_side** **(** :ref:`Side<enum_CubeMap_Side>` side **)** |const|
  155. Returns an :ref:`Image<class_Image>` for a side of the **CubeMap** using one of the :ref:`Side<enum_CubeMap_Side>` constants.
  156. .. rst-class:: classref-item-separator
  157. ----
  158. .. _class_CubeMap_method_get_width:
  159. .. rst-class:: classref-method
  160. :ref:`int<class_int>` **get_width** **(** **)** |const|
  161. Returns the **CubeMap**'s width.
  162. .. rst-class:: classref-item-separator
  163. ----
  164. .. _class_CubeMap_method_set_side:
  165. .. rst-class:: classref-method
  166. void **set_side** **(** :ref:`Side<enum_CubeMap_Side>` side, :ref:`Image<class_Image>` image **)**
  167. Sets an :ref:`Image<class_Image>` for a side of the **CubeMap** using one of the :ref:`Side<enum_CubeMap_Side>` constants.
  168. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  169. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  170. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  171. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`