class_texturelayered.rst 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the TextureLayered.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_TextureLayered:
  6. TextureLayered
  7. ==============
  8. **Inherits:** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`CompressedTextureLayered<class_CompressedTextureLayered>`, :ref:`ImageTextureLayered<class_ImageTextureLayered>`
  10. Base class for 3D texture types.
  11. Description
  12. -----------
  13. Base class for :ref:`Texture2DArray<class_Texture2DArray>`, :ref:`Cubemap<class_Cubemap>` and :ref:`CubemapArray<class_CubemapArray>`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. Data is set on a per-layer basis. For :ref:`Texture2DArray<class_Texture2DArray>`\ s, the layer specifies the array layer.
  14. Methods
  15. -------
  16. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`Format<enum_Image_Format>` | :ref:`_get_format<class_TextureLayered_method__get_format>` **(** **)** |virtual| |const| |
  18. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`int<class_int>` | :ref:`_get_height<class_TextureLayered_method__get_height>` **(** **)** |virtual| |const| |
  20. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`Image<class_Image>` | :ref:`_get_layer_data<class_TextureLayered_method__get_layer_data>` **(** :ref:`int<class_int>` layer_index **)** |virtual| |const| |
  22. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`int<class_int>` | :ref:`_get_layered_type<class_TextureLayered_method__get_layered_type>` **(** **)** |virtual| |const| |
  24. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`int<class_int>` | :ref:`_get_layers<class_TextureLayered_method__get_layers>` **(** **)** |virtual| |const| |
  26. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`int<class_int>` | :ref:`_get_width<class_TextureLayered_method__get_width>` **(** **)** |virtual| |const| |
  28. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`_has_mipmaps<class_TextureLayered_method__has_mipmaps>` **(** **)** |virtual| |const| |
  30. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_TextureLayered_method_get_format>` **(** **)** |const| |
  32. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`int<class_int>` | :ref:`get_height<class_TextureLayered_method_get_height>` **(** **)** |const| |
  34. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`Image<class_Image>` | :ref:`get_layer_data<class_TextureLayered_method_get_layer_data>` **(** :ref:`int<class_int>` layer **)** |const| |
  36. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`LayeredType<enum_TextureLayered_LayeredType>` | :ref:`get_layered_type<class_TextureLayered_method_get_layered_type>` **(** **)** |const| |
  38. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`int<class_int>` | :ref:`get_layers<class_TextureLayered_method_get_layers>` **(** **)** |const| |
  40. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`int<class_int>` | :ref:`get_width<class_TextureLayered_method_get_width>` **(** **)** |const| |
  42. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`bool<class_bool>` | :ref:`has_mipmaps<class_TextureLayered_method_has_mipmaps>` **(** **)** |const| |
  44. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  45. Enumerations
  46. ------------
  47. .. _enum_TextureLayered_LayeredType:
  48. .. _class_TextureLayered_constant_LAYERED_TYPE_2D_ARRAY:
  49. .. _class_TextureLayered_constant_LAYERED_TYPE_CUBEMAP:
  50. .. _class_TextureLayered_constant_LAYERED_TYPE_CUBEMAP_ARRAY:
  51. enum **LayeredType**:
  52. - **LAYERED_TYPE_2D_ARRAY** = **0**
  53. - **LAYERED_TYPE_CUBEMAP** = **1**
  54. - **LAYERED_TYPE_CUBEMAP_ARRAY** = **2**
  55. Method Descriptions
  56. -------------------
  57. .. _class_TextureLayered_method__get_format:
  58. - :ref:`Format<enum_Image_Format>` **_get_format** **(** **)** |virtual| |const|
  59. ----
  60. .. _class_TextureLayered_method__get_height:
  61. - :ref:`int<class_int>` **_get_height** **(** **)** |virtual| |const|
  62. ----
  63. .. _class_TextureLayered_method__get_layer_data:
  64. - :ref:`Image<class_Image>` **_get_layer_data** **(** :ref:`int<class_int>` layer_index **)** |virtual| |const|
  65. ----
  66. .. _class_TextureLayered_method__get_layered_type:
  67. - :ref:`int<class_int>` **_get_layered_type** **(** **)** |virtual| |const|
  68. ----
  69. .. _class_TextureLayered_method__get_layers:
  70. - :ref:`int<class_int>` **_get_layers** **(** **)** |virtual| |const|
  71. ----
  72. .. _class_TextureLayered_method__get_width:
  73. - :ref:`int<class_int>` **_get_width** **(** **)** |virtual| |const|
  74. ----
  75. .. _class_TextureLayered_method__has_mipmaps:
  76. - :ref:`bool<class_bool>` **_has_mipmaps** **(** **)** |virtual| |const|
  77. ----
  78. .. _class_TextureLayered_method_get_format:
  79. - :ref:`Format<enum_Image_Format>` **get_format** **(** **)** |const|
  80. Returns the current format being used by this texture. See :ref:`Format<enum_Image_Format>` for details.
  81. ----
  82. .. _class_TextureLayered_method_get_height:
  83. - :ref:`int<class_int>` **get_height** **(** **)** |const|
  84. Returns the height of the texture. Height is typically represented by the Y-axis.
  85. ----
  86. .. _class_TextureLayered_method_get_layer_data:
  87. - :ref:`Image<class_Image>` **get_layer_data** **(** :ref:`int<class_int>` layer **)** |const|
  88. Returns an :ref:`Image<class_Image>` resource with the data from specified ``layer``.
  89. ----
  90. .. _class_TextureLayered_method_get_layered_type:
  91. - :ref:`LayeredType<enum_TextureLayered_LayeredType>` **get_layered_type** **(** **)** |const|
  92. ----
  93. .. _class_TextureLayered_method_get_layers:
  94. - :ref:`int<class_int>` **get_layers** **(** **)** |const|
  95. ----
  96. .. _class_TextureLayered_method_get_width:
  97. - :ref:`int<class_int>` **get_width** **(** **)** |const|
  98. Returns the width of the texture. Width is typically represented by the X-axis.
  99. ----
  100. .. _class_TextureLayered_method_has_mipmaps:
  101. - :ref:`bool<class_bool>` **has_mipmaps** **(** **)** |const|
  102. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  103. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  104. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  105. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  106. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  107. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`