C# Class FBX.Scene.Materials.MaterialParameters

The Material Parameters class is a serializable class that encapsulates all the parameters needed by a material for a particular primitive. Some examples of material parameters are the Local2World transform matrix, colors or specular intensity values associated with a primitive. You must make the distinction between material variables that are the variables exposed by a shader to render a particular material, and the values of these variables which are contained by an instance of this MaterialParameters class.
Mostrar archivo Open project: Patapom/GodComplex Class Usage Examples

Protected Properties

Property Type Description
m_ID int
m_Name string
m_Name2Parameter Parameter>.Dictionary
m_Owner Scene
m_Parameters List
m_ShaderURL string
m_TextureParameters List

Public Methods

Method Description
ClearParameters ( ) : void

Clears all registered parameters

CreateParameter ( string _Name, PARAMETER_TYPE _Type ) : Parameter

Creates a new parameter

Find ( string _ParameterName ) : Parameter

Finds a parameter by name

ToString ( ) : string

Protected Methods

Method Description
AddTextureParameter ( Texture2D _Texture ) : void

Adds a texture parameter (called by one of our TextureParameter which was assigned a texture)

RemoveTextureParameter ( Texture2D _Texture ) : void

Removes a texture parameter (called by one of our TextureParameter which was assigned a texture)

Private Methods

Method Description
MaterialParameters ( Scene _Owner, System _Reader ) : System

Loads parameters from a stream

MaterialParameters ( Scene _Owner, int _ID, string _Name, string _ShaderURL ) : System
Save ( System _Writer ) : void

Saves parameters to a stream

Method Details

AddTextureParameter() protected method

Adds a texture parameter (called by one of our TextureParameter which was assigned a texture)
protected AddTextureParameter ( Texture2D _Texture ) : void
_Texture Texture2D
return void

ClearParameters() public method

Clears all registered parameters
public ClearParameters ( ) : void
return void

CreateParameter() public method

Creates a new parameter
public CreateParameter ( string _Name, PARAMETER_TYPE _Type ) : Parameter
_Name string
_Type PARAMETER_TYPE
return Parameter

Find() public method

Finds a parameter by name
public Find ( string _ParameterName ) : Parameter
_ParameterName string
return Parameter

RemoveTextureParameter() protected method

Removes a texture parameter (called by one of our TextureParameter which was assigned a texture)
protected RemoveTextureParameter ( Texture2D _Texture ) : void
_Texture Texture2D
return void

ToString() public method

public ToString ( ) : string
return string

Property Details

m_ID protected_oe property

protected int m_ID
return int

m_Name protected_oe property

protected string m_Name
return string

m_Name2Parameter protected_oe property

protected Dictionary m_Name2Parameter
return Parameter>.Dictionary

m_Owner protected_oe property

protected Scene m_Owner
return Scene

m_Parameters protected_oe property

protected List m_Parameters
return List

m_ShaderURL protected_oe property

protected string m_ShaderURL
return string

m_TextureParameters protected_oe property

protected List m_TextureParameters
return List