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 00047 struct 00048 CS_DEPRECATED_TYPE_MSG ("iTerrainObjectState is deprecated. Use iTerrainSystem instead.") 00049 iTerrainObjectState : public virtual iBase 00050 { 00051 SCF_INTERFACE (iTerrainObjectState, 1, 0, 0); 00052 00054 00058 virtual bool SetMaterialPalette (const csArray<iMaterialWrapper*>& pal) = 0; 00059 virtual const csArray<iMaterialWrapper*>& GetMaterialPalette () const = 0; 00061 00063 00074 CS_DEPRECATED_METHOD_MSG("This will only work for SimpleFormers.") 00075 virtual bool SetMaterialMap (const csArray<char>& data, int x, int y) = 0; 00076 CS_DEPRECATED_METHOD_MSG("This will only work for SimpleFormers.") 00077 virtual bool SetMaterialMap (iImage* map) = 0; 00079 00081 00097 CS_DEPRECATED_METHOD_MSG("This will only work for SimpleFormers.") 00098 virtual bool SetMaterialAlphaMaps (const csArray<csArray<char> >& data, 00099 int x, int y) = 0; 00100 CS_DEPRECATED_METHOD_MSG("This will only work for SimpleFormers.") 00101 virtual bool SetMaterialAlphaMaps (const csArray<iImage*>& maps) = 0; 00103 00116 virtual bool SetLODValue (const char* parameter, float value) = 0; 00120 virtual float GetLODValue (const char* parameter) const = 0; 00121 00123 00130 virtual bool SaveState (const char *filename) = 0; 00131 virtual bool RestoreState (const char *filename) = 0; 00133 00135 virtual int CollisionDetect (iMovable *m, csTransform *p) = 0; 00136 00140 virtual void SetStaticLighting (bool enable) = 0; 00144 virtual bool GetStaticLighting () = 0; 00145 00149 virtual void SetCastShadows (bool enable) = 0; 00153 virtual bool GetCastShadows () = 0; 00154 00159 virtual void SetMaterialMapFile (const char* file, int width, int height, 00160 bool raw = false) = 0; 00161 00166 virtual const char* GetMaterialMapFile (int& width, int& height, 00167 bool& raw) = 0; 00168 00169 virtual void SetTopNeighbor(iTerrainObjectState *top)=0; 00170 virtual void SetRightNeighbor(iTerrainObjectState *right)=0; 00171 virtual void SetLeftNeighbor(iTerrainObjectState *left)=0; 00172 virtual void SetBottomNeighbor(iTerrainObjectState *bottom)=0; 00173 00174 }; 00175 00184 struct 00185 CS_DEPRECATED_TYPE_MSG ("iTerrainFactoryState is deprecated. Use iTerrainFactory instead.") 00186 iTerrainFactoryState : public virtual iBase 00187 { 00188 SCF_INTERFACE (iTerrainFactoryState, 1, 0, 0); 00189 00191 00199 virtual void SetTerraFormer (iTerraFormer *form) = 0; 00200 virtual iTerraFormer *GetTerraFormer () = 0; 00202 00204 00209 virtual void SetSamplerRegion (const csBox2& region) = 0; 00210 virtual const csBox2& GetSamplerRegion () = 0; 00212 00214 00221 virtual bool SaveState (const char *filename) = 0; 00222 virtual bool RestoreState (const char *filename) = 0; 00224 }; 00225 00228 #endif // __CS_IMESH_TERRAIN_H__
Generated for Crystal Space 1.4.0 by doxygen 1.5.8