imesh/terrain.h
Go to the documentation of this file.00001 /* 00002 Copyright (C) 2003 by Jorrit Tyberghein, Daniel Duhprey 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_IMESH_TERRAIN_H__ 00020 #define __CS_IMESH_TERRAIN_H__ 00021 00026 #include "csutil/scf.h" 00027 00028 #include "csutil/array.h" 00029 00033 struct iImage; 00034 struct iMaterialWrapper; 00035 struct iMovable; 00036 struct iTerraFormer; 00037 00038 class csBox2; 00039 class csTransform; 00040 00044 struct iTerrainObjectState : public virtual iBase 00045 { 00046 SCF_INTERFACE (iTerrainObjectState, 1, 0, 0); 00047 00049 00053 virtual bool SetMaterialPalette (const csArray<iMaterialWrapper*>& pal) = 0; 00054 virtual const csArray<iMaterialWrapper*>& GetMaterialPalette () const = 0; 00056 00058 00069 CS_DEPRECATED_METHOD_MSG("This will only work for SimpleFormers.") 00070 virtual bool SetMaterialMap (const csArray<char>& data, int x, int y) = 0; 00071 CS_DEPRECATED_METHOD_MSG("This will only work for SimpleFormers.") 00072 virtual bool SetMaterialMap (iImage* map) = 0; 00074 00076 00092 CS_DEPRECATED_METHOD_MSG("This will only work for SimpleFormers.") 00093 virtual bool SetMaterialAlphaMaps (const csArray<csArray<char> >& data, 00094 int x, int y) = 0; 00095 CS_DEPRECATED_METHOD_MSG("This will only work for SimpleFormers.") 00096 virtual bool SetMaterialAlphaMaps (const csArray<iImage*>& maps) = 0; 00098 00111 virtual bool SetLODValue (const char* parameter, float value) = 0; 00115 virtual float GetLODValue (const char* parameter) const = 0; 00116 00118 00125 virtual bool SaveState (const char *filename) = 0; 00126 virtual bool RestoreState (const char *filename) = 0; 00128 00130 virtual int CollisionDetect (iMovable *m, csTransform *p) = 0; 00131 00135 virtual void SetStaticLighting (bool enable) = 0; 00139 virtual bool GetStaticLighting () = 0; 00140 00144 virtual void SetCastShadows (bool enable) = 0; 00148 virtual bool GetCastShadows () = 0; 00149 00154 virtual void SetMaterialMapFile (const char* file, int width, int height, 00155 bool raw = false) = 0; 00156 00161 virtual const char* GetMaterialMapFile (int& width, int& height, 00162 bool& raw) = 0; 00163 00164 virtual void SetTopNeighbor(iTerrainObjectState *top)=0; 00165 virtual void SetRightNeighbor(iTerrainObjectState *right)=0; 00166 virtual void SetLeftNeighbor(iTerrainObjectState *left)=0; 00167 virtual void SetBottomNeighbor(iTerrainObjectState *bottom)=0; 00168 00169 }; 00170 00176 struct iTerrainFactoryState : public virtual iBase 00177 { 00178 SCF_INTERFACE (iTerrainFactoryState, 1, 0, 0); 00179 00181 00189 virtual void SetTerraFormer (iTerraFormer *form) = 0; 00190 virtual iTerraFormer *GetTerraFormer () = 0; 00192 00194 00199 virtual void SetSamplerRegion (const csBox2& region) = 0; 00200 virtual const csBox2& GetSamplerRegion () = 0; 00202 00204 00211 virtual bool SaveState (const char *filename) = 0; 00212 virtual bool RestoreState (const char *filename) = 0; 00214 }; 00215 00218 #endif // __CS_IMESH_TERRAIN_H__
Generated for Crystal Space by doxygen 1.4.7