CrystalSpace

Public API Reference

iengine/objwatch.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2003 by Jorrit Tyberghein
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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 
00069 struct iObjectWatcherListener : public virtual iBase
00070 {
00071   SCF_INTERFACE (iObjectWatcherListener, 0, 0, 1);
00072 
00077   virtual void ObjectChanged (int op, iMovable* movable) = 0;
00078 
00083   virtual void ObjectChanged (int op, iLight* light) = 0;
00084 
00089   virtual void ObjectChanged (int op, iSector* sector, iMeshWrapper* mesh) = 0;
00090 };
00091 
00092 
00101 struct iObjectWatcher : public virtual iBase
00102 {
00103   SCF_INTERFACE(iObjectWatcher, 2,0,0);
00105   virtual void WatchLight (iLight* light) = 0;
00107   virtual void RemoveLight (iLight* light) = 0;
00109   virtual int GetWatchedLightCount () const = 0;
00111   virtual iLight* GetLight (int idx) = 0;
00112 
00114   virtual void WatchMovable (iMovable* movable) = 0;
00116   virtual void RemoveMovable (iMovable* movable) = 0;
00118   virtual int GetWatchedMovableCount () const = 0;
00120   virtual iMovable* GetMovable (int idx) = 0;
00121 
00123   virtual void WatchSector (iSector* sector) = 0;
00125   virtual void RemoveSector (iSector* sector) = 0;
00127   virtual int GetWatchedSectorCount () const = 0;
00129   virtual iSector* GetSector (int idx) = 0;
00130 
00132   virtual void Reset () = 0;
00133 
00145   virtual uint32 GetWatchNumber () const = 0;
00146 
00161   virtual int GetLastOperation () const = 0;
00162 
00167   virtual iLight* GetLastLight () const = 0;
00168 
00173   virtual iMovable* GetLastMovable () const = 0;
00174 
00179   virtual iSector* GetLastSector () const = 0;
00180 
00185   virtual iMeshWrapper* GetLastMeshWrapper () const = 0;
00186 
00191   virtual void AddListener (iObjectWatcherListener* cb) = 0;
00192 
00196   virtual void RemoveListener (iObjectWatcherListener* cb) = 0;
00197 };
00198 
00201 #endif // __CS_IENGINE_OBJWATCH_H__
00202 

Generated for Crystal Space by doxygen 1.4.6