CrystalSpace

Public API Reference

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | 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 "csutil/scf.h"
00023 
00024 #include "csutil/array.h"
00025 
00026 struct iImage;
00027 struct iMaterialWrapper;
00028 struct iMovable;
00029 struct iTerraFormer;
00030 
00031 class csBox2;
00032 class csTransform;
00033 
00034 SCF_VERSION (iTerrainObjectState, 0, 1, 0);
00035 
00039 struct iTerrainObjectState : public iBase
00040 {
00045   virtual bool SetMaterialPalette (const csArray<iMaterialWrapper*>& pal) = 0;
00046   virtual const csArray<iMaterialWrapper*>& GetMaterialPalette () const = 0;
00047 
00057   virtual bool SetMaterialMap (const csArray<char>& data, int x, int y) = 0;
00058   virtual bool SetMaterialMap (iImage* map) = 0;
00059 
00073   virtual bool SetLODValue (const char* parameter, float value) = 0;
00077   virtual float GetLODValue (const char* parameter) const = 0;
00078 
00086   virtual bool SaveState (const char *filename) = 0;
00087   virtual bool RestoreState (const char *filename) = 0;
00088 
00090   virtual int CollisionDetect (iMovable *m, csTransform *p) = 0;
00091 
00095   virtual void SetStaticLighting (bool enable) = 0;
00099   virtual bool GetStaticLighting () = 0;
00100 
00104   virtual void SetCastShadows (bool enable) = 0;
00108   virtual bool GetCastShadows () = 0;
00109 };
00110 
00111 SCF_VERSION (iTerrainFactoryState, 0, 0, 1);
00112 
00118 struct iTerrainFactoryState : public iBase
00119 {
00120 
00129   virtual void SetTerraFormer (iTerraFormer *form) = 0;
00130   virtual iTerraFormer *GetTerraFormer () = 0;
00131 
00137   virtual void SetSamplerRegion (const csBox2& region) = 0;
00138   virtual const csBox2& GetSamplerRegion () = 0;
00139 
00147   virtual bool SaveState (const char *filename) = 0;
00148   virtual bool RestoreState (const char *filename) = 0;
00149 };
00150 
00151 #endif // __CS_IMESH_TERRAIN_H__

Generated for Crystal Space by doxygen 1.4.4