Struct MipMapCount
Describes the number of mipmap levels of a Texture.
public readonly struct MipMapCount : IEquatable<MipMapCount>
- Implements
- Inherited Members
- Extension Methods
Remarks
MipMapCount allows implicit conversion from several types of values:
Constructors
MipMapCount(bool)
Initializes a new instance of the MipMapCount struct.
public MipMapCount(bool allMipMaps)
Parameters
allMipMapsbooltrue to indicate that all mipmap levels should be generated; false to indicate only a single level.
MipMapCount(int)
Initializes a new instance of the MipMapCount struct.
public MipMapCount(int count)
Parameters
countintThe mipmap count.
Fields
Auto
Automatic mipmap count based on the size of the Texture (i.e. the whole mipchain).
public static readonly MipMapCount Auto
Field Value
Count
The number of mipmaps.
public readonly int Count
Field Value
Remarks
A value of zero (0) means that all mipmaps (the whole mipchain) will be generated. A value of one (1) means only a single mipmap is generated. Any other number indicates the number of mipmaps to generate.
One
Just a single mipmap.
public static readonly MipMapCount One
Field Value
Methods
Equals(MipMapCount)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(MipMapCount other)
Parameters
otherMipMapCountAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Operators
operator ==(MipMapCount, MipMapCount)
public static bool operator ==(MipMapCount left, MipMapCount right)
Parameters
leftMipMapCountrightMipMapCount
Returns
implicit operator bool(MipMapCount)
Performs an implicit conversion from MipMapCount to bool.
public static implicit operator bool(MipMapCount mipMap)
Parameters
mipMapMipMapCountThe value to convert.
Returns
- bool
true if all mipmap levels should be generated; false a single level or more should be generated.
implicit operator int(MipMapCount)
Performs an implicit conversion from MipMapCount to int.
public static implicit operator int(MipMapCount mipMap)
Parameters
mipMapMipMapCountThe value to convert.
Returns
- int
The number of mipmaps. A value of zero (0) means all mipmaps.
implicit operator MipMapCount(bool)
Performs an implicit conversion from bool to MipMapCount.
public static implicit operator MipMapCount(bool allMipMaps)
Parameters
allMipMapsbooltrue to indicate that all mipmap levels should be generated; false to indicate only a single level.
Returns
- MipMapCount
The result of the conversion.
implicit operator MipMapCount(int)
Performs an implicit conversion from int to MipMapCount.
public static implicit operator MipMapCount(int mipMapCount)
Parameters
mipMapCountintThe number of mipmaps. A value of zero (0) means all mipmaps.
Returns
- MipMapCount
The result of the conversion.
operator !=(MipMapCount, MipMapCount)
public static bool operator !=(MipMapCount left, MipMapCount right)
Parameters
leftMipMapCountrightMipMapCount