CrystalSpace

Public API Reference

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

terraform.h

00001 /*
00002     Copyright (C) 2004 by Anders Stenberg, 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_IVARIA_TERRAFORM_H__
00020 #define __CS_IVARIA_TERRAFORM_H__
00021 
00022 #include "csgeom/box.h"
00023 #include "csgeom/vector2.h"
00024 #include "csgeom/vector3.h"
00025 
00026 #include "csutil/array.h"
00027 #include "csutil/refarr.h"
00028 #include "csutil/scf.h"
00029 
00030 #include "iengine/material.h"
00031 
00032 struct iTerraSampler;
00033 
00034 SCF_VERSION (iTerraFormer, 0, 0, 1);
00035 
00040 struct iTerraFormer : public iBase
00041 {
00046   virtual csPtr<iTerraSampler> GetSampler (csBox2 region, 
00047     unsigned int resolution) = 0;
00048 
00055   virtual bool SampleFloat (csStringID type, float x, float z, 
00056     float &value) = 0;
00057 
00064   virtual bool SampleVector2 (csStringID type, float x, float z, 
00065     csVector2 &value) = 0;
00066 
00073   virtual bool SampleVector3 (csStringID type, float x, float z, 
00074     csVector3 &value) = 0;
00075 
00082   virtual bool SampleInteger (csStringID type, float x, float z, 
00083     int &value) = 0;
00084 };
00085 
00086 
00087 SCF_VERSION (iTerraSampler, 0, 0, 1);
00088 
00094 struct iTerraSampler : public iBase
00095 {
00102   virtual const float *SampleFloat (csStringID type) = 0;
00103 
00110   virtual const csVector2 *SampleVector2 (csStringID type) = 0;
00111 
00118   virtual const csVector3 *SampleVector3 (csStringID type) = 0;
00119 
00126   virtual const int *SampleInteger (csStringID type) = 0;
00127 
00132   virtual const csArray<iMaterialWrapper*> &GetMaterialPalette () = 0;
00133 
00135   virtual const csBox2 &GetRegion () const = 0;
00136 
00138   virtual unsigned int GetResolution () const = 0;
00139   
00145   virtual unsigned int GetVersion () const = 0;
00146   
00155   virtual void Cleanup () = 0; 
00156 };
00157 
00158 #endif // __CS_IVARIA_TERRAFORM_H__

Generated for Crystal Space by doxygen 1.3.9.1