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 ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Implementation
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AsTexture() Texture.Instance
- func (self Instance) AsTexture3D() Instance
- func (self Instance) CreatePlaceholder() Resource.Instance
- func (self Instance) GetData() []Image.Instance
- func (self Instance) GetDepth() int
- func (self Instance) GetFormat() Image.Format
- func (self Instance) GetHeight() int
- func (self Instance) GetWidth() int
- func (self Instance) HasMipmaps() bool
- func (self Instance) ID() ID
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) Virtual(name string) reflect.Value
- type Interface
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 Extension ¶
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]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
func (*Extension[T]) AsTexture3D ¶
type 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.
type Implementation ¶
type Implementation = implementation
Implementation implements Interface with empty methods.
type Instance ¶
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 (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) AsTexture3D ¶
func (Instance) CreatePlaceholder ¶
Creates a placeholder version of this resource (PlaceholderTexture3D).
func (Instance) 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.
func (Instance) GetDepth ¶
Returns the Texture3D's depth in pixels. Depth is typically represented by the Z axis (a dimension not present in Texture2D).
func (Instance) GetHeight ¶
Returns the Texture3D's height in pixels. Width is typically represented by the Y axis.
func (Instance) GetWidth ¶
Returns the Texture3D's width in pixels. Width is typically represented by the X axis.
func (Instance) HasMipmaps ¶
Returns true if the Texture3D has generated mipmaps.
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 }