Class TextureComparators
Provides methods for comparing and hashing ITexture instances.
Inherited Members
Namespace: TriLibCore.Utils
Assembly: TriLibCore.dll
Syntax
public static class TextureComparators
Methods
Equals(ITexture, object)
Determines whether an ITexture instance is equal to the specified object.
Declaration
public static bool Equals(ITexture a, object b)
Parameters
| Type | Name | Description |
|---|---|---|
| ITexture | a | The texture to compare. |
| object | b | The object to compare against. |
Returns
| Type | Description |
|---|---|
| bool | true if |
GetHashCode(ITexture)
Generates a hash code for the specified ITexture using its short file name or name.
Declaration
public static int GetHashCode(ITexture a)
Parameters
| Type | Name | Description |
|---|---|---|
| ITexture | a | The texture for which to generate a hash code. |
Returns
| Type | Description |
|---|---|
| int | An integer hash code suitable for use in data structures like hash tables, or zero if |
TextureEquals(ITexture, ITexture)
Determines whether two ITexture instances represent the same texture. This method primarily checks if both textures have the same short file name or the same name.
Declaration
public static bool TextureEquals(ITexture a, ITexture b)
Parameters
| Type | Name | Description |
|---|---|---|
| ITexture | a | The first texture to compare. |
| ITexture | b | The second texture to compare. |
Returns
| Type | Description |
|---|---|
| bool | true if both textures are considered equal; otherwise, false. |