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 struct iTerraFormer; 00036 00050 struct iMeshGeneratorGeometry : public virtual iBase 00051 { 00052 SCF_INTERFACE(iMeshGeneratorGeometry, 1, 0, 0); 00053 00059 virtual void AddFactory (iMeshFactoryWrapper* factory, float maxdist) = 0; 00060 00064 virtual size_t GetFactoryCount () const = 0; 00065 00069 virtual void RemoveFactory (size_t idx) = 0; 00070 00074 virtual iMeshFactoryWrapper* GetFactory (size_t idx) = 0; 00075 00079 virtual float GetMaximumDistance (size_t idx) = 0; 00080 00088 virtual void SetRadius (float radius) = 0; 00089 00093 virtual float GetRadius () const = 0; 00094 00100 virtual void SetDensity (float density) = 0; 00101 00111 virtual void AddDensityMaterialFactor (iMaterialWrapper* material, 00112 float factor) = 0; 00113 00121 virtual void SetDensityMap (iTerraFormer* map, float factor, 00122 const csStringID & type) = 0; 00123 00133 virtual void SetDefaultDensityMaterialFactor (float factor) = 0; 00134 00138 virtual float GetDensity () const = 0; 00139 00143 virtual void AddPosition (const csVector2 &pos) = 0; 00144 00145 virtual void AddPositionsFromMap (iTerraFormer* map, const csBox2 ®ion, 00146 uint resx, uint resy, float value, const csStringID & type) = 0; 00147 }; 00148 00161 struct iMeshGenerator : public virtual iBase 00162 { 00163 SCF_INTERFACE(iMeshGenerator, 1, 0, 0); 00164 00168 virtual iObject *QueryObject () = 0; 00169 00183 virtual void SetDensityScale (float mindist, float maxdist, 00184 float maxdensityfactor) = 0; 00185 00194 virtual void SetAlphaScale (float mindist, float maxdist) = 0; 00195 00202 virtual void SetSampleBox (const csBox3& box) = 0; 00203 00207 virtual const csBox3& GetSampleBox () const = 0; 00208 00217 virtual void SetCellCount (int number) = 0; 00218 00222 virtual int GetCellCount () const = 0; 00223 00231 virtual void SetBlockCount (int number) = 0; 00232 00236 virtual int GetBlockCount () const = 0; 00237 00241 virtual iMeshGeneratorGeometry* CreateGeometry () = 0; 00242 00246 virtual size_t GetGeometryCount () const = 0; 00247 00251 virtual iMeshGeneratorGeometry* GetGeometry (size_t idx) = 0; 00252 00256 virtual void RemoveGeometry (size_t idx) = 0; 00257 00261 virtual void AddMesh (iMeshWrapper* mesh) = 0; 00262 00266 virtual size_t GetMeshCount () const = 0; 00267 00271 virtual iMeshWrapper* GetMesh (size_t idx) = 0; 00272 00276 virtual void RemoveMesh (size_t idx) = 0; 00277 }; 00278 00281 #endif // __CS_IENGINE_MESHGEN_H__
Generated for Crystal Space by doxygen 1.4.7