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
true
to specify all mipmaps. - Set to
false
to 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
allMipMaps
boolif set to
true
generates all mip maps.
MipMapCount(int)
Initializes a new instance of the MipMapCount struct.
public MipMapCount(int count)
Parameters
count
intThe count.
Fields
Auto
Automatic mipmap level based on texture size.
public static readonly MipMapCount Auto
Field Value
Count
Number of mipmaps.
public readonly int Count
Field 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
other
MipMapCountAn 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
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and 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
left
MipMapCountright
MipMapCount
Returns
implicit operator bool(MipMapCount)
Performs an explicit conversion from MipMapCount to bool.
public static implicit operator bool(MipMapCount mipMap)
Parameters
mipMap
MipMapCountThe 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
mipMap
MipMapCountThe 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
mipMapAll
boolTrue 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
mipMapCount
intTrue 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
left
MipMapCountright
MipMapCount