CrystalSpace

Public API Reference

ivaria/terraform.h

Go to the documentation of this file.
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 
00026 #include "csutil/scf.h"
00027 #include "csutil/strset.h"
00028 
00029 struct iObject;
00030 struct iMaterialWrapper;
00031 struct iTerraSampler;
00032 
00033 class csBox2;
00034 class csVector2;
00035 class csVector3;
00036 
00041 struct iTerraFormer : public virtual iBase
00042 {
00043   SCF_INTERFACE (iTerraFormer, 2, 0, 0);
00044 
00049   virtual csPtr<iTerraSampler> GetSampler (csBox2 region, 
00050     unsigned int resx, unsigned int resy = 0) = 0;
00051 
00055   virtual csVector2 GetIntegerMapSize (csStringID type) = 0;
00056 
00063   virtual bool SampleFloat (csStringID type, float x, float z, 
00064     float &value) = 0;
00065 
00072   virtual bool SampleVector2 (csStringID type, float x, float z, 
00073     csVector2 &value) = 0;
00074 
00081   virtual bool SampleVector3 (csStringID type, float x, float z, 
00082     csVector3 &value) = 0;
00083 
00090   virtual bool SampleInteger (csStringID type, float x, float z, 
00091     int &value) = 0;
00092   
00096   virtual iObject* QueryObject () = 0;
00097 };
00098 
00099 
00105 struct iTerraSampler : public virtual iBase
00106 {
00107   SCF_INTERFACE (iTerraSampler, 2, 0, 0);
00108 
00115   virtual const float *SampleFloat (csStringID type) = 0;
00116 
00123   virtual const csVector2 *SampleVector2 (csStringID type) = 0;
00124 
00131   virtual const csVector3 *SampleVector3 (csStringID type) = 0;
00132 
00139   virtual const int *SampleInteger (csStringID type) = 0;
00140 
00145   virtual const csArray<iMaterialWrapper*> &GetMaterialPalette () = 0;
00146 
00148   virtual const csBox2 &GetRegion () const = 0;
00149 
00151   virtual void GetResolution (uint &resx, uint &resz) const = 0;
00152   
00158   virtual unsigned int GetVersion () const = 0;
00159   
00168   virtual void Cleanup () = 0; 
00169 };
00170 
00171 #endif // __CS_IVARIA_TERRAFORM_H__

Generated for Crystal Space by doxygen 1.4.7