Main Page   Class Hierarchy   Compound List   File List   Compound Members  

thing.h

00001 /*
00002     Copyright (C) 1998-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 __IENGINE_THING_H__
00020 #define __IENGINE_THING_H__
00021 
00022 #include "csutil/scf.h"
00023 #include "csutil/flags.h"
00024 
00025 class csVector2;
00026 class csVector3;
00027 class csMatrix3;
00028 struct iSector;
00029 struct iPolygon3D;
00030 struct iPortal;
00031 struct iGraphics3D;
00032 struct iFrustumView;
00033 struct iCurve;
00034 struct iCurveTemplate;
00035 struct iMaterialWrapper;
00036 struct iMaterialList;
00037 struct iMovable;
00038 struct iObject;
00039 struct iPolyTxtPlane;
00040 struct iCurveTemplate;
00041 struct csFog;
00042 
00048 #define CS_THING_VISTREE 1
00049 
00054 #define CS_THING_FASTMESH 2
00055 
00062 #define CS_THING_NOCOMPRESS 4
00063 
00068 #define CS_THING_MOVE_NEVER 0
00069 #define CS_THING_MOVE_OFTEN 1
00070 #define CS_THING_MOVE_OCCASIONAL 2
00071 
00072 SCF_VERSION (iThingState, 0, 0, 11);
00073 
00078 struct iThingState : public iBase
00079 {
00081   virtual void* GetPrivateObject () = 0;
00082 
00084   virtual iObject* QueryObject () = 0;
00085 
00096   virtual void CompressVertices () = 0;
00097 
00099   virtual int GetPolygonCount () = 0;
00101   virtual iPolygon3D *GetPolygon (int idx) = 0;
00103   virtual iPolygon3D *GetPolygon (const char* name) = 0;
00105   virtual iPolygon3D *CreatePolygon (const char *iName = NULL) = 0;
00106 
00108   virtual int GetPortalCount () = 0;
00110   virtual iPortal* GetPortal (int idx) = 0;
00112   virtual iPolygon3D* GetPortalPolygon (int idx) = 0;
00113 
00115   virtual int GetVertexCount () = 0;
00117   virtual const csVector3 &GetVertex (int idx) const = 0;
00119   virtual const csVector3* GetVertices () const = 0;
00121   virtual const csVector3 &GetVertexW (int idx) const = 0;
00123   virtual const csVector3* GetVerticesW () const = 0;
00125   virtual const csVector3 &GetVertexC (int idx) const = 0;
00127   virtual const csVector3* GetVerticesC () const = 0;
00129   virtual int CreateVertex (const csVector3 &iVertex) = 0;
00135   virtual void CheckFrustum (iFrustumView* fview, iMovable* movable) = 0;
00136 
00138   virtual csFlags& GetFlags () = 0;
00139 
00143   virtual int GetMovingOption () = 0;
00144 
00177   virtual void SetMovingOption (int opt) = 0;
00178 
00182   virtual const csVector3& GetCurvesCenter () const = 0;
00186   virtual void SetCurvesCenter (const csVector3& cen) = 0;
00187 
00191   virtual float GetCurvesScale () = 0;
00195   virtual void SetCurvesScale (float scale) = 0;
00196 
00198   virtual void AddCurveVertex (const csVector3& v, const csVector2& uv) = 0;
00200   virtual int GetCurveCount () = 0;
00202   virtual iCurve* GetCurve (int idx) = 0;
00204   virtual int GetCurveVertexCount () = 0;
00206   virtual csVector3& CurveVertex (int i) = 0;
00208   virtual csVector3* GetCurveVertices () = 0;
00210   virtual csVector2& CurveTexel (int i) = 0;
00211 
00213   virtual iCurve* CreateCurve (iCurveTemplate* tmpl) = 0;
00214 
00218   virtual void MergeTemplate (iThingState* tpl,
00219         iMaterialWrapper* default_material = NULL,
00220         csVector3* shift = NULL, csMatrix3* transform = NULL) = 0;
00221 
00229   virtual void ReplaceMaterials (iMaterialList* matList,
00230         const char* prefix) = 0;
00231 
00233   virtual bool HasFog () const = 0;
00235   virtual csFog* GetFog () const = 0;
00236 };
00237 
00238 SCF_VERSION (iThingEnvironment, 0, 0, 1);
00239 
00245 struct iThingEnvironment : public iBase
00246 {
00247   virtual iPolyTxtPlane* CreatePolyTxtPlane (const char* name = NULL) = 0;
00248   virtual iPolyTxtPlane* FindPolyTxtPlane (const char* name) = 0;
00249   virtual iCurveTemplate* CreateBezierTemplate (const char* name = NULL) = 0;
00250   virtual iCurveTemplate* FindCurveTemplate (const char *iName) = 0;
00251 };
00252 
00253 #endif

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