class_texture3d.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Texture3D.xml.
  6. .. _class_Texture3D:
  7. Texture3D
  8. =========
  9. **Inherits:** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`CompressedTexture3D<class_CompressedTexture3D>`, :ref:`ImageTexture3D<class_ImageTexture3D>`, :ref:`NoiseTexture3D<class_NoiseTexture3D>`, :ref:`PlaceholderTexture3D<class_PlaceholderTexture3D>`, :ref:`Texture3DRD<class_Texture3DRD>`
  11. Base class for 3-dimensional textures.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. Base class for :ref:`ImageTexture3D<class_ImageTexture3D>` and :ref:`CompressedTexture3D<class_CompressedTexture3D>`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. **Texture3D** is the base class for all 3-dimensional texture types. See also :ref:`TextureLayered<class_TextureLayered>`.
  16. All images need to have the same width, height and number of mipmap levels.
  17. To create such a texture file yourself, reimport your image files using the Godot Editor import presets.
  18. .. rst-class:: classref-reftable-group
  19. Methods
  20. -------
  21. .. table::
  22. :widths: auto
  23. +--------------------------------------------------------+------------------------------------------------------------------------------------------+
  24. | :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] | :ref:`_get_data<class_Texture3D_private_method__get_data>`\ (\ ) |virtual| |const| |
  25. +--------------------------------------------------------+------------------------------------------------------------------------------------------+
  26. | :ref:`int<class_int>` | :ref:`_get_depth<class_Texture3D_private_method__get_depth>`\ (\ ) |virtual| |const| |
  27. +--------------------------------------------------------+------------------------------------------------------------------------------------------+
  28. | :ref:`Format<enum_Image_Format>` | :ref:`_get_format<class_Texture3D_private_method__get_format>`\ (\ ) |virtual| |const| |
  29. +--------------------------------------------------------+------------------------------------------------------------------------------------------+
  30. | :ref:`int<class_int>` | :ref:`_get_height<class_Texture3D_private_method__get_height>`\ (\ ) |virtual| |const| |
  31. +--------------------------------------------------------+------------------------------------------------------------------------------------------+
  32. | :ref:`int<class_int>` | :ref:`_get_width<class_Texture3D_private_method__get_width>`\ (\ ) |virtual| |const| |
  33. +--------------------------------------------------------+------------------------------------------------------------------------------------------+
  34. | :ref:`bool<class_bool>` | :ref:`_has_mipmaps<class_Texture3D_private_method__has_mipmaps>`\ (\ ) |virtual| |const| |
  35. +--------------------------------------------------------+------------------------------------------------------------------------------------------+
  36. | :ref:`Resource<class_Resource>` | :ref:`create_placeholder<class_Texture3D_method_create_placeholder>`\ (\ ) |const| |
  37. +--------------------------------------------------------+------------------------------------------------------------------------------------------+
  38. | :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] | :ref:`get_data<class_Texture3D_method_get_data>`\ (\ ) |const| |
  39. +--------------------------------------------------------+------------------------------------------------------------------------------------------+
  40. | :ref:`int<class_int>` | :ref:`get_depth<class_Texture3D_method_get_depth>`\ (\ ) |const| |
  41. +--------------------------------------------------------+------------------------------------------------------------------------------------------+
  42. | :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_Texture3D_method_get_format>`\ (\ ) |const| |
  43. +--------------------------------------------------------+------------------------------------------------------------------------------------------+
  44. | :ref:`int<class_int>` | :ref:`get_height<class_Texture3D_method_get_height>`\ (\ ) |const| |
  45. +--------------------------------------------------------+------------------------------------------------------------------------------------------+
  46. | :ref:`int<class_int>` | :ref:`get_width<class_Texture3D_method_get_width>`\ (\ ) |const| |
  47. +--------------------------------------------------------+------------------------------------------------------------------------------------------+
  48. | :ref:`bool<class_bool>` | :ref:`has_mipmaps<class_Texture3D_method_has_mipmaps>`\ (\ ) |const| |
  49. +--------------------------------------------------------+------------------------------------------------------------------------------------------+
  50. .. rst-class:: classref-section-separator
  51. ----
  52. .. rst-class:: classref-descriptions-group
  53. Method Descriptions
  54. -------------------
  55. .. _class_Texture3D_private_method__get_data:
  56. .. rst-class:: classref-method
  57. :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] **_get_data**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture3D_private_method__get_data>`
  58. Called when the **Texture3D**'s data is queried.
  59. .. rst-class:: classref-item-separator
  60. ----
  61. .. _class_Texture3D_private_method__get_depth:
  62. .. rst-class:: classref-method
  63. :ref:`int<class_int>` **_get_depth**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture3D_private_method__get_depth>`
  64. Called when the **Texture3D**'s depth is queried.
  65. .. rst-class:: classref-item-separator
  66. ----
  67. .. _class_Texture3D_private_method__get_format:
  68. .. rst-class:: classref-method
  69. :ref:`Format<enum_Image_Format>` **_get_format**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture3D_private_method__get_format>`
  70. Called when the **Texture3D**'s format is queried.
  71. .. rst-class:: classref-item-separator
  72. ----
  73. .. _class_Texture3D_private_method__get_height:
  74. .. rst-class:: classref-method
  75. :ref:`int<class_int>` **_get_height**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture3D_private_method__get_height>`
  76. Called when the **Texture3D**'s height is queried.
  77. .. rst-class:: classref-item-separator
  78. ----
  79. .. _class_Texture3D_private_method__get_width:
  80. .. rst-class:: classref-method
  81. :ref:`int<class_int>` **_get_width**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture3D_private_method__get_width>`
  82. Called when the **Texture3D**'s width is queried.
  83. .. rst-class:: classref-item-separator
  84. ----
  85. .. _class_Texture3D_private_method__has_mipmaps:
  86. .. rst-class:: classref-method
  87. :ref:`bool<class_bool>` **_has_mipmaps**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture3D_private_method__has_mipmaps>`
  88. Called when the presence of mipmaps in the **Texture3D** is queried.
  89. .. rst-class:: classref-item-separator
  90. ----
  91. .. _class_Texture3D_method_create_placeholder:
  92. .. rst-class:: classref-method
  93. :ref:`Resource<class_Resource>` **create_placeholder**\ (\ ) |const| :ref:`🔗<class_Texture3D_method_create_placeholder>`
  94. Creates a placeholder version of this resource (:ref:`PlaceholderTexture3D<class_PlaceholderTexture3D>`).
  95. .. rst-class:: classref-item-separator
  96. ----
  97. .. _class_Texture3D_method_get_data:
  98. .. rst-class:: classref-method
  99. :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] **get_data**\ (\ ) |const| :ref:`🔗<class_Texture3D_method_get_data>`
  100. Returns the **Texture3D**'s data as an array of :ref:`Image<class_Image>`\ s. Each :ref:`Image<class_Image>` represents a *slice* of the **Texture3D**, with different slices mapping to different depth (Z axis) levels.
  101. .. rst-class:: classref-item-separator
  102. ----
  103. .. _class_Texture3D_method_get_depth:
  104. .. rst-class:: classref-method
  105. :ref:`int<class_int>` **get_depth**\ (\ ) |const| :ref:`🔗<class_Texture3D_method_get_depth>`
  106. Returns the **Texture3D**'s depth in pixels. Depth is typically represented by the Z axis (a dimension not present in :ref:`Texture2D<class_Texture2D>`).
  107. .. rst-class:: classref-item-separator
  108. ----
  109. .. _class_Texture3D_method_get_format:
  110. .. rst-class:: classref-method
  111. :ref:`Format<enum_Image_Format>` **get_format**\ (\ ) |const| :ref:`🔗<class_Texture3D_method_get_format>`
  112. Returns the current format being used by this texture. See :ref:`Format<enum_Image_Format>` for details.
  113. .. rst-class:: classref-item-separator
  114. ----
  115. .. _class_Texture3D_method_get_height:
  116. .. rst-class:: classref-method
  117. :ref:`int<class_int>` **get_height**\ (\ ) |const| :ref:`🔗<class_Texture3D_method_get_height>`
  118. Returns the **Texture3D**'s height in pixels. Width is typically represented by the Y axis.
  119. .. rst-class:: classref-item-separator
  120. ----
  121. .. _class_Texture3D_method_get_width:
  122. .. rst-class:: classref-method
  123. :ref:`int<class_int>` **get_width**\ (\ ) |const| :ref:`🔗<class_Texture3D_method_get_width>`
  124. Returns the **Texture3D**'s width in pixels. Width is typically represented by the X axis.
  125. .. rst-class:: classref-item-separator
  126. ----
  127. .. _class_Texture3D_method_has_mipmaps:
  128. .. rst-class:: classref-method
  129. :ref:`bool<class_bool>` **has_mipmaps**\ (\ ) |const| :ref:`🔗<class_Texture3D_method_has_mipmaps>`
  130. Returns ``true`` if the **Texture3D** has generated mipmaps.
  131. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  132. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  133. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  134. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  135. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  136. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  137. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  138. .. |void| replace:: :abbr:`void (No return value.)`