Texture3D

继承: Texture < Resource < RefCounted < Object

派生: CompressedTexture3D, ImageTexture3D, NoiseTexture3D, PlaceholderTexture3D, Texture3DRD

3维纹理的基类。

描述

ImageTexture3DCompressedTexture3D的基类。不能直接使用,但包含访问派生资源类型所需的所有函数。Texture3D是所有3维纹理类型的基类。另请参阅TextureLayered

所有图像都需要具有相同的宽度、高度和mipmap级别数。

要自己创建这样的纹理文件,请使用i3D编辑器导入预设重新导入图像文件。

方法

Array[Image]

_get_data() virtual const

int

_get_depth() virtual const

Format

_get_format() virtual const

int

_get_height() virtual const

int

_get_width() virtual const

bool

_has_mipmaps() virtual 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 const 🔗

查询Texture3D的数据时调用。


int _get_depth() virtual const 🔗

查询Texture3D的深度时调用。


Format _get_format() virtual const 🔗

查询Texture3D的格式时调用。


int _get_height() virtual const 🔗

查询Texture3D的高度时调用。


int _get_width() virtual const 🔗

查询Texture3D的宽度时调用。


bool _has_mipmaps() virtual const 🔗

当查询Texture3D中存在mipmap时调用。


Resource create_placeholder() const 🔗

创建此资源(PlaceholderTexture3D)的占位符版本。


Array[Image] get_data() const 🔗

Images数组的形式返回Texture3D的数据。每个Image代表Texture3D切片,不同的切片映射到不同的深度(Z轴)级别。


int get_depth() const 🔗

返回Texture3D的像素深度。深度通常由Z轴表示(Texture2D中不存在的维度)。


Format get_format() const 🔗

返回此纹理使用的当前格式。有关详细信息,请参阅Format


int get_height() const 🔗

返回Texture3D的高度(以像素为单位)。宽度通常由Y轴表示。


int get_width() const 🔗

返回Texture3D的宽度(以像素为单位)。宽度通常由X轴表示。


bool has_mipmaps() const 🔗

如果Texture3D已生成mipmap,则返回true