mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
classref: Sync with current master branch (7d9923b2e)
This commit is contained in:
@@ -14,7 +14,16 @@ Texture3D
|
||||
|
||||
**Inherited By:** :ref:`CompressedTexture3D<class_CompressedTexture3D>`, :ref:`ImageTexture3D<class_ImageTexture3D>`, :ref:`PlaceholderTexture3D<class_PlaceholderTexture3D>`
|
||||
|
||||
Base class for 3-dimensionnal textures.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
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>`.
|
||||
|
||||
All images need to have the same width, height and number of mipmap levels.
|
||||
|
||||
To create such a texture file yourself, reimport your image files using the Godot Editor import presets.
|
||||
|
||||
Methods
|
||||
-------
|
||||
@@ -52,72 +61,96 @@ Method Descriptions
|
||||
|
||||
- :ref:`Image[]<class_Image>` **_get_data** **(** **)** |virtual| |const|
|
||||
|
||||
Called when the ``Texture3D``'s data is queried.
|
||||
|
||||
----
|
||||
|
||||
.. _class_Texture3D_method__get_depth:
|
||||
|
||||
- :ref:`int<class_int>` **_get_depth** **(** **)** |virtual| |const|
|
||||
|
||||
Called when the ``Texture3D``'s depth is queried.
|
||||
|
||||
----
|
||||
|
||||
.. _class_Texture3D_method__get_format:
|
||||
|
||||
- :ref:`Format<enum_Image_Format>` **_get_format** **(** **)** |virtual| |const|
|
||||
|
||||
Called when the ``Texture3D``'s format is queried.
|
||||
|
||||
----
|
||||
|
||||
.. _class_Texture3D_method__get_height:
|
||||
|
||||
- :ref:`int<class_int>` **_get_height** **(** **)** |virtual| |const|
|
||||
|
||||
Called when the ``Texture3D``'s height is queried.
|
||||
|
||||
----
|
||||
|
||||
.. _class_Texture3D_method__get_width:
|
||||
|
||||
- :ref:`int<class_int>` **_get_width** **(** **)** |virtual| |const|
|
||||
|
||||
Called when the ``Texture3D``'s width is queried.
|
||||
|
||||
----
|
||||
|
||||
.. _class_Texture3D_method__has_mipmaps:
|
||||
|
||||
- :ref:`bool<class_bool>` **_has_mipmaps** **(** **)** |virtual| |const|
|
||||
|
||||
Called when the presence of mipmaps in the ``Texture3D`` is queried.
|
||||
|
||||
----
|
||||
|
||||
.. _class_Texture3D_method_get_data:
|
||||
|
||||
- :ref:`Image[]<class_Image>` **get_data** **(** **)** |const|
|
||||
|
||||
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.
|
||||
|
||||
----
|
||||
|
||||
.. _class_Texture3D_method_get_depth:
|
||||
|
||||
- :ref:`int<class_int>` **get_depth** **(** **)** |const|
|
||||
|
||||
Returns the ``Texture3D``'s depth in pixels. Depth is typically represented by the Z axis (a dimension not present in :ref:`Texture2D<class_Texture2D>`).
|
||||
|
||||
----
|
||||
|
||||
.. _class_Texture3D_method_get_format:
|
||||
|
||||
- :ref:`Format<enum_Image_Format>` **get_format** **(** **)** |const|
|
||||
|
||||
Returns the current format being used by this texture. See :ref:`Format<enum_Image_Format>` for details.
|
||||
|
||||
----
|
||||
|
||||
.. _class_Texture3D_method_get_height:
|
||||
|
||||
- :ref:`int<class_int>` **get_height** **(** **)** |const|
|
||||
|
||||
Returns the ``Texture3D``'s height in pixels. Width is typically represented by the Y axis.
|
||||
|
||||
----
|
||||
|
||||
.. _class_Texture3D_method_get_width:
|
||||
|
||||
- :ref:`int<class_int>` **get_width** **(** **)** |const|
|
||||
|
||||
Returns the ``Texture3D``'s width in pixels. Width is typically represented by the X axis.
|
||||
|
||||
----
|
||||
|
||||
.. _class_Texture3D_method_has_mipmaps:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_mipmaps** **(** **)** |const|
|
||||
|
||||
Returns ``true`` if the ``Texture3D`` has generated mipmaps.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
|
||||
Reference in New Issue
Block a user