Table of Contents

Class Texture3D

Namespace
Godot
Assembly
GodotSharp.dll

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.

public class Texture3D : Texture, IDisposable
Inheritance
Texture3D
Implements
Derived
Inherited Members

Constructors

Texture3D()

public Texture3D()

Methods

CreatePlaceholder()

Creates a placeholder version of this resource (PlaceholderTexture3D).

public Resource CreatePlaceholder()

Returns

Resource

GetData()

Returns the Texture3D's data as an array of Images. Each Image represents a slice of the Texture3D, with different slices mapping to different depth (Z axis) levels.

public Array<Image> GetData()

Returns

Array<Image>

GetDepth()

Returns the Texture3D's depth in pixels. Depth is typically represented by the Z axis (a dimension not present in Texture2D).

public int GetDepth()

Returns

int

GetFormat()

Returns the current format being used by this texture. See Image.Format for details.

public Image.Format GetFormat()

Returns

Image.Format

GetHeight()

Returns the Texture3D's height in pixels. Width is typically represented by the Y axis.

public int GetHeight()

Returns

int

GetWidth()

Returns the Texture3D's width in pixels. Width is typically represented by the X axis.

public int GetWidth()

Returns

int

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

HasMipmaps()

Returns true if the Texture3D has generated mipmaps.

public bool HasMipmaps()

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool

_GetData()

Called when the Texture3D's data is queried.

public virtual Array<Image> _GetData()

Returns

Array<Image>

_GetDepth()

Called when the Texture3D's depth is queried.

public virtual int _GetDepth()

Returns

int

_GetFormat()

Called when the Texture3D's format is queried.

public virtual Image.Format _GetFormat()

Returns

Image.Format

_GetHeight()

Called when the Texture3D's height is queried.

public virtual int _GetHeight()

Returns

int

_GetWidth()

Called when the Texture3D's width is queried.

public virtual int _GetWidth()

Returns

int

_HasMipmaps()

Called when the presence of mipmaps in the Texture3D is queried.

public virtual bool _HasMipmaps()

Returns

bool