Texture3D
继承: Texture
< Resource
< RefCounted
< Object
派生: CompressedTexture3D
, ImageTexture3D
, NoiseTexture3D
, PlaceholderTexture3D
, Texture3DRD
Base class for 3-dimensional textures.
描述
Base class for ImageTexture3D
and 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 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.
方法
Array Image | _get_data ( ) virtual1 const2 |
int | _get_depth ( ) virtual1 const2 |
Format | _get_format ( ) virtual1 const2 |
int | _get_height ( ) virtual1 const2 |
int | _get_width ( ) virtual1 const2 |
bool | _has_mipmaps ( ) virtual1 const2 |
Resource | create_placeholder ( ) const2 |
Array Image | get_data ( ) const2 |
int | get_depth ( ) const2 |
Format | get_format ( ) const2 |
int | get_height ( ) const2 |
int | get_width ( ) const2 |
bool | has_mipmaps ( ) const2 |
方法说明
Array Image
_get_data ( ) virtual1 const2
Called when the Texture3D's data is queried.
int
_get_depth ( ) virtual1 const2
Called when the Texture3D's depth is queried.
Format _get_format ( ) virtual1 const2
Called when the Texture3D's format is queried.
int
_get_height ( ) virtual1 const2
Called when the Texture3D's height is queried.
int
_get_width ( ) virtual1 const2
Called when the Texture3D's width is queried.
bool
_has_mipmaps ( ) virtual1 const2
Called when the presence of mipmaps in the Texture3D is queried.
Resource
create_placeholder ( ) const2
Creates a placeholder version of this resource (PlaceholderTexture3D
).
Array Image
get_data ( ) const2
Returns the Texture3D's data as an array of Image
s. Each Image
represents a slice of the Texture3D, with different slices mapping to different depth (Z axis) levels.
Returns the Texture3D's depth in pixels. Depth is typically represented by the Z axis (a dimension not present in Texture2D
).
Returns the current format being used by this texture. See Format for details.
Returns the Texture3D's height in pixels. Width is typically represented by the Y axis.
Returns the Texture3D's width in pixels. Width is typically represented by the X axis.
Returns true
if the Texture3D has generated mipmaps.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。