Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

Texture3D

繼承: Texture < Resource < RefCounted < Object

被繼承: CompressedTexture3D, ImageTexture3D, NoiseTexture3D, PlaceholderTexture3D, Texture3DRD

Base class for 3-dimensional textures.

說明

ImageTexture3DCompressedTexture3D 的基底類別。無法直接使用,但包含所有訪問衍生資源型別所需的函式。Texture3D 是所有三維紋理型別的基底類別。另見 TextureLayered

所有圖像都需要有相同的寬度、高度和 mipmap 層數。

要自己建立這樣的紋理檔,請使用 Godot 編輯器的匯入預設重新匯入你的影像檔。

方法

Array[Image]

_get_data() virtual required const

int

_get_depth() virtual required const

Format

_get_format() virtual required const

int

_get_height() virtual required const

int

_get_width() virtual required const

bool

_has_mipmaps() virtual required const

Resource

create_placeholder() const

Array[Image]

get_data() const

int

get_depth() const

Format

get_format() const

int

get_height() const

int

get_width() const

bool

has_mipmaps() const


方法說明

Array[Image] _get_data() virtual required const 🔗

查詢該 Texture3D 的資料時被呼叫。


int _get_depth() virtual required const 🔗

查詢該 Texture3D 的深度時被呼叫。


Format _get_format() virtual required const 🔗

查詢該 Texture3D 的格式時被呼叫。


int _get_height() virtual required const 🔗

查詢該 Texture3D 的高度時被呼叫。


int _get_width() virtual required const 🔗

查詢該 Texture3D 的寬度時被呼叫。


bool _has_mipmaps() virtual required const 🔗

查詢該 Texture3D 的 Mipmap 是否存在時被呼叫。


Resource create_placeholder() const 🔗

建立該資源的預留位置版本(PlaceholderTexture3D)。


Array[Image] get_data() const 🔗

將該 Texture3D 的資料作為 Image 陣列返回。每個 Image 代表該 Texture3D 的一個切片,不同的切片對應到不同的深度(Z 軸)級別。


int get_depth() const 🔗

返回該 Texture3D 的深度,單位為圖元。深度通常由 Z 軸表示(Texture2D 中沒有這個維度)。


Format get_format() const 🔗

Returns the current format being used by this texture.


int get_height() const 🔗

返回該 Texture3D 的高度,單位為圖元。寬度通常由 Y 軸表示。


int get_width() const 🔗

返回該 Texture3D 的寬度,單位為圖元。寬度通常由 X 軸表示。


bool has_mipmaps() const 🔗

如果該 Texture3D 已生成 mipmap,則返回 true