CrystalSpace

Public API Reference

imesh/haze.h

Go to the documentation of this file.
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 __CS_IMESH_HAZE_H__
00020 #define __CS_IMESH_HAZE_H__
00021 
00026 #include "csutil/scf_interface.h"
00027 
00031 struct iMaterialWrapper;
00032 
00033 class csVector3;
00034 
00050 struct iHazeHull : public virtual iBase
00051 {
00052   SCF_INTERFACE(iHazeHull, 2, 0, 0);
00053 
00055   virtual int GetPolygonCount() const = 0;
00057   virtual int GetVerticeCount() const = 0;
00059   virtual int GetEdgeCount() const = 0;
00060 
00062   virtual void GetVertex(csVector3& res, int vertex_idx) const = 0;
00064   virtual void GetEdge(int edge_num, int& vertex_idx_1, int& vertex_idx_2)
00065     const = 0;
00066 
00068   virtual int GetPolVerticeCount(int polygon_num) const = 0;
00070   virtual int GetPolVertex(int polygon_num, int vertex_num) const = 0;
00076   virtual int GetPolEdge(int polygon_num, int vertex_num, int& start_idx,
00077     int& end_idx) const = 0;
00078 };
00079 
00083 struct iHazeHullBox : public virtual iBase
00084 {
00085   SCF_INTERFACE(iHazeHullBox, 2, 0, 0);
00086 
00088   virtual void GetSettings(csVector3& min, csVector3& max) = 0;
00089 };
00090 
00094 struct iHazeHullCone : public virtual iBase
00095 {
00096   SCF_INTERFACE(iHazeHullCone, 2, 0, 0);
00097 
00099   virtual void GetSettings(int &nr, csVector3& a, csVector3& b, float &ra,
00100         float &rb) = 0;
00101 };
00102 
00107 struct iHazeHullCreation : public virtual iBase
00108 {
00109   SCF_INTERFACE(iHazeHullCreation, 2, 0, 0);
00110 
00112   virtual csRef<iHazeHullBox> CreateBox(const csVector3& min,
00113     const csVector3& max) const = 0;
00115   virtual csRef<iHazeHullCone> CreateCone(int nr_sides, const csVector3& start,
00116     const csVector3& end, float srad, float erad) const = 0;
00117 };
00118 
00126 struct iHazeFactoryState : public virtual iBase
00127 {
00128   SCF_INTERFACE(iHazeFactoryState, 2, 0, 0);
00129 
00131   virtual void SetOrigin(const csVector3& pos) = 0;
00133   virtual const csVector3& GetOrigin() const = 0;
00134 
00136   virtual void SetDirectional(const csVector3& pos) = 0;
00138   virtual const csVector3& GetDirectional() const = 0;
00139 
00141   virtual size_t GetLayerCount() const = 0;
00143   virtual void AddLayer(iHazeHull *hull, float scale) = 0;
00145   virtual void SetLayerHull(int layer, iHazeHull* hull) = 0;
00147   virtual iHazeHull* GetLayerHull(int layer) const = 0;
00149   virtual void SetLayerScale(int layer, float scale) = 0;
00151   virtual float GetLayerScale(int layer) const = 0;
00152 };
00153 
00158 struct iHazeState : public iHazeFactoryState
00159 {
00160   SCF_INTERFACE(iHazeState, 2, 0, 0);
00161 };
00162 
00165 #endif // __CS_IMESH_HAZE_H__
00166 

Generated for Crystal Space by doxygen 1.4.7