MaterialLibrary.h

00001 //***************************************************************************************
00002 //
00003 // File supervisor: Crosswalk team
00004 //
00005 // Copyright 2008 Autodesk, Inc.  All rights reserved.
00006 // Use of this software is subject to the terms of the Autodesk license agreement
00007 // provided at the time of installation or download, or which otherwise accompanies
00008 // this software in either electronic or hard copy form.
00009 //
00010 //***************************************************************************************
00011 
00012 #ifndef _MATERIALLIBRARY_H
00013 #define _MATERIALLIBRARY_H
00014 
00015 #include "Template.h"
00016 
00017 // Forward declaration
00018 class CSLBaseMaterial;
00019 class CSLMaterial;
00020 class CSLXSIMaterial;
00021 
00022 
00026 class XSIEXPORT CSLMaterialLibrary
00027     : public CSLTemplate
00028 {
00029 public:
00030     CSLMaterialLibrary(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00031     virtual ~CSLMaterialLibrary();
00032 
00036     CSLMaterial* AddMaterial();
00037 
00041     virtual CSLXSIMaterial* AddXSIMaterial();
00042 
00046     SI_Error ClearMaterials();
00047 
00051     CSLBaseMaterial** GetMaterialList();
00052 
00056     SI_Int GetMaterialCount();
00057 
00062     SI_Error RemoveMaterial(SI_Int in_nIndex);
00063 
00068     SI_Error RemoveMaterial(CSLBaseMaterial *in_pMaterial);
00069 
00070     CSLBaseMaterial* FindMaterial( const SI_Char* in_szName );
00071 
00072     CSLBaseMaterial* ConnectMaterial(CSLBaseMaterial* in_pNewMaterial);
00073 
00074     virtual SI_Error Synchronize();
00075     virtual ETemplateType Type();
00076 
00077 protected:
00078     CSIBCArray<CSLBaseMaterial *> m_Materials;
00079 
00080 private:
00081     void *m_pReserved;  // reserved for future extension
00082 };
00083 
00084 #endif