![]() |
Public API Reference |
00001 /* 00002 Copyright (C) 2000 by Jorrit Tyberghein 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public 00015 License along with this library; if not, write to the Free 00016 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 #ifndef __CS_IENGINE_MATERIAL_H__ 00020 #define __CS_IENGINE_MATERIAL_H__ 00021 00022 #include "csutil/scf.h" 00023 00030 class csMaterialWrapper; 00031 struct iMaterial; 00032 struct iMaterialHandle; 00033 struct iTextureManager; 00034 struct iTextureWrapper; 00035 struct iObject; 00036 00037 SCF_VERSION (iMaterialWrapper, 0, 0, 4); 00038 00046 struct iMaterialWrapper : public iBase 00047 { 00049 virtual csMaterialWrapper* GetPrivateObject () = 0; 00051 virtual iObject *QueryObject() = 0; 00052 00054 virtual iMaterialWrapper *Clone () const = 0; 00055 00060 virtual void SetMaterialHandle (iMaterialHandle *mat) = 0; 00062 virtual iMaterialHandle* GetMaterialHandle () = 0; 00063 00068 virtual void SetMaterial (iMaterial* material) = 0; 00070 virtual iMaterial* GetMaterial () = 0; 00071 00073 virtual void Register (iTextureManager *txtmng) = 0; 00074 00080 virtual void Visit () = 0; 00081 }; 00082 00083 SCF_VERSION (iMaterialEngine, 0, 0, 1); 00084 00093 struct iMaterialEngine : public iBase 00094 { 00098 virtual iTextureWrapper *GetTextureWrapper () = 0; 00099 00103 virtual iTextureWrapper* GetTextureWrapper (int idx) = 0; 00104 }; 00105 00106 SCF_VERSION (iMaterialList, 0, 0, 1); 00107 00111 struct iMaterialList : public iBase 00112 { 00114 virtual iMaterialWrapper* NewMaterial (iMaterial* material) = 0; 00115 00120 virtual iMaterialWrapper *NewMaterial (iMaterialHandle *ith) = 0; 00121 00123 virtual int GetCount () const = 0; 00124 00126 virtual iMaterialWrapper *Get (int n) const = 0; 00127 00129 virtual int Add (iMaterialWrapper *obj) = 0; 00130 00132 virtual bool Remove (iMaterialWrapper *obj) = 0; 00133 00135 virtual bool Remove (int n) = 0; 00136 00138 virtual void RemoveAll () = 0; 00139 00141 virtual int Find (iMaterialWrapper *obj) const = 0; 00142 00144 virtual iMaterialWrapper *FindByName (const char *Name) const = 0; 00145 }; 00146 00149 #endif // __CS_IENGINE_MATERIAL_H__