class_cubemap.rst 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the CubeMap.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_CubeMap:
  5. CubeMap
  6. =======
  7. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. A CubeMap is a 6 sided 3D texture.
  12. Properties
  13. ----------
  14. +--------------------------------------+-------------------------------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`flags<class_CubeMap_flags>` |
  16. +--------------------------------------+-------------------------------------------------------------------+
  17. | :ref:`float<class_float>` | :ref:`lossy_storage_quality<class_CubeMap_lossy_storage_quality>` |
  18. +--------------------------------------+-------------------------------------------------------------------+
  19. | :ref:`Storage<enum_CubeMap_Storage>` | :ref:`storage_mode<class_CubeMap_storage_mode>` |
  20. +--------------------------------------+-------------------------------------------------------------------+
  21. Methods
  22. -------
  23. +----------------------------+--------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`int<class_int>` | :ref:`get_height<class_CubeMap_get_height>` **(** **)** const |
  25. +----------------------------+--------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`Image<class_Image>` | :ref:`get_side<class_CubeMap_get_side>` **(** :ref:`Side<enum_CubeMap_Side>` side **)** const |
  27. +----------------------------+--------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`int<class_int>` | :ref:`get_width<class_CubeMap_get_width>` **(** **)** const |
  29. +----------------------------+--------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`set_side<class_CubeMap_set_side>` **(** :ref:`Side<enum_CubeMap_Side>` side, :ref:`Image<class_Image>` image **)** |
  31. +----------------------------+--------------------------------------------------------------------------------------------------------------------------+
  32. Enumerations
  33. ------------
  34. .. _enum_CubeMap_Flags:
  35. enum **Flags**:
  36. - **FLAG_MIPMAPS** = **1** --- Generate mipmaps, to enable smooth zooming out of the texture.
  37. - **FLAG_REPEAT** = **2** --- Repeat (instead of clamp to edge).
  38. - **FLAG_FILTER** = **4** --- Turn on magnifying filter, to enable smooth zooming in of the texture.
  39. - **FLAGS_DEFAULT** = **7** --- Default flags. Generate mipmaps, repeat, and filter are enabled.
  40. .. _enum_CubeMap_Storage:
  41. enum **Storage**:
  42. - **STORAGE_RAW** = **0** --- Store the ``CubeMap`` without any compression.
  43. - **STORAGE_COMPRESS_LOSSY** = **1** --- Store the ``CubeMap`` with strong compression that reduces image quality.
  44. - **STORAGE_COMPRESS_LOSSLESS** = **2** --- Store the ``CubeMap`` with moderate compression that doesn't reduce image quality.
  45. .. _enum_CubeMap_Side:
  46. enum **Side**:
  47. - **SIDE_LEFT** = **0** --- Identifier for the left face of the ``CubeMap``.
  48. - **SIDE_RIGHT** = **1** --- Identifier for the right face of the ``CubeMap``.
  49. - **SIDE_BOTTOM** = **2** --- Identifier for the bottom face of the ``CubeMap``.
  50. - **SIDE_TOP** = **3** --- Identifier for the top face of the ``CubeMap``.
  51. - **SIDE_FRONT** = **4** --- Identifier for the front face of the ``CubeMap``.
  52. - **SIDE_BACK** = **5** --- Identifier for the back face of the ``CubeMap``.
  53. Description
  54. -----------
  55. 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.
  56. Property Descriptions
  57. ---------------------
  58. .. _class_CubeMap_flags:
  59. - :ref:`int<class_int>` **flags**
  60. +----------+------------------+
  61. | *Setter* | set_flags(value) |
  62. +----------+------------------+
  63. | *Getter* | get_flags() |
  64. +----------+------------------+
  65. The render flags for the ``CubeMap``. See the ``FLAG_*`` constants for details.
  66. .. _class_CubeMap_lossy_storage_quality:
  67. - :ref:`float<class_float>` **lossy_storage_quality**
  68. +----------+----------------------------------+
  69. | *Setter* | set_lossy_storage_quality(value) |
  70. +----------+----------------------------------+
  71. | *Getter* | get_lossy_storage_quality() |
  72. +----------+----------------------------------+
  73. The lossy storage quality of the ``CubeMap`` if the storage mode is set to STORAGE_COMPRESS_LOSSY.
  74. .. _class_CubeMap_storage_mode:
  75. - :ref:`Storage<enum_CubeMap_Storage>` **storage_mode**
  76. +----------+--------------------+
  77. | *Setter* | set_storage(value) |
  78. +----------+--------------------+
  79. | *Getter* | get_storage() |
  80. +----------+--------------------+
  81. The ``CubeMap``'s storage mode. See ``STORAGE_*`` constants.
  82. Method Descriptions
  83. -------------------
  84. .. _class_CubeMap_get_height:
  85. - :ref:`int<class_int>` **get_height** **(** **)** const
  86. Returns the ``CubeMap``'s height.
  87. .. _class_CubeMap_get_side:
  88. - :ref:`Image<class_Image>` **get_side** **(** :ref:`Side<enum_CubeMap_Side>` side **)** const
  89. Returns an :ref:`Image<class_Image>` for a side of the ``CubeMap`` using one of the ``SIDE_*`` constants or an integer 0-5.
  90. .. _class_CubeMap_get_width:
  91. - :ref:`int<class_int>` **get_width** **(** **)** const
  92. Returns the ``CubeMap``'s width.
  93. .. _class_CubeMap_set_side:
  94. - void **set_side** **(** :ref:`Side<enum_CubeMap_Side>` side, :ref:`Image<class_Image>` image **)**
  95. Sets an :ref:`Image<class_Image>` for a side of the ``CubeMap`` using one of the ``SIDE_*`` constants or an integer 0-5.