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
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
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
GetFormat()
Returns the current format being used by this texture. See Image.Format for details.
public Image.Format GetFormat()
Returns
GetHeight()
Returns the Texture3D's height in pixels. Width is typically represented by the Y axis.
public int GetHeight()
Returns
GetWidth()
Returns the Texture3D's width in pixels. Width is typically represented by the X axis.
public int GetWidth()
Returns
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_nameName of the method to check for.
Returns
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_nameName of the signal to check for.
Returns
HasMipmaps()
Returns true
if the Texture3D has generated mipmaps.
public bool HasMipmaps()
Returns
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_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
_GetData()
Called when the Texture3D's data is queried.
public virtual Array<Image> _GetData()
Returns
_GetDepth()
Called when the Texture3D's depth is queried.
public virtual int _GetDepth()
Returns
_GetFormat()
Called when the Texture3D's format is queried.
public virtual Image.Format _GetFormat()
Returns
_GetHeight()
Called when the Texture3D's height is queried.
public virtual int _GetHeight()
Returns
_GetWidth()
Called when the Texture3D's width is queried.
public virtual int _GetWidth()
Returns
_HasMipmaps()
Called when the presence of mipmaps in the Texture3D is queried.
public virtual bool _HasMipmaps()