Search Results for

    Show / Hide Table of Contents

    Struct CompoundTextureKey

    Represents a compound key composed of a texture reference and a texture type.

    Namespace: TriLibCore.General
    Assembly: TriLibCore.Source.dll
    Syntax
    public struct CompoundTextureKey
    Remarks

    This key is typically used in dictionaries or hash-based collections where both the texture instance and its semantic type must be considered to uniquely identify an entry.

    Constructors

    CompoundTextureKey(ITexture, TextureType)

    Initializes a new instance of the CompoundTextureKey struct.

    Declaration
    public CompoundTextureKey(ITexture texture, TextureType type)
    Parameters
    Type Name Description
    ITexture texture

    The texture component of the key.

    TextureType type

    The texture type component of the key.

    Fields

    Texture

    Gets or sets the texture associated with this key.

    Declaration
    public ITexture Texture
    Field Value
    Type Description
    ITexture

    Type

    Gets or sets the texture type associated with this key.

    Declaration
    public TextureType Type
    Field Value
    Type Description
    TextureType

    Properties

    ResolvedFilename

    Gets the resolved filename associated with the underlying texture, if available.

    Declaration
    public string ResolvedFilename { get; }
    Property Value
    Type Description
    string
    Remarks

    This value is typically used for debugging, logging, or asset resolution purposes.

    Methods

    Equals(object)

    Determines whether this instance is equal to another object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare.

    Returns
    Type Description
    bool

    true if obj is a CompoundTextureKey and is equal; otherwise, false.

    Overrides
    ValueType.Equals(Object)

    Equals(CompoundTextureKey)

    Determines whether this instance is equal to another CompoundTextureKey.

    Declaration
    public bool Equals(CompoundTextureKey other)
    Parameters
    Type Name Description
    CompoundTextureKey other

    The other key to compare.

    Returns
    Type Description
    bool

    true if both the texture and texture type match; otherwise, false.

    GetHashCode()

    Returns a hash code for this instance based on the texture and texture type.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The computed hash code.

    Overrides
    ValueType.GetHashCode()

    Extension Methods

    IObjectExtensions.TryToDispose<T>(object)
    In this article
    Back to top TriLib documentation