TextureSurface Class

Where an entry of a ImageCollectionKind.TextureSurfaces collection is in its texture: the element of the array, the face of the cube map, the mipmap level and the depth slice.

public sealed class TextureSurface

Remarks

Instances are immutable; this type is thread-safe.

Constructors

NameDescription
TextureSurface(int, CubeMapFace?, int)Initializes a new instance of the TextureSurface class, for an entry added to a collection of texture surfaces.

TextureSurface(int, CubeMapFace?, int)

TextureSurface.cs

Initializes a new instance of the TextureSurface class, for an entry added to a collection of texture surfaces.

public TextureSurface(int arrayIndex = 0, CubeMapFace? face = null, int mipLevel = 0)

Parameters

arrayIndex int
The element of the texture array (of the cube map of a cube map array), 0 for a texture that is not an array.
face CubeMapFace?
The face of a cube map, or null when the texture is not a cube map.
mipLevel int
The mipmap level: 0 is the full-size surface.

Exceptions

ArgumentOutOfRangeException
An index is negative, or face is not a defined CubeMapFace.

Properties

NameDescription
ArrayIndexGets the index of the element of the texture array (of the cube map of a cube map array), 0 for a texture that is not an array.
DepthSliceGets the depth slice of a level of a volume texture, 0 for the other textures.
FaceGets the face of a cube map, or null when the texture is not a cube map.
MipLevelGets the mipmap level: 0 is the full-size surface, and each level halves the dimensions (rounded down, at least 1).

Gets the index of the element of the texture array (of the cube map of a cube map array), 0 for a texture that is not an array.

public int ArrayIndex { get; }

Property value

int

Gets the depth slice of a level of a volume texture, 0 for the other textures.

public int DepthSlice { get; }

Property value

int

Gets the face of a cube map, or null when the texture is not a cube map.

public CubeMapFace? Face { get; }

Property value

CubeMapFace?

Gets the mipmap level: 0 is the full-size surface, and each level halves the dimensions (rounded down, at least 1).

public int MipLevel { get; }

Property value

int

Methods

NameDescription
ToString()Returns a description of the surface, such as array 0, face PositiveX, mip 2, slice 0.

Returns a description of the surface, such as array 0, face PositiveX, mip 2, slice 0.

public override string ToString()

Returns

string The description.