# CSLMaterial Class Reference

`#include <Material.h>`

Inheritance diagram for CSLMaterial:

List of all members.

## Public Types
enum | EShadingModel { CONSTANT, LAMBERT, PHONG, BLINN, SHADOW_OBJECT, VERTEX_COLOR }
## Public Member Functions
| CSLMaterial (CSLScene *in_pScene, CSLModel *in_pModel, CdotXSITemplate *in_pTemplate)
virtual | ~CSLMaterial ()
CSIBCColorf | GetAmbientColor ()
SI_Void | SetAmbientColor (CSIBCColorf &in_rColor)
CSIBCColorf | GetDiffuseColor ()
SI_Void | SetDiffuseColor (CSIBCColorf &in_rColor)
CSIBCColorf | GetEmissiveColor ()
SI_Void | SetEmissiveColor (CSIBCColorf &in_rColor)
EShadingModel | GetShadingModel ()
SI_Void | SetShadingModel (EShadingModel in_Value)
CSIBCColorf | GetSpecularColor ()
SI_Void | SetSpecularColor (CSIBCColorf &in_rColor)
SI_Float | GetSpecularDecay ()
SI_Void | SetSpecularDecay (SI_Float in_fValue)
CSLTexture2D * | Texture2D ()
CSLTexture2D * | CreateTexture2D ()
SI_Error | DestroyTexture2D ()
virtual SI_Error | Synchronize ()
virtual ETemplateType | Type ()
virtual CSLAnimatableType * | ParameterFromName (SI_Char *in_szName)
virtual CSLAnimatableType * | ParameterFromType (EFCurveType in_Type, SI_Char *in_szParameterName)

## Detailed Description

Defines a legacy SI_Material (see the SI_Material template reference).

## Member Enumeration Documentation

enum EShadingModel

This enum lists possible shading models for a material.

Enumerator:

  CONSTANT | Constant shading
  LAMBERT | Lambert shading
  PHONG | Phong shading
  BLINN | Blinn shading
  SHADOW_OBJECT | Shawdow object
  VERTEX_COLOR | Vertex color lighting

## Constructor & Destructor Documentation

CSLMaterial | ( | CSLScene * | in_pScene,
|  | CSLModel * | in_pModel,
|  | CdotXSITemplate * | in_pTemplate |
| ) |  |  |

Constructor

Parameters:

  | in_pScene | Pointer to the scene containing the Material
  | in_pModel | Pointer to the model containing the Material
  | in_pTemplate | Pointer to the CdotXSITemplate containing the Material

virtual ~CSLMaterial | ( |  | ) | `[virtual]`

Destructor

## Member Function Documentation

CSIBCColorf GetAmbientColor | ( |  | ) |

Return the ambient color of the material.

Returns:
  CSIBCColorf Ambient color.

SI_Void SetAmbientColor | ( | CSIBCColorf & | in_rColor | ) |

Change the ambient color of the material.

Parameters:

  | CSIBCColorf& | New ambient color.

Returns:
  None

CSIBCColorf GetDiffuseColor | ( |  | ) |

Return the diffuse color of the material.

Returns:
  CSIBCColorf Diffuse color.

SI_Void SetDiffuseColor | ( | CSIBCColorf & | in_rColor | ) |

Change the diffuset color of the material.

Parameters:

  | CSIBCColorf& | New diffuse color.

Returns:
  None

CSIBCColorf GetEmissiveColor | ( |  | ) |

Return the emissive color of the material.

Returns:
  CSIBCColorf emissive color.

SI_Void SetEmissiveColor | ( | CSIBCColorf & | in_rColor | ) |

Change the emissive color of the material.

Parameters:

  | CSIBCColorf& | New emissive color.

Returns:
  None

EShadingModel GetShadingModel | ( |  | ) |

Return the shading model of the material.

Returns:
  EShadingModel Shading model.

SI_Void SetShadingModel | ( | EShadingModel | in_Value | ) |

Change the shading model of the material.

Parameters:

  | EShadingModel | New shading model.

Returns:
  None

CSIBCColorf GetSpecularColor | ( |  | ) |

Return the specular color of the material.

Returns:
  CSIBCColorf Specular color.

SI_Void SetSpecularColor | ( | CSIBCColorf & | in_rColor | ) |

Change the specular color of the material.

Parameters:

  | CSIBCColorf& | New specular color

Returns:
  None

SI_Float GetSpecularDecay | ( |  | ) |

Return the specular decay of the material.

Returns:
  SI_Float Specular decay.

SI_Void SetSpecularDecay | ( | SI_Float | in_fValue | ) |

Change the specular decay of the material.

Parameters:

  | SI_Float | New Specular decay.

Returns:
  None

CSLTexture2D* Texture2D | ( |  | ) |

Return the 2D texture of the material.

Returns:
  CSLTexture2D* Pointer to a texture 2D object.

CSLTexture2D* CreateTexture2D | ( |  | ) |

Create a new texture 2D for the material.

Returns:
  CSLTexture2D Newly creates texture 2D object.

SI_Error DestroyTexture2D | ( |  | ) |

Destroy the texture 2D of the material.

Returns:
  SI_Error Error code.

virtual SI_Error Synchronize | ( |  | ) | `[virtual]`

Synchronize will ensure that the animated parameter is up to date.

Returns:
  SI_Error Error code

Reimplemented from CSLBaseMaterial.

virtual ETemplateType Type | ( |  | ) | `[virtual]`

Indicate which dotXSI template this object describes.

Returns:
  ETemplateType Type of template

Implements CSLTemplate.

virtual CSLAnimatableType* ParameterFromName | ( | SI_Char * | in_szName | ) | `[virtual]`

Return a proxy to the specified parameter.

Parameters:

  | in_szName | Name of the parameter

Returns:
  CSLAnimatableType* Pointer to a parameter proxy.

Reimplemented from CSLTemplate.

virtual CSLAnimatableType* ParameterFromType | ( | EFCurveType | in_Type,
|  | SI_Char * | in_szParameterName |
| ) |  |  | `[virtual]`

Return a proxy to the specified parameter.

Parameters:

  | in_Type | Type of parameter
  | in_szParameterName | Name of the parameter if the type is SI_PARAMETER

Returns:
  CSLAnimatableType* Pointer to a parameter proxy.

Reimplemented from CSLTemplate.

The documentation for this class was generated from the following file:

- Material.h