class_cubemap.rst 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. Member Functions
  13. ----------------
  14. +----------------------------+-----------------------------------------------------------------------------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`get_height<class_CubeMap_get_height>` **(** **)** const |
  16. +----------------------------+-----------------------------------------------------------------------------------------------------------------+
  17. | :ref:`Image<class_image>` | :ref:`get_side<class_CubeMap_get_side>` **(** :ref:`int<class_int>` side **)** const |
  18. +----------------------------+-----------------------------------------------------------------------------------------------------------------+
  19. | :ref:`int<class_int>` | :ref:`get_width<class_CubeMap_get_width>` **(** **)** const |
  20. +----------------------------+-----------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`set_side<class_CubeMap_set_side>` **(** :ref:`int<class_int>` side, :ref:`Image<class_image>` image **)** |
  22. +----------------------------+-----------------------------------------------------------------------------------------------------------------+
  23. Member Variables
  24. ----------------
  25. .. _class_CubeMap_flags:
  26. - :ref:`int<class_int>` **flags** - The render flags for the ``CubeMap``. See the ``FLAG_*`` constants for details.
  27. .. _class_CubeMap_lossy_storage_quality:
  28. - :ref:`float<class_float>` **lossy_storage_quality** - The lossy storage quality of the ``CubeMap`` if the storage mode is set to STORAGE_COMPRESS_LOSSY.
  29. .. _class_CubeMap_storage_mode:
  30. - :ref:`Storage<enum_cubemap_storage>` **storage_mode** - The ``CubeMap``'s storage mode. See ``STORAGE_*`` constants.
  31. Enums
  32. -----
  33. .. _enum_CubeMap_Flags:
  34. enum **Flags**
  35. - **FLAG_MIPMAPS** = **1** --- Generate mipmaps, to enable smooth zooming out of the texture.
  36. - **FLAG_REPEAT** = **2** --- Repeat (instead of clamp to edge).
  37. - **FLAG_FILTER** = **4** --- Turn on magnifying filter, to enable smooth zooming in of the texture.
  38. - **FLAGS_DEFAULT** = **7** --- Default flags. Generate mipmaps, repeat, and filter are enabled.
  39. .. _enum_CubeMap_Storage:
  40. enum **Storage**
  41. - **STORAGE_RAW** = **0** --- Store the ``CubeMap`` without any compression.
  42. - **STORAGE_COMPRESS_LOSSY** = **1** --- Store the ``CubeMap`` with strong compression that reduces image quality.
  43. - **STORAGE_COMPRESS_LOSSLESS** = **2** --- Store the ``CubeMap`` with moderate compression that doesn't reduce image quality.
  44. .. _enum_CubeMap_Side:
  45. enum **Side**
  46. - **SIDE_LEFT** = **0** --- Identifier for the left face of the ``CubeMap``.
  47. - **SIDE_RIGHT** = **1** --- Identifier for the right face of the ``CubeMap``.
  48. - **SIDE_BOTTOM** = **2** --- Identifier for the bottom face of the ``CubeMap``.
  49. - **SIDE_TOP** = **3** --- Identifier for the top face of the ``CubeMap``.
  50. - **SIDE_FRONT** = **4** --- Identifier for the front face of the ``CubeMap``.
  51. - **SIDE_BACK** = **5** --- Identifier for the back face of the ``CubeMap``.
  52. Description
  53. -----------
  54. 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.
  55. Member Function Description
  56. ---------------------------
  57. .. _class_CubeMap_get_height:
  58. - :ref:`int<class_int>` **get_height** **(** **)** const
  59. Returns the ``CubeMap``'s height.
  60. .. _class_CubeMap_get_side:
  61. - :ref:`Image<class_image>` **get_side** **(** :ref:`int<class_int>` side **)** const
  62. Returns an :ref:`Image<class_image>` for a side of the ``CubeMap`` using one of the ``SIDE_*`` constants or an integer 0-5.
  63. .. _class_CubeMap_get_width:
  64. - :ref:`int<class_int>` **get_width** **(** **)** const
  65. Returns the ``CubeMap``'s width.
  66. .. _class_CubeMap_set_side:
  67. - void **set_side** **(** :ref:`int<class_int>` side, :ref:`Image<class_image>` image **)**
  68. Sets an :ref:`Image<class_image>` for a side of the ``CubeMap`` using one of the ``SIDE_*`` constants or an integer 0-5.