C# Class FBX.SceneLoader.MaterialsDatabase

This materials database is a collection of materials that reference textures and parameters for each material
ファイルを表示 Open project: Patapom/GodComplex Class Usage Examples

Protected Properties

Property Type Description
m_MaterialName2Material Material>.Dictionary
m_Materials List
m_QueriedMaterials List

Public Methods

Method Description
BuildFromM2 ( DirectoryInfo _RootDirectory ) : int

Builds the database from a recursive parsing of M2 files on disk

Clear ( ) : void

Clears the database

ClearQueriedMaterialsList ( ) : void
FindByName ( string _Name ) : Material

Finds a material by its name

MaterialsDatabase ( ) : System
ParseM2 ( FileInfo _M2File ) : FBX.SceneLoader.Objects.Material[]

Parses a M2 file and creates the materials from it

Private Methods

Method Description
FindEOL ( string _Text, int _StartIndex ) : int
IndexOfClosingBrace ( string _Text, int _StartIndex ) : int

Provided an index right after an opening brace, finds the corresponding closing brace or -1 if none is found

IsWordChar ( char C ) : bool
MatchWholeWord ( string _Text, string _Pattern ) : int

Whole word pattern matching (case insensitive)

MatchWholeWord ( string _Text, string _Pattern, int _Index ) : int
ParseParameter ( string _Text, string _Pattern, string _ApendExtensionIfMissing ) : string

Method Details

BuildFromM2() public method

Builds the database from a recursive parsing of M2 files on disk
public BuildFromM2 ( DirectoryInfo _RootDirectory ) : int
_RootDirectory System.IO.DirectoryInfo
return int

Clear() public method

Clears the database
public Clear ( ) : void
return void

ClearQueriedMaterialsList() public method

public ClearQueriedMaterialsList ( ) : void
return void

FindByName() public method

Finds a material by its name
public FindByName ( string _Name ) : Material
_Name string
return FBX.SceneLoader.Objects.Material

MaterialsDatabase() public method

public MaterialsDatabase ( ) : System
return System

ParseM2() public static method

Parses a M2 file and creates the materials from it
public static ParseM2 ( FileInfo _M2File ) : FBX.SceneLoader.Objects.Material[]
_M2File System.IO.FileInfo
return FBX.SceneLoader.Objects.Material[]

Property Details

m_MaterialName2Material protected_oe property

protected Dictionary m_MaterialName2Material
return Material>.Dictionary

m_Materials protected_oe property

protected List m_Materials
return List

m_QueriedMaterials protected_oe property

protected List m_QueriedMaterials
return List