class_texturelayered.rst 4.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.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:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`Cubemap<class_Cubemap>`, :ref:`CubemapArray<class_CubemapArray>`, :ref:`Texture2DArray<class_Texture2DArray>`
  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:`Error<enum_@GlobalScope_Error>` | :ref:`create_from_images<class_TextureLayered_method_create_from_images>` **(** :ref:`Array<class_Array>` images **)** |
  18. +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_TextureLayered_method_get_format>` **(** **)** const |
  20. +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`int<class_int>` | :ref:`get_height<class_TextureLayered_method_get_height>` **(** **)** const |
  22. +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`Image<class_Image>` | :ref:`get_layer_data<class_TextureLayered_method_get_layer_data>` **(** :ref:`int<class_int>` layer **)** const |
  24. +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`int<class_int>` | :ref:`get_layers<class_TextureLayered_method_get_layers>` **(** **)** const |
  26. +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`int<class_int>` | :ref:`get_width<class_TextureLayered_method_get_width>` **(** **)** const |
  28. +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`update_layer<class_TextureLayered_method_update_layer>` **(** :ref:`Image<class_Image>` image, :ref:`int<class_int>` layer **)** |
  30. +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
  31. Method Descriptions
  32. -------------------
  33. .. _class_TextureLayered_method_create_from_images:
  34. - :ref:`Error<enum_@GlobalScope_Error>` **create_from_images** **(** :ref:`Array<class_Array>` images **)**
  35. ----
  36. .. _class_TextureLayered_method_get_format:
  37. - :ref:`Format<enum_Image_Format>` **get_format** **(** **)** const
  38. Returns the current format being used by this texture. See :ref:`Format<enum_Image_Format>` for details.
  39. ----
  40. .. _class_TextureLayered_method_get_height:
  41. - :ref:`int<class_int>` **get_height** **(** **)** const
  42. Returns the height of the texture. Height is typically represented by the Y-axis.
  43. ----
  44. .. _class_TextureLayered_method_get_layer_data:
  45. - :ref:`Image<class_Image>` **get_layer_data** **(** :ref:`int<class_int>` layer **)** const
  46. Returns an :ref:`Image<class_Image>` resource with the data from specified ``layer``.
  47. ----
  48. .. _class_TextureLayered_method_get_layers:
  49. - :ref:`int<class_int>` **get_layers** **(** **)** const
  50. ----
  51. .. _class_TextureLayered_method_get_width:
  52. - :ref:`int<class_int>` **get_width** **(** **)** const
  53. Returns the width of the texture. Width is typically represented by the X-axis.
  54. ----
  55. .. _class_TextureLayered_method_update_layer:
  56. - void **update_layer** **(** :ref:`Image<class_Image>` image, :ref:`int<class_int>` layer **)**