CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

material.h

Go to the documentation of this file.
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 #include "iutil/strset.h"
00024 
00031 class csMaterialWrapper;
00032 struct iMaterial;
00033 struct iMaterialHandle;
00034 struct iTextureManager;
00035 struct iTextureWrapper;
00036 struct iObject;
00037 
00038 SCF_VERSION (iMaterialWrapper, 0, 0, 5);
00039 
00068 struct iMaterialWrapper : public iBase
00069 {
00071   virtual iObject *QueryObject() = 0;
00072 
00074   virtual iMaterialWrapper *Clone () const = 0;
00075 
00080   virtual void SetMaterialHandle (iMaterialHandle *mat) = 0;
00082   virtual iMaterialHandle* GetMaterialHandle () = 0;
00083 
00088   virtual void SetMaterial (iMaterial* material) = 0;
00090   virtual iMaterial* GetMaterial () = 0;
00091 
00093   virtual void Register (iTextureManager *txtmng) = 0;
00094 
00100   virtual void Visit () = 0;
00101 
00105   virtual bool IsVisitRequired () const = 0;
00106 };
00107 
00108 SCF_VERSION (iMaterialEngine, 0, 0, 2);
00109 
00123 struct iMaterialEngine : public iBase
00124 {
00128   virtual iTextureWrapper *GetTextureWrapper () = 0;
00129 
00133   virtual iTextureWrapper* GetTextureWrapper (csStringID name) = 0;
00134 
00138   virtual void Visit () = 0;
00139 
00143   virtual bool IsVisitRequired () const = 0;
00144 };
00145 
00146 SCF_VERSION (iMaterialList, 0, 0, 1);
00147 
00160 struct iMaterialList : public iBase
00161 {
00163   virtual iMaterialWrapper* NewMaterial (iMaterial* material,
00164         const char* name) = 0;
00165 
00170   virtual iMaterialWrapper *NewMaterial (iMaterialHandle *ith,
00171         const char* name) = 0;
00172 
00174   virtual int GetCount () const = 0;
00175 
00177   virtual iMaterialWrapper *Get (int n) const = 0;
00178 
00180   virtual int Add (iMaterialWrapper *obj) = 0;
00181 
00183   virtual bool Remove (iMaterialWrapper *obj) = 0;
00184 
00186   virtual bool Remove (int n) = 0;
00187 
00189   virtual void RemoveAll () = 0;
00190 
00192   virtual int Find (iMaterialWrapper *obj) const = 0;
00193 
00195   virtual iMaterialWrapper *FindByName (const char *Name) const = 0;
00196 };
00197 
00200 #endif // __CS_IENGINE_MATERIAL_H__

Generated for Crystal Space by doxygen 1.3.9.1