Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __CS_IENGINE_OBJWATCH_H__
00020 #define __CS_IENGINE_OBJWATCH_H__
00021
00029 #include "csutil/scf.h"
00030
00031 struct iMovable;
00032 struct iLight;
00033 struct iSector;
00034 struct iMeshWrapper;
00035
00040
00041 #define CS_WATCH_NONE 0
00042
00043 #define CS_WATCH_LIGHT_DESTROY 1
00044
00045 #define CS_WATCH_LIGHT_MOVE 2
00046
00047 #define CS_WATCH_LIGHT_RADIUS 3
00048
00049 #define CS_WATCH_LIGHT_COLOR 4
00050
00051 #define CS_WATCH_LIGHT_SECTOR 5
00052
00053 #define CS_WATCH_MOVABLE_DESTROY 6
00054
00055 #define CS_WATCH_MOVABLE_CHANGED 7
00056
00057 #define CS_WATCH_LIGHT_ATTENUATION 8
00058
00059 #define CS_WATCH_SECTOR_NEWMESH 9
00060
00061 #define CS_WATCH_SECTOR_REMOVEMESH 10
00062
00072 struct iObjectWatcherListener : public virtual iBase
00073 {
00074 SCF_INTERFACE (iObjectWatcherListener, 0, 0, 1);
00075
00080 virtual void ObjectChanged (int op, iMovable* movable) = 0;
00081
00086 virtual void ObjectChanged (int op, iLight* light) = 0;
00087
00092 virtual void ObjectChanged (int op, iSector* sector, iMeshWrapper* mesh) = 0;
00093 };
00094
00095
00110 struct iObjectWatcher : public virtual iBase
00111 {
00112 SCF_INTERFACE(iObjectWatcher, 2,0,0);
00114 virtual void WatchLight (iLight* light) = 0;
00116 virtual void RemoveLight (iLight* light) = 0;
00118 virtual int GetWatchedLightCount () const = 0;
00120 virtual iLight* GetLight (int idx) = 0;
00121
00123 virtual void WatchMovable (iMovable* movable) = 0;
00125 virtual void RemoveMovable (iMovable* movable) = 0;
00127 virtual int GetWatchedMovableCount () const = 0;
00129 virtual iMovable* GetMovable (int idx) = 0;
00130
00132 virtual void WatchSector (iSector* sector) = 0;
00134 virtual void RemoveSector (iSector* sector) = 0;
00136 virtual int GetWatchedSectorCount () const = 0;
00138 virtual iSector* GetSector (int idx) = 0;
00139
00141 virtual void Reset () = 0;
00142
00154 virtual uint32 GetWatchNumber () const = 0;
00155
00170 virtual int GetLastOperation () const = 0;
00171
00176 virtual iLight* GetLastLight () const = 0;
00177
00182 virtual iMovable* GetLastMovable () const = 0;
00183
00188 virtual iSector* GetLastSector () const = 0;
00189
00194 virtual iMeshWrapper* GetLastMeshWrapper () const = 0;
00195
00200 virtual void AddListener (iObjectWatcherListener* cb) = 0;
00201
00205 virtual void RemoveListener (iObjectWatcherListener* cb) = 0;
00206 };
00207
00210 #endif // __CS_IENGINE_OBJWATCH_H__
00211