00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __IVIDEO_MATERIAL_H__
00020 #define __IVIDEO_MATERIAL_H__
00021
00022 #include "csutil/scf.h"
00023
00025 #define CS_DEFMAT_DIFFUSE 0.7
00026
00027 #define CS_DEFMAT_AMBIENT 0.0
00028
00029 #define CS_DEFMAT_REFLECTION 0.0
00030
00031 struct iTextureHandle;
00032 struct csRGBpixel;
00033 struct csRGBcolor;
00034
00039 struct csTextureLayer
00040 {
00041 iTextureHandle* txt_handle;
00042 UInt mode;
00043 float uscale, vscale;
00044 float ushift, vshift;
00045 };
00046
00047 SCF_VERSION (iMaterial, 0, 0, 4);
00048
00056 struct iMaterial : public iBase
00057 {
00061 virtual iTextureHandle *GetTexture () = 0;
00062
00067 virtual int GetTextureLayerCount () = 0;
00068
00072 virtual csTextureLayer* GetTextureLayer (int idx) = 0;
00073
00078 virtual void GetFlatColor (csRGBpixel &oColor) = 0;
00082 virtual void SetFlatColor (const csRGBcolor& col) = 0;
00083
00087 virtual void GetReflection (
00088 float &oDiffuse, float &oAmbient, float &oReflection) = 0;
00092 virtual void SetReflection (float oDiffuse, float oAmbient,
00093 float oReflection) = 0;
00094 };
00095
00096 SCF_VERSION (iMaterialHandle, 0, 0, 2);
00097
00102 struct iMaterialHandle : public iBase
00103 {
00107 virtual iTextureHandle *GetTexture () = 0;
00108
00113 virtual void GetFlatColor (csRGBpixel &oColor) = 0;
00114
00118 virtual void GetReflection (float &oDiffuse, float &oAmbient, float &oReflection) = 0;
00119
00126 virtual void Prepare () = 0;
00127 };
00128
00129 #endif // __IVIDEO_MATERIAL_H__