Struct MipMapCount
A simple wrapper to specify number of mipmaps. Set to true to specify all mipmaps or sets an integer value >= 1 to specify the exact number of mipmaps.
public struct MipMapCount : IEquatable<MipMapCount>- Implements
- Inherited Members
Remarks
This structure use implicit conversion:
- Set to trueto specify all mipmaps.
- Set to falseto specify a single mipmap.
- Set to an integer value >=1 to specify an exact count of mipmaps.
Constructors
MipMapCount(bool)
Initializes a new instance of the MipMapCount struct.
public MipMapCount(bool allMipMaps)Parameters
- allMipMapsbool
- if set to - truegenerates all mip maps.
MipMapCount(int)
Initializes a new instance of the MipMapCount struct.
public MipMapCount(int count)Parameters
- countint
- The count. 
Fields
Auto
Automatic mipmap level based on texture size.
public static readonly MipMapCount AutoField Value
Count
Number of mipmaps.
public readonly int CountField Value
Remarks
Zero(0) means generate all mipmaps. One(1) generates a single mipmap... etc.
Methods
Equals(MipMapCount)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(MipMapCount other)Parameters
- otherMipMapCount
- An 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
- objobject
- The 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
- leftMipMapCount
- rightMipMapCount
Returns
implicit operator bool(MipMapCount)
Performs an explicit conversion from MipMapCount to bool.
public static implicit operator bool(MipMapCount mipMap)Parameters
- mipMapMipMapCount
- The value. 
Returns
- bool
- The result of the conversion. 
implicit operator int(MipMapCount)
Performs an explicit conversion from MipMapCount to int.
public static implicit operator int(MipMapCount mipMap)Parameters
- mipMapMipMapCount
- The value. 
Returns
- int
- The count of mipmap (0 means all mipmaps). 
implicit operator MipMapCount(bool)
Performs an explicit conversion from bool to MipMapCount.
public static implicit operator MipMapCount(bool mipMapAll)Parameters
- mipMapAllbool
- True to generate all mipmaps, false to use a single mipmap. 
Returns
- MipMapCount
- The result of the conversion. 
implicit operator MipMapCount(int)
Performs an explicit conversion from int to MipMapCount.
public static implicit operator MipMapCount(int mipMapCount)Parameters
- mipMapCountint
- True to generate all mipmaps, false to use a single mipmap. 
Returns
- MipMapCount
- The result of the conversion. 
operator !=(MipMapCount, MipMapCount)
public static bool operator !=(MipMapCount left, MipMapCount right)Parameters
- leftMipMapCount
- rightMipMapCount