CrystalSpace

Public API Reference

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

terrain.h

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 
00022 #include "csgeom/vector3.h"
00023 
00024 #include "csutil/array.h"
00025 #include "csutil/refarr.h"
00026 #include "csutil/scf.h"
00027 
00028 #include "ivaria/terraform.h"
00029 
00030 #include "iengine/material.h"
00031 
00032 struct iImage;
00033 struct iMovable;
00034 class csTransform;
00035 
00036 SCF_VERSION (iTerrainObjectState, 0, 1, 0);
00037 
00041 struct iTerrainObjectState : public iBase
00042 {
00047   virtual bool SetMaterialPalette (const csArray<iMaterialWrapper*>& pal) = 0;
00048   virtual const csArray<iMaterialWrapper*>& GetMaterialPalette () const = 0;
00049 
00059   virtual bool SetMaterialMap (const csArray<char>& data, int x, int y) = 0;
00060   virtual bool SetMaterialMap (iImage* map) = 0;
00061 
00075   virtual bool SetLODValue (const char* parameter, float value) = 0;
00079   virtual float GetLODValue (const char* parameter) const = 0;
00080 
00088   virtual bool SaveState (const char *filename) = 0;
00089   virtual bool RestoreState (const char *filename) = 0;
00090 
00092   virtual int CollisionDetect (iMovable *m, csTransform *p) = 0;
00093 
00097   virtual void SetStaticLighting (bool enable) = 0;
00101   virtual bool GetStaticLighting () = 0;
00102 
00106   virtual void SetCastShadows (bool enable) = 0;
00110   virtual bool GetCastShadows () = 0;
00111 };
00112 
00113 SCF_VERSION (iTerrainFactoryState, 0, 0, 1);
00114 
00120 struct iTerrainFactoryState : public iBase
00121 {
00122 
00131   virtual void SetTerraFormer (iTerraFormer *form) = 0;
00132   virtual iTerraFormer *GetTerraFormer () = 0;
00133 
00139   virtual void SetSamplerRegion (const csBox2& region) = 0;
00140   virtual const csBox2& GetSamplerRegion () = 0;
00141 
00149   virtual bool SaveState (const char *filename) = 0;
00150   virtual bool RestoreState (const char *filename) = 0;
00151 };
00152 
00153 #endif // __CS_IMESH_TERRAIN_H__

Generated for Crystal Space by doxygen 1.3.9.1