00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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__