Texture3D
Base class for 3-dimensional textures.
Texture3D.swift:22class 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.
Superclasses
class Texture
Base class for all texture types.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
Instance members
func createPlaceholder(
) -> Resource? Creates a placeholder version of this resource (
PlaceholderTexture3D
).func getData(
) -> ObjectCollection<Image> Returns the
Texture3D
’s data as an array ofImage
s. EachImage
represents a slice of theTexture3D
, with different slices mapping to different depth (Z axis) levels.func getDepth(
) -> Int32 Returns the
Texture3D
’s depth in pixels. Depth is typically represented by the Z axis (a dimension not present inTexture2D
).func getFormat(
) -> Image.Format Returns the current format being used by this texture. See
Image.Format
for details.func getHeight(
) -> Int32 Returns the
Texture3D
’s height in pixels. Width is typically represented by the Y axis.func getWidth(
) -> Int32 Returns the
Texture3D
’s width in pixels. Width is typically represented by the X axis.func hasMipmaps(
) -> Bool Returns
true
if theTexture3D
has generated mipmaps.
Show implementation details (6)
Hide implementation details
func _getData(
) -> ObjectCollection<Image> Called when the
Texture3D
’s data is queried.func _getDepth(
) -> Int32 Called when the
Texture3D
’s depth is queried.func _getFormat(
) -> Image.Format Called when the
Texture3D
’s format is queried.func _getHeight(
) -> Int32 Called when the
Texture3D
’s height is queried.func _getWidth(
) -> Int32 Called when the
Texture3D
’s width is queried.func _hasMipmaps(
) -> Bool Called when the presence of mipmaps in the
Texture3D
is queried.
Subclasses
class CompressedTexture3D
Texture with 3 dimensions, optionally compressed.
class ImageTexture3D
Texture with 3 dimensions.
class NoiseTexture3D
A 3D texture filled with noise generated by a
Noise
object.class PlaceholderTexture3D
Placeholder class for a 3-dimensional texture.
class Texture3DRD
Texture for 3D that is bound to a texture created on the
RenderingDevice
.