Texture3D

package
v0.0.0-...-e10d1cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsTexture3D() Instance
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this [Extension]See Interface for methods that can be overridden by T.

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

func (*Extension[T]) AsResource

func (self *Extension[T]) AsResource() Resource.Instance

func (*Extension[T]) AsTexture

func (self *Extension[T]) AsTexture() Texture.Instance

func (*Extension[T]) AsTexture3D

func (self *Extension[T]) AsTexture3D() Instance

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Implementation

type Implementation = implementation

Implementation implements Interface with empty methods.

type Instance

type Instance [1]gdclass.Texture3D

Instance of the class with convieniently typed arguments and results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) AsTexture

func (self Instance) AsTexture() Texture.Instance

func (Instance) AsTexture3D

func (self Instance) AsTexture3D() Instance

func (Instance) CreatePlaceholder

func (self Instance) CreatePlaceholder() Resource.Instance

Creates a placeholder version of this resource (PlaceholderTexture3D).

func (Instance) GetData

func (self Instance) GetData() []Image.Instance

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.

func (Instance) GetDepth

func (self Instance) GetDepth() int

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

func (Instance) GetFormat

func (self Instance) GetFormat() Image.Format

Returns the current format being used by this texture.

func (Instance) GetHeight

func (self Instance) GetHeight() int

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

func (Instance) GetWidth

func (self Instance) GetWidth() int

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

func (Instance) HasMipmaps

func (self Instance) HasMipmaps() bool

Returns true if the Texture3D has generated mipmaps.

func (Instance) ID

func (self Instance) ID() ID

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

type Interface

type Interface interface {
	// Called when the [Texture3D]'s format is queried.
	//
	// [Texture3D]: https://pkg.go.dev/graphics.gd/classdb/Texture3D
	GetFormat() Image.Format
	// Called when the [Texture3D]'s width is queried.
	//
	// [Texture3D]: https://pkg.go.dev/graphics.gd/classdb/Texture3D
	GetWidth() int
	// Called when the [Texture3D]'s height is queried.
	//
	// [Texture3D]: https://pkg.go.dev/graphics.gd/classdb/Texture3D
	GetHeight() int
	// Called when the [Texture3D]'s depth is queried.
	//
	// [Texture3D]: https://pkg.go.dev/graphics.gd/classdb/Texture3D
	GetDepth() int
	// Called when the presence of mipmaps in the [Texture3D] is queried.
	//
	// [Texture3D]: https://pkg.go.dev/graphics.gd/classdb/Texture3D
	HasMipmaps() bool
	// Called when the [Texture3D]'s data is queried.
	//
	// [Texture3D]: https://pkg.go.dev/graphics.gd/classdb/Texture3D
	GetData() []Image.Instance
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL