## Public API Reference

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

- File List
- File Members

# iengine/meshgen.h

Go to the documentation of this file.

    00001 /*
    00002     Copyright (C) 2005 by Jorrit Tyberghein
    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_IENGINE_MESHGEN_H__
    00020 #define __CS_IENGINE_MESHGEN_H__
    00021
    00022
    00030 #include "csutil/scf.h"
    00031
    00032 struct iMeshFactoryWrapper;
    00033 struct iMeshWrapper;
    00034 class csBox3;
    00035
    00040 struct iMeshGeneratorGeometry : public virtual iBase
    00041 {
    00042   SCF_INTERFACE(iMeshGeneratorGeometry, 1, 0, 0);
    00043
    00049   virtual void AddFactory (iMeshFactoryWrapper* factory, float maxdist) = 0;
    00050
    00054   virtual size_t GetFactoryCount () const = 0;
    00055
    00059   virtual void RemoveFactory (size_t idx) = 0;
    00060
    00064   virtual iMeshFactoryWrapper* GetFactory (size_t idx) = 0;
    00065
    00069   virtual float GetMaximumDistance (size_t idx) = 0;
    00070
    00078   virtual void SetRadius (float radius) = 0;
    00079
    00083   virtual float GetRadius () const = 0;
    00084
    00090   virtual void SetDensity (float density) = 0;
    00091
    00101   virtual void AddDensityMaterialFactor (iMaterialWrapper* material,
    00102         float factor) = 0;
    00103
    00113   virtual void SetDefaultDensityMaterialFactor (float factor) = 0;
    00114
    00118   virtual float GetDensity () const = 0;
    00119 };
    00120
    00124 struct iMeshGenerator : public virtual iBase
    00125 {
    00126   SCF_INTERFACE(iMeshGenerator, 1, 0, 0);
    00127
    00131   virtual iObject *QueryObject () = 0;
    00132
    00146   virtual void SetDensityScale (float mindist, float maxdist,
    00147         float maxdensityfactor) = 0;
    00148
    00157   virtual void SetAlphaScale (float mindist, float maxdist) = 0;
    00158
    00165   virtual void SetSampleBox (const csBox3& box) = 0;
    00166
    00170   virtual const csBox3& GetSampleBox () const = 0;
    00171
    00180   virtual void SetCellCount (int number) = 0;
    00181
    00185   virtual int GetCellCount () const = 0;
    00186
    00194   virtual void SetBlockCount (int number) = 0;
    00195
    00199   virtual int GetBlockCount () const = 0;
    00200
    00204   virtual iMeshGeneratorGeometry* CreateGeometry () = 0;
    00205
    00209   virtual size_t GetGeometryCount () const = 0;
    00210
    00214   virtual iMeshGeneratorGeometry* GetGeometry (size_t idx) = 0;
    00215
    00219   virtual void RemoveGeometry (size_t idx) = 0;
    00220
    00224   virtual void AddMesh (iMeshWrapper* mesh) = 0;
    00225
    00229   virtual size_t GetMeshCount () const = 0;
    00230
    00234   virtual iMeshWrapper* GetMesh (size_t idx) = 0;
    00235
    00239   virtual void RemoveMesh (size_t idx) = 0;
    00240 };
    00241
    00244 #endif // __CS_IENGINE_MESHGEN_H__