C# Class MaterialsOptimizer.Material

Afficher le fichier Open project: Patapom/GodComplex Class Usage Examples

Méthodes publiques

Свойство Type Description
m_errors string
m_forbiddenParms List
m_glossMinMax float2
m_height Layer.Texture
m_isUsingCloudParms bool
m_isUsingVegetationParms bool
m_isUsingWaterParms bool
m_layers List
m_lightMap Layer.Texture
m_metallicMinMax float2
m_name string
m_options Options
m_parms Parms
m_physicsMaterial string
m_programs Programs
m_sourceFileName System.IO.FileInfo
m_states States
m_unknownVariables List
m_version int
m_warnings string

Private Properties

Свойство Type Description
CheckSafeTokens bool
Parse void
ParseOptions void
ReadListOfStrings void
RecordCommentVariable void
RecordSingleLineCommentVariable void
WriteListOfStrings void

Méthodes publiques

Méthode Description
CheckSafeOptionsTokens ( string token, int value ) : void
CleanUp ( int &_clearedOptionsCount, int &_removedTexturesCount, int &_blackColorConstantsCount, int &_swappedSlotsCount, int &_missingTexturesReplacedCount, int &_removedHasOcclusionMapOptionsCount, int &_reUseOptionsSetCount ) : void

This function cleans the material from automatically recoverable errors and warnings

CleanUpUselessComments ( List _unknownStrings ) : void
ClearErrorLevel ( ) : void
CollectDiffuseGlossTextures ( Dictionary _diffuse2GlossMaps ) : void
Export ( StringWriter W ) : void

This attempts to re-export a valid material for a M2 file

Material ( BinaryReader R ) : System
Material ( FileInfo _sourceFileName, string _name, string _content ) : System
Optimize ( int &_totalDiffuseGlossTexturesReplaced ) : bool

This function optimizes the material by compacting diffuse and gloss textures into a single "_dg" texture whenever possible

RaiseErrorLevel ( ERROR_LEVEL _errorLevel ) : void
Read ( BinaryReader R ) : void
RecordCommentOption ( string _token, Parser P ) : void
RecordCommentVariable ( string _token, Parser P ) : void
RecordForbiddenVariable ( string _token, Parser P ) : void
RecordSingleLineCommentOption ( string _token, Parser P ) : void
RecordSingleLineCommentVariable ( string _token, Parser P ) : void
RecordUnknownOption ( string _token, Parser P ) : void
RecordUnknownOption ( string _token, int value, Parser P ) : void
RecordUnknownVariable ( string _token, Parser P ) : void
ToString ( ) : string
Write ( BinaryWriter W ) : void

Private Methods

Méthode Description
CheckSafeTokens ( string token ) : bool
Parse ( string _block ) : void
ParseOptions ( string _options ) : void
ReadListOfStrings ( BinaryReader R, List _list ) : void
RecordCommentVariable ( List _variables, string _token, Parser P ) : void
RecordSingleLineCommentVariable ( List _variables, string _token, Parser P ) : void
WriteListOfStrings ( BinaryWriter W, List _list ) : void

Method Details

CheckSafeOptionsTokens() public méthode

public CheckSafeOptionsTokens ( string token, int value ) : void
token string
value int
Résultat void

CleanUp() public méthode

This function cleans the material from automatically recoverable errors and warnings
public CleanUp ( int &_clearedOptionsCount, int &_removedTexturesCount, int &_blackColorConstantsCount, int &_swappedSlotsCount, int &_missingTexturesReplacedCount, int &_removedHasOcclusionMapOptionsCount, int &_reUseOptionsSetCount ) : void
_clearedOptionsCount int
_removedTexturesCount int
_blackColorConstantsCount int
_swappedSlotsCount int
_missingTexturesReplacedCount int
_removedHasOcclusionMapOptionsCount int
_reUseOptionsSetCount int
Résultat void

CleanUpUselessComments() public méthode

public CleanUpUselessComments ( List _unknownStrings ) : void
_unknownStrings List
Résultat void

ClearErrorLevel() public méthode

public ClearErrorLevel ( ) : void
Résultat void

CollectDiffuseGlossTextures() public méthode

public CollectDiffuseGlossTextures ( Dictionary _diffuse2GlossMaps ) : void
_diffuse2GlossMaps Dictionary
Résultat void

Export() public méthode

This attempts to re-export a valid material for a M2 file
public Export ( StringWriter W ) : void
W System.IO.StringWriter
Résultat void

Material() public méthode

public Material ( BinaryReader R ) : System
R System.IO.BinaryReader
Résultat System

Material() public méthode

public Material ( FileInfo _sourceFileName, string _name, string _content ) : System
_sourceFileName System.IO.FileInfo
_name string
_content string
Résultat System

Optimize() public méthode

This function optimizes the material by compacting diffuse and gloss textures into a single "_dg" texture whenever possible
public Optimize ( int &_totalDiffuseGlossTexturesReplaced ) : bool
_totalDiffuseGlossTexturesReplaced int
Résultat bool

RaiseErrorLevel() public méthode

public RaiseErrorLevel ( ERROR_LEVEL _errorLevel ) : void
_errorLevel ERROR_LEVEL
Résultat void

Read() public méthode

public Read ( BinaryReader R ) : void
R System.IO.BinaryReader
Résultat void

RecordCommentOption() public méthode

public RecordCommentOption ( string _token, Parser P ) : void
_token string
P Parser
Résultat void

RecordCommentVariable() public méthode

public RecordCommentVariable ( string _token, Parser P ) : void
_token string
P Parser
Résultat void

RecordForbiddenVariable() public méthode

public RecordForbiddenVariable ( string _token, Parser P ) : void
_token string
P Parser
Résultat void

RecordSingleLineCommentOption() public méthode

public RecordSingleLineCommentOption ( string _token, Parser P ) : void
_token string
P Parser
Résultat void

RecordSingleLineCommentVariable() public méthode

public RecordSingleLineCommentVariable ( string _token, Parser P ) : void
_token string
P Parser
Résultat void

RecordUnknownOption() public méthode

public RecordUnknownOption ( string _token, Parser P ) : void
_token string
P Parser
Résultat void

RecordUnknownOption() public méthode

public RecordUnknownOption ( string _token, int value, Parser P ) : void
_token string
value int
P Parser
Résultat void

RecordUnknownVariable() public méthode

public RecordUnknownVariable ( string _token, Parser P ) : void
_token string
P Parser
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

Write() public méthode

public Write ( BinaryWriter W ) : void
W System.IO.BinaryWriter
Résultat void

Property Details

m_errors public_oe property

public string m_errors
Résultat string

m_forbiddenParms public_oe property

public List m_forbiddenParms
Résultat List

m_glossMinMax public_oe property

public float2 m_glossMinMax
Résultat float2

m_height public_oe property

public Layer.Texture m_height
Résultat Layer.Texture

m_isUsingCloudParms public_oe property

public bool m_isUsingCloudParms
Résultat bool

m_isUsingVegetationParms public_oe property

public bool m_isUsingVegetationParms
Résultat bool

m_isUsingWaterParms public_oe property

public bool m_isUsingWaterParms
Résultat bool

m_layers public_oe property

public List m_layers
Résultat List

m_lightMap public_oe property

public Layer.Texture m_lightMap
Résultat Layer.Texture

m_metallicMinMax public_oe property

public float2 m_metallicMinMax
Résultat float2

m_name public_oe property

public string m_name
Résultat string

m_options public_oe property

public Options m_options
Résultat Options

m_parms public_oe property

public Parms m_parms
Résultat Parms

m_physicsMaterial public_oe property

public string m_physicsMaterial
Résultat string

m_programs public_oe property

public Programs m_programs
Résultat Programs

m_sourceFileName public_oe property

public FileInfo,System.IO m_sourceFileName
Résultat System.IO.FileInfo

m_states public_oe property

public States m_states
Résultat States

m_unknownVariables public_oe property

public List m_unknownVariables
Résultat List

m_version public_oe property

public int m_version
Résultat int

m_warnings public_oe property

public string m_warnings
Résultat string