## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# 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 iMaterialWrapper;
    00030 struct iTerraSampler;
    00031
    00032 class csBox2;
    00033 class csVector2;
    00034 class csVector3;
    00035
    00036 SCF_VERSION (iTerraFormer, 0, 0, 1);
    00037
    00042 struct iTerraFormer : public iBase
    00043 {
    00048   virtual csPtr<iTerraSampler> GetSampler (csBox2 region,
    00049     unsigned int resolution) = 0;
    00050
    00057   virtual bool SampleFloat (csStringID type, float x, float z,
    00058     float &value) = 0;
    00059
    00066   virtual bool SampleVector2 (csStringID type, float x, float z,
    00067     csVector2 &value) = 0;
    00068
    00075   virtual bool SampleVector3 (csStringID type, float x, float z,
    00076     csVector3 &value) = 0;
    00077
    00084   virtual bool SampleInteger (csStringID type, float x, float z,
    00085     int &value) = 0;
    00086 };
    00087
    00088
    00089 SCF_VERSION (iTerraSampler, 0, 0, 1);
    00090
    00096 struct iTerraSampler : public iBase
    00097 {
    00104   virtual const float *SampleFloat (csStringID type) = 0;
    00105
    00112   virtual const csVector2 *SampleVector2 (csStringID type) = 0;
    00113
    00120   virtual const csVector3 *SampleVector3 (csStringID type) = 0;
    00121
    00128   virtual const int *SampleInteger (csStringID type) = 0;
    00129
    00134   virtual const csArray<iMaterialWrapper*> &GetMaterialPalette () = 0;
    00135
    00137   virtual const csBox2 &GetRegion () const = 0;
    00138
    00140   virtual unsigned int GetResolution () const = 0;
    00141
    00147   virtual unsigned int GetVersion () const = 0;
    00148
    00157   virtual void Cleanup () = 0;
    00158 };
    00159
    00160 #endif // __CS_IVARIA_TERRAFORM_H__