Show / Hide Table of Contents

    Class MtlLibrary

    Class for parsing and storing material libraries from .mtl files

    Inheritance
    Object
    MtlLibrary
    Namespace: i5.Toolkit.Core.ModelImporters
    Assembly: cs.temp.dll.dll
    Syntax
    public class MtlLibrary

    Constructors

    MtlLibrary()

    Constructor

    Declaration
    public MtlLibrary()

    Properties

    ContentLoader

    Gets or sets the module which loads the .mtl files

    Declaration
    public IContentLoader<string> ContentLoader { get; set; }
    Property Value
    Type Description
    IContentLoader<String>

    ExtendedLogging

    If set to true, the service will log additional information, e.g. comments in the .mtl file

    Declaration
    public bool ExtendedLogging { get; set; }
    Property Value
    Type Description
    Boolean

    Methods

    GetMaterialConstructor(String, String)

    Returns a material from a library as a material constructor instance

    Declaration
    public MaterialConstructor GetMaterialConstructor(string materialLibrary, string materialName)
    Parameters
    Type Name Description
    String materialLibrary

    The library name which contains the material

    String materialName

    The name of the material in the library

    Returns
    Type Description
    MaterialConstructor

    Returns a material constructor that resembles the material; returns null if the libarary or material does not exist

    LibraryLoaded(String)

    Returns true if the library with the given name was loaded

    Declaration
    public bool LibraryLoaded(string name)
    Parameters
    Type Name Description
    String name

    The name of the library

    Returns
    Type Description
    Boolean

    Returns true if the library was loaded

    LoadLibraryAsyc(Uri, String)

    Asynchronously loads a material library from the specified URI

    Declaration
    public Task<bool> LoadLibraryAsyc(Uri uri, string libraryName)
    Parameters
    Type Name Description
    Uri uri

    Full uri to the .mtl file

    String libraryName

    The name of the library

    Returns
    Type Description
    Task<Boolean>

    Returns true if the library could be loaded

    Back to top i5 Toolkit Documentation