Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

sector.h

00001 /*
00002     Crystal Space 3D engine
00003     Copyright (C) 1998-2001 by Jorrit Tyberghein
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 */
00019 
00020 #ifndef __IENGINE_SECTOR_H__
00021 #define __IENGINE_SECTOR_H__
00022 
00023 #include "cstypes.h"
00024 #include "csutil/scf.h"
00025 
00026 class csVector3;
00027 class csSector;
00028 class csColor;
00029 class csBox3;
00030 class csReversibleTransform;
00031 struct iMeshWrapper;
00032 struct iMeshList;
00033 struct iLightList;
00034 struct iThing;
00035 struct iStatLight;
00036 struct iVisibilityCuller;
00037 struct iObject;
00038 struct csFog;
00039 struct iGraphics3D;
00040 struct iPolygon3D;
00041 struct iRenderView;
00042 
00043 SCF_VERSION (iSector, 0, 4, 1);
00044 
00054 struct iSector : public iBase
00055 {
00057   virtual csSector *GetPrivateObject () = 0;
00059   virtual iObject *QueryObject() = 0;
00060 
00062   virtual bool HasFog () const = 0;
00064   virtual csFog *GetFog () const = 0;
00066   virtual void SetFog (float density, const csColor& color) = 0;
00068   virtual void DisableFog () = 0;
00069 
00071   virtual iMeshList* GetMeshes () = 0;
00073   virtual iLightList* GetLights () = 0;
00074 
00076   virtual void ShineLights () = 0;
00078   virtual void ShineLights (iMeshWrapper*) = 0;
00079 
00085   virtual void CalculateSectorBBox (csBox3& bbox,
00086         bool do_meshes) const = 0;
00087 
00092   virtual void SetVisibilityCuller (const char *Name) = 0;
00097   virtual iVisibilityCuller* GetVisibilityCuller () const = 0;
00098 
00102   virtual int GetRecLevel () const = 0;
00103 
00111   virtual iPolygon3D* HitBeam (const csVector3& start, const csVector3& end,
00112         csVector3& isect) = 0;
00113 
00120   virtual iMeshWrapper* HitBeam (const csVector3& start, const csVector3& end,
00121         csVector3& intersect, iPolygon3D** polygonPtr) = 0;
00122 
00141   virtual iSector* FollowSegment (csReversibleTransform& t,
00142         csVector3& new_position, bool& mirror, bool only_portals = false) = 0;
00143 
00145   virtual void Draw (iRenderView* rview) = 0;
00146 };
00147 
00148 
00149 SCF_VERSION (iSectorList, 0, 0, 2);
00150 
00154 struct iSectorList : public iBase
00155 {
00157   virtual int GetCount () const = 0;
00158 
00160   virtual iSector *Get (int n) const = 0;
00161 
00163   virtual int Add (iSector *obj) = 0;
00164 
00166   virtual bool Remove (iSector *obj) = 0;
00167 
00169   virtual bool Remove (int n) = 0;
00170 
00172   virtual void RemoveAll () = 0;
00173 
00175   virtual int Find (iSector *obj) const = 0;
00176 
00178   virtual iSector *FindByName (const char *Name) const = 0;
00179 };
00180 
00181 SCF_VERSION (iSectorIterator, 0, 0, 1);
00182 
00187 struct iSectorIterator : public iBase
00188 {
00190   virtual void Restart () = 0;
00191 
00193   virtual iSector* Fetch () = 0;
00194 
00199   virtual const csVector3& GetLastPosition () = 0;
00200 };
00201 
00202 #endif // __IENGINE_SECTOR_H__
00203 

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