|
terrfunc.h00001 /* 00002 Copyright (C) 2001 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 __IMESH_TERRFUNC_H_ 00020 #define __IMESH_TERRFUNC_H_ 00021 00022 #include "csutil/scf.h" 00023 00024 struct iEngine; 00025 struct iImage; 00026 struct iMaterialWrapper; 00027 struct iMaterialList; 00028 struct iLoaderContext; 00029 class csVector3; 00030 class csColor; 00031 class csTransform; 00032 00033 SCF_VERSION (iTerrainHeightFunction, 0, 0, 1); 00034 00039 struct iTerrainHeightFunction : public iBase 00040 { 00042 virtual float GetHeight (float dx, float dy) = 0; 00043 }; 00044 00045 SCF_VERSION (iTerrainNormalFunction, 0, 0, 1); 00046 00051 struct iTerrainNormalFunction : public iBase 00052 { 00054 virtual csVector3 GetNormal (float dx, float dy) = 0; 00055 }; 00056 00057 SCF_VERSION (iTerrFuncState, 0, 0, 10); 00058 00062 struct iTerrFuncState : public iBase 00063 { 00065 virtual void LoadMaterialGroup (iLoaderContext* ldr_context, 00066 const char *pName, int iStart, int iEnd) = 0; 00068 virtual void SetTopLeftCorner (const csVector3& topleft) = 0; 00069 // Get the top-left corner. 00070 virtual csVector3 GetTopLeftCorner () = 0; 00072 virtual void SetScale (const csVector3& scale) = 0; 00074 virtual csVector3 GetScale () = 0; 00076 virtual void SetResolution (int x, int y) = 0; 00078 virtual int GetXResolution () = 0; 00080 virtual int GetYResolution () = 0; 00084 virtual void SetGridResolution (int x, int y) = 0; 00086 virtual int GetXGridResolution () = 0; 00088 virtual int GetYGridResolution () = 0; 00090 virtual void SetColor (const csColor& col) = 0; 00092 virtual csColor GetColor () const = 0; 00094 virtual void SetHeightFunction (iTerrainHeightFunction* func) = 0; 00096 virtual void SetNormalFunction (iTerrainNormalFunction* func) = 0; 00098 virtual void SetHeightMap (iImage* im, float hscale, float hshift) = 0; 00099 00104 virtual void SetLODDistance (int lod, float dist) = 0; 00108 virtual float GetLODDistance (int lod) = 0; 00112 virtual void SetMaximumLODCost (int lod, float maxcost) = 0; 00116 virtual float GetMaximumLODCost (int lod) = 0; 00117 00122 virtual void CorrectSeams (int tw, int th) = 0; 00126 virtual void GetCorrectSeams (int& tw, int& th) const = 0; 00130 virtual void SetQuadDepth (int qd) = 0; 00134 virtual int GetQuadDepth () const = 0; 00135 00139 virtual void SetVisTesting (bool en) = 0; 00143 virtual bool IsVisTestingEnabled () = 0; 00144 00145 virtual void SetDirLight (const csVector3& pos, const csColor& col) = 0; 00146 virtual csVector3 GetDirLightPosition () const = 0; 00147 virtual csColor GetDirLightColor () const = 0; 00148 virtual void DisableDirLight () = 0; 00149 virtual bool IsDirLightEnabled () const = 0; 00150 virtual void SetMaterial (int i, iMaterialWrapper* mat) = 0; 00151 virtual int GetMaterialCount () const = 0; 00152 00153 virtual int CollisionDetect (csTransform *p) = 0; 00154 }; 00155 00156 #endif // __IMESH_TERRFUNC_H_ 00157 Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000 |