Texture3D

package
v0.0.0-...-ae8aae0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package Texture3D provides methods for working with Texture3D object instances.

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 Implementation

type Implementation = implementation

Implementation implements Interface with empty methods.

type Instance

type Instance [1]gdclass.Texture3D

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.

See [Interface] for methods that can be overridden by a [Class] that extends it.

%!(EXTRA string=Texture3D)

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() [1]gdclass.Resource

Creates a placeholder version of this resource ([PlaceholderTexture3D]).

func (Instance) GetData

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

Returns the [Texture3D]'s data as an array of [Image]s. Each [Image] represents a [i]slice[/i] 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() gdclass.ImageFormat

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

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 [code]true[/code] if the [Texture3D] has generated mipmaps.

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

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

type Interface

type Interface interface {
	//Called when the [Texture3D]'s format is queried.
	GetFormat() gdclass.ImageFormat
	//Called when the [Texture3D]'s width is queried.
	GetWidth() int
	//Called when the [Texture3D]'s height is queried.
	GetHeight() int
	//Called when the [Texture3D]'s depth is queried.
	GetDepth() int
	//Called when the presence of mipmaps in the [Texture3D] is queried.
	HasMipmaps() bool
	//Called when the [Texture3D]'s data is queried.
	GetData() [][1]gdclass.Image
}

Jump to

Keyboard shortcuts

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