CrystalSpace

Public API Reference

iengine/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 
00033 struct iMaterial;
00034 struct iTextureManager;
00035 struct iTextureWrapper;
00036 struct iObject;
00037 
00061 struct iMaterialWrapper : public virtual iBase
00062 {
00063   SCF_INTERFACE (iMaterialWrapper, 0, 0, 5);
00064 
00066   virtual iObject *QueryObject() = 0;
00067 
00072   virtual void SetMaterial (iMaterial* material) = 0;
00074   virtual iMaterial* GetMaterial () = 0;
00075 
00081   virtual void Visit () = 0;
00082 
00086   virtual bool IsVisitRequired () const = 0;
00087 };
00088 
00100 struct iMaterialEngine : public virtual iBase
00101 {
00102   SCF_INTERFACE (iMaterialEngine, 2, 0, 0);
00103 
00107   virtual iTextureWrapper *GetTextureWrapper () = 0;
00108 
00112     virtual iTextureWrapper* GetTextureWrapper (csStringID name) = 0;
00113 
00117   virtual void Visit () = 0;
00118 
00122   virtual bool IsVisitRequired () const = 0;
00123 };
00124 
00134 struct iMaterialList : public virtual iBase
00135 {
00136   SCF_INTERFACE (iMaterialList, 1, 0, 0);
00137 
00139   virtual iMaterialWrapper* NewMaterial (iMaterial* material,
00140         const char* name) = 0;
00141 
00143   virtual int GetCount () const = 0;
00144 
00146   virtual iMaterialWrapper *Get (int n) const = 0;
00147 
00149   virtual int Add (iMaterialWrapper *obj) = 0;
00150 
00152   virtual bool Remove (iMaterialWrapper *obj) = 0;
00153 
00155   virtual bool Remove (int n) = 0;
00156 
00158   virtual void RemoveAll () = 0;
00159 
00161   virtual int Find (iMaterialWrapper *obj) const = 0;
00162 
00164   virtual iMaterialWrapper *FindByName (const char *Name) const = 0;
00165 };
00166 
00169 #endif // __CS_IENGINE_MATERIAL_H__

Generated for Crystal Space by doxygen 1.4.7