# CSLMaterialLibrary Class Reference

`#include <MaterialLibrary.h>`

Inheritance diagram for CSLMaterialLibrary:

List of all members.

## Public Member Functions
CSLMaterial * | AddMaterial ()
virtual CSLXSIMaterial * | AddXSIMaterial ()
SI_Error | ClearMaterials ()
CSLBaseMaterial ** | GetMaterialList ()
SI_Int | GetMaterialCount ()
SI_Error | RemoveMaterial (SI_Int in_nIndex)
SI_Error | RemoveMaterial (CSLBaseMaterial *in_pMaterial)
virtual SI_Error | Synchronize ()
virtual ETemplateType | Type ()

## Detailed Description

Handles the material library (see the SI_MaterialLibrary template reference). From this class you can add or remove materials that can be used in the scene.

## Member Function Documentation

CSLMaterial* AddMaterial | ( |  | ) |

Add a new material to the material library.

Returns:
  CSLMaterial* Pointer to the newly created material object.

virtual CSLXSIMaterial* AddXSIMaterial | ( |  | ) | `[virtual]`

Add a new Softimage material to the material library.

Returns:
  CSLMaterial* Pointer to the newly created Softimage material object.

Reimplemented in CSLCOLLADAMaterialLibrary.

SI_Error ClearMaterials | ( |  | ) |

Remove all materials from the material library.

Returns:
  SI_Error Error code.

CSLBaseMaterial** GetMaterialList | ( |  | ) |

Return an array of all materials in the library.

Returns:
  CSLBaseMaterial** Array of pointers to material objects.

SI_Int GetMaterialCount | ( |  | ) |

Return the number of materials in the library.

Returns:
  SI_Int Number of materials.

SI_Error RemoveMaterial | ( | SI_Int | in_nIndex | ) |

Remove a single material from the library.

Parameters:

  | SI_Int | Index of the material to remove.

Returns:
  SI_Error Error code.

SI_Error RemoveMaterial | ( | CSLBaseMaterial * | in_pMaterial | ) |

Remove a single material from the library.

Parameters:

  | CSLBaseMaterial* | Pointer to the material to remove.

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 CSLTemplate.

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

Indicate which dotXSI template this object describes.

Returns:
  ETemplateType Type of template

Implements CSLTemplate.

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

- MaterialLibrary.h