Gorgon
Show / Hide Table of Contents

Interface IGorgonImageBufferList

A container for a list of image buffers.

Inherited Members
IReadOnlyList<IGorgonImageBuffer>.this[int]
IReadOnlyCollection<IGorgonImageBuffer>.Count
IEnumerable<IGorgonImageBuffer>.GetEnumerator()
Namespace: Gorgon.Graphics.Imaging
Assembly: Gorgon.Graphics.Imaging.dll
Syntax
public interface IGorgonImageBufferList : IReadOnlyList<IGorgonImageBuffer>, IReadOnlyCollection<IGorgonImageBuffer>, IEnumerable<IGorgonImageBuffer>, IEnumerable

Properties

| Edit this page View Source

this[int, int]

Property to return the buffer for the given mip map level and depth slice.

Declaration
IGorgonImageBuffer this[int mipLevel, int depthSliceOrArrayIndex = 0] { get; }
Parameters
Type Name Description
int mipLevel
int depthSliceOrArrayIndex
Property Value
Type Description
IGorgonImageBuffer
Remarks

To get the array length, or the mip map count, use the IGorgonImage.ArrayCount, or IGorgonImage.MipCount property.

To get the depth slice count, use the GetDepthCount(int) method.

The depthSliceOrArrayIndex parameter is used as an array index if the image is 1D or 2D. If it is a 3D image, then the value indicates a depth slice.

Exceptions
Type Condition
ArgumentOutOfRangeException

Thrown when the array index or the depth slice parameters are larger than their respective boundaries, or less than 0. Only thrown when this assembly is compiled in DEBUG mode.

Methods

| Edit this page View Source

Contains(int, int)

Function to determine if a buffer with the given mip level and optional depth slice or array index.

Declaration
bool Contains(int mipLevel, int depthSliceOrArrayIndex = 0)
Parameters
Type Name Description
int mipLevel

The mip map level to look up.

int depthSliceOrArrayIndex

[Optional] The depth slice (for 3D images) or array index (for 1D or 2D images) to look up.

Returns
Type Description
bool

true if the mip and/or depth slice/array index are in this list.

| Edit this page View Source

IndexOf(IGorgonImageBuffer)

Function to retrieve the index of a given buffer within the list.

Declaration
int IndexOf(IGorgonImageBuffer buffer)
Parameters
Type Name Description
IGorgonImageBuffer buffer

The buffer to look up.

Returns
Type Description
int

The index of the buffer within the list, or -1 if not found.

| Edit this page View Source

IndexOf(int, int)

Function to retrieve the index of a buffer within the list using a mip map level and optional depth slice or array index.

Declaration
int IndexOf(int mipLevel, int depthSliceOrArrayIndex = 0)
Parameters
Type Name Description
int mipLevel

The mip map level to look up.

int depthSliceOrArrayIndex

[Optional] The depth slice (for 3D images) or array index (for 1D or 2D images) to look up.

Returns
Type Description
int

The index of the buffer within the list, or -1 if not found.

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonTreeLinqExtensions.TraverseDepthFirst<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
GorgonTreeLinqExtensions.Traverse<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
GorgonIReadOnlyListExtensions.Contains<T>(IReadOnlyList<T>, T)
GorgonIReadOnlyListExtensions.CopyTo<T>(IReadOnlyList<T>, T[])
GorgonIReadOnlyListExtensions.FirstIndexOf<T>(IReadOnlyList<T>, Predicate<T>)
GorgonIReadOnlyListExtensions.IndexOf<T>(IReadOnlyList<T>, T)
GorgonIReadOnlyListExtensions.LastIndexOf<T>(IReadOnlyList<T>, Predicate<T>)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author