Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    MipMapCount Struct

    Namespace: Stride.Graphics
    Assembly: Stride.dll

    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>
    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.

    Name Description
    Constructors
    MipMapCount(Boolean)

    Initializes a new instance of the MipMapCount struct.

    MipMapCount(Int32)

    Initializes a new instance of the MipMapCount struct.

    Fields
    Auto

    Automatic mipmap level based on texture size.

    Count

    Number of mipmaps.

    Methods
    Equals(MipMapCount)
    Equals(Object)
    GetHashCode()
    Operators
    Equality(MipMapCount, MipMapCount)
    Implicit(MipMapCount to Boolean)

    Performs an explicit conversion from MipMapCount to System.Boolean.

    Implicit(MipMapCount to Int32)

    Performs an explicit conversion from MipMapCount to System.Int32.

    Implicit(Boolean to MipMapCount)

    Performs an explicit conversion from System.Boolean to MipMapCount.

    Implicit(Int32 to MipMapCount)

    Performs an explicit conversion from System.Int32 to MipMapCount.

    Inequality(MipMapCount, MipMapCount)
    | Improve this Doc View Source

    Constructors


    MipMapCount(Boolean)

    Initializes a new instance of the MipMapCount struct.

    public MipMapCount(bool allMipMaps)
    Parameters
    Type Name Description
    System.Boolean allMipMaps

    if set to true generates all mip maps.


    MipMapCount(Int32)

    Initializes a new instance of the MipMapCount struct.

    public MipMapCount(int count)
    Parameters
    Type Name Description
    System.Int32 count

    The count.

    | Improve this Doc View Source

    Fields


    Auto

    Automatic mipmap level based on texture size.

    public static readonly MipMapCount Auto
    Field Value
    Type Description
    MipMapCount

    Count

    Number of mipmaps.

    public readonly int Count
    Field Value
    Type Description
    System.Int32
    Remarks

    Zero(0) means generate all mipmaps. One(1) generates a single mipmap... etc.

    | Improve this Doc View Source

    Methods


    Equals(MipMapCount)

    public bool Equals(MipMapCount other)
    Parameters
    Type Name Description
    MipMapCount other
    Returns
    Type Description
    System.Boolean

    Equals(Object)

    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()
    | Improve this Doc View Source

    Operators


    Equality(MipMapCount, MipMapCount)

    public static bool operator ==(MipMapCount left, MipMapCount right)
    Parameters
    Type Name Description
    MipMapCount left
    MipMapCount right
    Returns
    Type Description
    System.Boolean

    Implicit(MipMapCount to Boolean)

    Performs an explicit conversion from MipMapCount to System.Boolean.

    public static implicit operator bool (MipMapCount mipMap)
    Parameters
    Type Name Description
    MipMapCount mipMap

    The value.

    Returns
    Type Description
    System.Boolean

    The result of the conversion.


    Implicit(MipMapCount to Int32)

    Performs an explicit conversion from MipMapCount to System.Int32.

    public static implicit operator int (MipMapCount mipMap)
    Parameters
    Type Name Description
    MipMapCount mipMap

    The value.

    Returns
    Type Description
    System.Int32

    The count of mipmap (0 means all mipmaps).


    Implicit(Boolean to MipMapCount)

    Performs an explicit conversion from System.Boolean to MipMapCount.

    public static implicit operator MipMapCount(bool mipMapAll)
    Parameters
    Type Name Description
    System.Boolean mipMapAll

    True to generate all mipmaps, false to use a single mipmap.

    Returns
    Type Description
    MipMapCount

    The result of the conversion.


    Implicit(Int32 to MipMapCount)

    Performs an explicit conversion from System.Int32 to MipMapCount.

    public static implicit operator MipMapCount(int mipMapCount)
    Parameters
    Type Name Description
    System.Int32 mipMapCount

    True to generate all mipmaps, false to use a single mipmap.

    Returns
    Type Description
    MipMapCount

    The result of the conversion.


    Inequality(MipMapCount, MipMapCount)

    public static bool operator !=(MipMapCount left, MipMapCount right)
    Parameters
    Type Name Description
    MipMapCount left
    MipMapCount right
    Returns
    Type Description
    System.Boolean

    Inherited Members

    System.ValueType.ToString()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation