C# Class Axiom.Serialization.MaterialSerializer

Summary description for MaterialSerializer.
Exibir arquivo Open project: mono-soc-2011/axiom Class Usage Examples

Protected Properties

Property Type Description
materialAttribParsers AxiomCollection
passAttribParsers AxiomCollection
programAttribParsers AxiomCollection
programDefaultParamAttribParsers AxiomCollection
programRefAttribParsers AxiomCollection
rootAttribParsers AxiomCollection
scriptContext MaterialScriptContext
techniqueAttribParsers AxiomCollection
textureUnitAttribParsers AxiomCollection

Public Methods

Method Description
MaterialSerializer ( ) : System

Default constructor.

ParseScript ( Stream stream, string groupName, string fileName ) : void

Parses a Material script file passed in the specified stream.

Protected Methods

Method Description
FinishProgramDefinition ( ) : void

Internal method for saving a program definition which has been built up.

InvokeParser ( string line, AxiomCollection parsers ) : bool

Internal method for finding & invoking an attribute parser.

LogParseError ( MaterialScriptContext context, string error ) : void

Helper method for logging parser errors.

ParseProgramCustomParameter ( string parameters, MaterialScriptContext context ) : bool

Parse custom GPU program parameters.

This one is called explicitly, and is not added to any parser list.

ParseScriptLine ( string line ) : bool

Internal method for parsing a material.

ProcessAutoProgramParam ( int index, string commandName, string parameters, MaterialScriptContext context ) : void

ProcessManualProgramParam ( int index, string commandName, string parameters, MaterialScriptContext context ) : void

RegisterParserMethods ( ) : void

Queries this serializer class for methods intended to parse material script attributes.

Private Methods

Method Description
ParseAlphaOpEx ( string parameters, MaterialScriptContext context ) : bool
ParseAlphaRejection ( string parameters, MaterialScriptContext context ) : bool
ParseAmbient ( string parameters, MaterialScriptContext context ) : bool
ParseAnimTexture ( string parameters, MaterialScriptContext context ) : bool
ParseAnisotropy ( string parameters, MaterialScriptContext context ) : bool
ParseBindingType ( string parameters, MaterialScriptContext context ) : bool
ParseColorOp ( string parameters, MaterialScriptContext context ) : bool
ParseColorOpEx ( string parameters, MaterialScriptContext context ) : bool
ParseColorOpFallback ( string parameters, MaterialScriptContext context ) : bool
ParseColorWrite ( string parameters, MaterialScriptContext context ) : bool
ParseCubicTexture ( string parameters, MaterialScriptContext context ) : bool
ParseCullHardware ( string parameters, MaterialScriptContext context ) : bool
ParseCullSoftware ( string parameters, MaterialScriptContext context ) : bool
ParseDefaultParams ( string parameters, MaterialScriptContext context ) : bool
ParseDepthBias ( string parameters, MaterialScriptContext context ) : bool
ParseDepthCheck ( string parameters, MaterialScriptContext context ) : bool
ParseDepthFunc ( string parameters, MaterialScriptContext context ) : bool
ParseDepthWrite ( string parameters, MaterialScriptContext context ) : bool
ParseDiffuse ( string parameters, MaterialScriptContext context ) : bool
ParseEmissive ( string parameters, MaterialScriptContext context ) : bool
ParseEnvMap ( string parameters, MaterialScriptContext context ) : bool
ParseFiltering ( string parameters, MaterialScriptContext context ) : bool
ParseFogOverride ( string parameters, MaterialScriptContext context ) : bool
ParseFragmentProgram ( string parameters, MaterialScriptContext context ) : bool
ParseFragmentProgramRef ( string parameters, MaterialScriptContext context ) : bool
ParseIteration ( string parameters, MaterialScriptContext context ) : bool
ParseLighting ( string parameters, MaterialScriptContext context ) : bool
ParseLodDistances ( string parameters, MaterialScriptContext context ) : bool
ParseLodIndex ( string parameters, MaterialScriptContext context ) : bool
ParseLodStrategy ( string parameters, MaterialScriptContext context ) : bool
ParseMaterial ( string parameters, MaterialScriptContext context ) : bool
ParseMaxLights ( string parameters, MaterialScriptContext context ) : bool
ParseParamIndexed ( string parameters, MaterialScriptContext context ) : bool
ParseParamIndexedAuto ( string parameters, MaterialScriptContext context ) : bool
ParseParamNamed ( string parameters, MaterialScriptContext context ) : bool
ParseParamNamedAuto ( string parameters, MaterialScriptContext context ) : bool
ParsePass ( string parameters, MaterialScriptContext context ) : bool
ParseProgramMorphAnimation ( string parameters, MaterialScriptContext context ) : bool
ParseProgramPoseAnimation ( string parameters, MaterialScriptContext context ) : bool
ParseProgramSkeletalAnimation ( string parameters, MaterialScriptContext context ) : bool
ParseProgramSource ( string parameters, MaterialScriptContext context ) : bool
ParseProgramSyntax ( string parameters, MaterialScriptContext context ) : bool
ParseReceiveShadows ( string parameters, MaterialScriptContext context ) : bool
ParseRotate ( string parameters, MaterialScriptContext context ) : bool
ParseRotateAnim ( string parameters, MaterialScriptContext context ) : bool
ParseScale ( string parameters, MaterialScriptContext context ) : bool
ParseSceneBlend ( string parameters, MaterialScriptContext context ) : bool
ParseScheme ( string parameters, MaterialScriptContext context ) : bool
ParseScroll ( string parameters, MaterialScriptContext context ) : bool
ParseScrollAnim ( string parameters, MaterialScriptContext context ) : bool
ParseSetTextureAlias ( string parameters, MaterialScriptContext context ) : bool
ParseShading ( string parameters, MaterialScriptContext context ) : bool
ParseShadowCasterFragmentProgramRef ( string parameters, MaterialScriptContext context ) : bool
ParseShadowCasterVertexProgramRef ( string parameters, MaterialScriptContext context ) : bool
ParseShadowReceiverFragmentProgramRef ( string parameters, MaterialScriptContext context ) : bool
ParseShadowReceiverVertexProgramRef ( string parameters, MaterialScriptContext context ) : bool
ParseSpecular ( string parameters, MaterialScriptContext context ) : bool
ParseTechnique ( string parameters, MaterialScriptContext context ) : bool
ParseTexAddressMode ( string parameters, MaterialScriptContext context ) : bool
ParseTexBorderColor ( string parameters, MaterialScriptContext context ) : bool
ParseTexCoordSet ( string parameters, MaterialScriptContext context ) : bool
ParseTexture ( string parameters, MaterialScriptContext context ) : bool
ParseTextureAlias ( string parameters, MaterialScriptContext context ) : bool
ParseTextureUnit ( string parameters, MaterialScriptContext context ) : bool
ParseTransparencyCastsShadows ( string parameters, MaterialScriptContext context ) : bool
ParseVertexProgram ( string parameters, MaterialScriptContext context ) : bool
ParseVertexProgramRef ( string parameters, MaterialScriptContext context ) : bool
ParseWaveXForm ( string parameters, MaterialScriptContext context ) : bool

Method Details

FinishProgramDefinition() protected method

Internal method for saving a program definition which has been built up.
protected FinishProgramDefinition ( ) : void
return void

InvokeParser() protected method

Internal method for finding & invoking an attribute parser.
protected InvokeParser ( string line, AxiomCollection parsers ) : bool
line string
parsers AxiomCollection
return bool

LogParseError() protected static method

Helper method for logging parser errors.
protected static LogParseError ( MaterialScriptContext context, string error ) : void
context MaterialScriptContext Current parsing context.
error string Error message.
return void

MaterialSerializer() public method

Default constructor.
public MaterialSerializer ( ) : System
return System

ParseProgramCustomParameter() protected static method

Parse custom GPU program parameters.
This one is called explicitly, and is not added to any parser list.
protected static ParseProgramCustomParameter ( string parameters, MaterialScriptContext context ) : bool
parameters string
context MaterialScriptContext
return bool

ParseScript() public method

Parses a Material script file passed in the specified stream.
public ParseScript ( Stream stream, string groupName, string fileName ) : void
stream Stream Stream containing the material file data.
groupName string Name of the material group.
fileName string
return void

ParseScriptLine() protected method

Internal method for parsing a material.
protected ParseScriptLine ( string line ) : bool
line string
return bool

ProcessAutoProgramParam() protected static method

protected static ProcessAutoProgramParam ( int index, string commandName, string parameters, MaterialScriptContext context ) : void
index int
commandName string
parameters string
context MaterialScriptContext
return void

ProcessManualProgramParam() protected static method

protected static ProcessManualProgramParam ( int index, string commandName, string parameters, MaterialScriptContext context ) : void
index int
commandName string
parameters string
context MaterialScriptContext
return void

RegisterParserMethods() protected method

Queries this serializer class for methods intended to parse material script attributes.
protected RegisterParserMethods ( ) : void
return void

Property Details

materialAttribParsers protected_oe property

Parsers for the material section of a script.
protected AxiomCollection materialAttribParsers
return AxiomCollection

passAttribParsers protected_oe property

Parsers for the pass section of a script.
protected AxiomCollection passAttribParsers
return AxiomCollection

programAttribParsers protected_oe property

Parsers for the program definition section of a script.
protected AxiomCollection programAttribParsers
return AxiomCollection

programDefaultParamAttribParsers protected_oe property

Parsers for the program definition section of a script.
protected AxiomCollection programDefaultParamAttribParsers
return AxiomCollection

programRefAttribParsers protected_oe property

Parsers for the program reference section of a script.
protected AxiomCollection programRefAttribParsers
return AxiomCollection

rootAttribParsers protected_oe property

Parsers for the root of the material script
protected AxiomCollection rootAttribParsers
return AxiomCollection

scriptContext protected_oe property

Represents the current parsing context.
protected MaterialScriptContext,Axiom.Serialization scriptContext
return MaterialScriptContext

techniqueAttribParsers protected_oe property

Parsers for the technique section of a script.
protected AxiomCollection techniqueAttribParsers
return AxiomCollection

textureUnitAttribParsers protected_oe property

Parsers for the texture unit section of a script.
protected AxiomCollection textureUnitAttribParsers
return AxiomCollection