Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

haze.h

00001 /*
00002     Copyright (C) 2001 by W.C.A. Wijngaards
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_HAZE_H__
00020 #define __IMESH_HAZE_H__
00021 
00022 #include "csutil/scf.h"
00023 #include "csutil/garray.h"
00024 #include "csutil/cscolor.h"
00025 #include "csgeom/vector2.h"
00026 
00027 struct iMaterialWrapper;
00028 
00029 SCF_VERSION (iHazeHull, 0, 0, 1);
00030 
00046 struct iHazeHull : public iBase
00047 {
00049   virtual int GetPolygonCount() const = 0;
00051   virtual int GetVerticeCount() const = 0;
00053   virtual int GetEdgeCount() const = 0;
00054 
00056   virtual void GetVertex(csVector3& res, int vertex_idx) const = 0;
00058   virtual void GetEdge(int edge_num, int& vertex_idx_1, int& vertex_idx_2)
00059     const = 0;
00060 
00062   virtual int GetPolVerticeCount(int polygon_num) const = 0;
00064   virtual int GetPolVertex(int polygon_num, int vertex_num) const = 0;
00070   virtual int GetPolEdge(int polygon_num, int vertex_num, int& start_idx,
00071     int& end_idx) const = 0;
00072 };
00073 
00074 SCF_VERSION (iHazeHullBox, 0, 0, 1);
00075 
00079 struct iHazeHullBox : public iBase
00080 {
00082   virtual void GetSettings(csVector3& min, csVector3& max) = 0;
00083 };
00084 
00085 SCF_VERSION (iHazeHullCone, 0, 0, 1);
00086 
00090 struct iHazeHullCone : public iBase
00091 {
00093   virtual void GetSettings(int &nr, csVector3& a, csVector3& b, float &ra,
00094         float &rb) = 0;
00095 };
00096 
00097 SCF_VERSION (iHazeHullCreation, 0, 0, 1);
00098 
00103 struct iHazeHullCreation : public iBase
00104 {
00106   virtual iHazeHullBox* CreateBox(const csVector3& min,
00107     const csVector3& max) const = 0;
00109   virtual iHazeHullCone* CreateCone(int nr_sides, const csVector3& start,
00110     const csVector3& end, float srad, float erad) const = 0;
00111 };
00112 
00113 SCF_VERSION (iHazeFactoryState, 0, 0, 1);
00114 
00122 struct iHazeFactoryState : public iBase
00123 {
00125   virtual void SetMaterialWrapper (iMaterialWrapper* material) = 0;
00127   virtual iMaterialWrapper* GetMaterialWrapper () const = 0;
00129   virtual void SetMixMode (uint mode) = 0;
00131   virtual uint GetMixMode () const = 0;
00132 
00134   virtual void SetOrigin(const csVector3& pos) = 0;
00136   virtual const csVector3& GetOrigin() const = 0;
00137 
00139   virtual void SetDirectional(const csVector3& pos) = 0;
00141   virtual const csVector3& GetDirectional() const = 0;
00142 
00144   virtual int GetLayerCount() const = 0;
00146   virtual void AddLayer(iHazeHull *hull, float scale) = 0;
00148   virtual void SetLayerHull(int layer, iHazeHull* hull) = 0;
00150   virtual iHazeHull* GetLayerHull(int layer) const = 0;
00152   virtual void SetLayerScale(int layer, float scale) = 0;
00154   virtual float GetLayerScale(int layer) const = 0;
00155 };
00156 
00157 SCF_VERSION (iHazeState, 0, 0, 1);
00158 
00163 struct iHazeState : public iHazeFactoryState
00164 {
00165 };
00166 
00167 #endif
00168 

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000