CrystalSpace

Public API Reference

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

imesh/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 "iengine/material.h"
00029 
00030 struct iImage;
00031 struct iMovable;
00032 class csTransform;
00033 
00034 SCF_VERSION (iTerrainObjectState, 0, 0, 1);
00035 
00039 struct iTerrainObjectState : public iBase
00040 {
00045   virtual bool SetMaterialPalette (const csArray<iMaterialWrapper*>& pal) = 0;
00046   virtual csArray<iMaterialWrapper*> GetMaterialPalette () = 0;
00047 
00057   virtual bool SetMaterialMap (csArray<char> data, int x, int y) = 0;
00058   virtual bool SetMaterialMap (iImage* map) = 0;
00059   virtual csArray<char> GetMaterialMap () = 0;
00060 
00065   virtual void SetLODDistance (float distance) = 0;
00066   virtual float GetLODDistance () = 0;
00067 
00073   virtual void SetErrorTolerance (float error) = 0;
00074   virtual float GetErrorTolerance () = 0;
00075 
00083   virtual bool SaveState (const char *filename) = 0;
00084   virtual bool RestoreState (const char *filename) = 0;
00085 
00087   virtual int CollisionDetect (iMovable *m, csTransform *p) = 0;
00088 };
00089 
00090 SCF_VERSION (iTerrainFactoryState, 0, 0, 1);
00091 
00097 struct iTerrainFactoryState : public iBase
00098 {
00100   virtual void SetScale (const csVector3& scale) = 0;
00101   virtual csVector3 GetScale () = 0;
00102 
00107   virtual bool SetHeightMap (const csArray<float>& data, int x, int y) = 0;
00108   virtual bool SetHeightMap (iImage* map) = 0;
00109   virtual csArray<float> GetHeightMap () = 0;
00110 
00118   virtual bool SaveState (const char *filename) = 0;
00119   virtual bool RestoreState (const char *filename) = 0;
00120 
00121 };
00122 
00123 #endif // __CS_IMESH_TERRAIN_H__

Generated for Crystal Space by doxygen 1.2.18