CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

sector.h

Go to the documentation of this file.
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 __CS_IENGINE_SECTOR_H__
00021 #define __CS_IENGINE_SECTOR_H__
00022 
00029 #include "cstypes.h"
00030 #include "csutil/scf.h"
00031 #include "iutil/object.h"
00032 
00033 class csVector3;
00034 class csSector;
00035 class csColor;
00036 class csBox3;
00037 class csReversibleTransform;
00038 struct iMeshWrapper;
00039 struct iMeshList;
00040 struct iLightList;
00041 struct iLight;
00042 struct iThing;
00043 struct iStatLight;
00044 struct iVisibilityCuller;
00045 struct iVisibilityObject;
00046 struct iObject;
00047 struct csFog;
00048 struct iGraphics3D;
00049 struct iPolygon3D;
00050 struct iRenderView;
00051 struct iFrustumView;
00052 struct iSector;
00053 class csRenderMesh;
00054 
00055 SCF_VERSION (iSectorCallback, 0, 0, 1);
00056 
00062 struct iSectorCallback : public iBase
00063 {
00068   virtual void Traverse (iSector* sector, iBase* context) = 0;
00069 };
00070 
00071 SCF_VERSION (iSector, 0, 5, 2);
00072 
00082 struct iSector : public iBase
00083 {
00085   virtual csSector *GetPrivateObject () = 0;
00087   virtual iObject *QueryObject() = 0;
00088 
00090   virtual bool HasFog () const = 0;
00092   virtual csFog *GetFog () const = 0;
00094   virtual void SetFog (float density, const csColor& color) = 0;
00096   virtual void DisableFog () = 0;
00097 
00099   virtual iMeshList* GetMeshes () = 0;
00105   virtual iLightList* GetLights () = 0;
00106 
00108   virtual void ShineLights () = 0;
00110   virtual void ShineLights (iMeshWrapper*) = 0;
00111 
00113   virtual void SetDynamicAmbientLight(const csColor& color) = 0;
00114 
00116   virtual csColor GetDynamicAmbientLight() const = 0;
00117 
00123   virtual void CalculateSectorBBox (csBox3& bbox,
00124     bool do_meshes) const = 0;
00125 
00131   virtual bool SetVisibilityCullerPlugin (const char *Name) = 0;
00137   virtual iVisibilityCuller* GetVisibilityCuller () = 0;
00138 
00142   virtual int GetRecLevel () const = 0;
00143 
00151   virtual iPolygon3D* HitBeam (const csVector3& start, const csVector3& end,
00152     csVector3& isect) = 0;
00153 
00160   virtual iMeshWrapper* HitBeam (const csVector3& start, const csVector3& end,
00161     csVector3& intersect, iPolygon3D** polygonPtr, bool accurate = false) = 0;
00162 
00181   virtual iSector* FollowSegment (csReversibleTransform& t,
00182     csVector3& new_position, bool& mirror, bool only_portals = false) = 0;
00183 
00185   virtual void Draw (iRenderView* rview) = 0;
00190   virtual void PrepareDraw (iRenderView* rview) = 0;
00191 
00196   virtual void SetSectorCallback (iSectorCallback* cb) = 0;
00197 
00201   virtual void RemoveSectorCallback (iSectorCallback* cb) = 0;
00202 
00204   virtual int GetSectorCallbackCount () const = 0;
00205 
00207   virtual iSectorCallback* GetSectorCallback (int idx) const = 0;
00208 
00210   virtual void CheckFrustum (iFrustumView* lview) = 0;
00211 };
00212 
00213 
00214 SCF_VERSION (iSectorList, 0, 0, 2);
00215 
00219 struct iSectorList : public iBase
00220 {
00222   virtual int GetCount () const = 0;
00223 
00225   virtual iSector *Get (int n) const = 0;
00226 
00228   virtual int Add (iSector *obj) = 0;
00229 
00231   virtual bool Remove (iSector *obj) = 0;
00232 
00234   virtual bool Remove (int n) = 0;
00235 
00237   virtual void RemoveAll () = 0;
00238 
00240   virtual int Find (iSector *obj) const = 0;
00241 
00243   virtual iSector *FindByName (const char *Name) const = 0;
00244 };
00245 
00246 SCF_VERSION (iSectorIterator, 0, 1, 0);
00247 
00252 struct iSectorIterator : public iBase
00253 {
00255   virtual bool HasNext () = 0;
00256 
00258   virtual iSector* Next () = 0;
00259 
00264   virtual const csVector3& GetLastPosition () = 0;
00265 
00267   virtual void Reset () = 0;
00268 };
00269 
00272 #endif // __CS_IENGINE_SECTOR_H__

Generated for Crystal Space by doxygen 1.2.14