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 
00053 struct iSector : public iBase
00054 {
00056   virtual csSector *GetPrivateObject () = 0;
00058   virtual iObject *QueryObject() = 0;
00059 
00061   virtual bool HasFog () const = 0;
00063   virtual csFog *GetFog () const = 0;
00065   virtual void SetFog (float density, const csColor& color) = 0;
00067   virtual void DisableFog () = 0;
00068 
00070   virtual iMeshList* GetMeshes () = 0;
00072   virtual iLightList* GetLights () = 0;
00073 
00075   virtual iStatLight *FindLight (float x, float y, float z, float dist)
00076     const = 0;
00077 
00079   virtual void ShineLights () = 0;
00081   virtual void ShineLights (iMeshWrapper*) = 0;
00082 
00088   virtual void CalculateSectorBBox (csBox3& bbox,
00089         bool do_meshes) const = 0;
00090 
00095   virtual void SetVisibilityCuller (const char *Name) = 0;
00100   virtual iVisibilityCuller* GetVisibilityCuller () const = 0;
00101 
00105   virtual int GetRecLevel () const = 0;
00106 
00114   virtual iPolygon3D* HitBeam (const csVector3& start, const csVector3& end,
00115         csVector3& isect) = 0;
00116 
00123   virtual iMeshWrapper* HitBeam (const csVector3& start, const csVector3& end,
00124         csVector3& intersect, iPolygon3D** polygonPtr) = 0;
00125 
00144   virtual iSector* FollowSegment (csReversibleTransform& t,
00145         csVector3& new_position, bool& mirror, bool only_portals = false) = 0;
00146 
00148   virtual void Draw (iRenderView* rview) = 0;
00149 };
00150 
00151 
00152 SCF_VERSION (iSectorList, 0, 0, 2);
00153 
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 #endif // __IENGINE_SECTOR_H__

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