propclass/zone.h
00001 /* 00002 Crystal Space Entity Layer 00003 Copyright (C) 2004 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #ifndef __CEL_PF_ZONE__ 00021 #define __CEL_PF_ZONE__ 00022 00023 #include "cstypes.h" 00024 #include "csgeom/vector3.h" 00025 #include "csutil/scf.h" 00026 00027 struct iSector; 00028 struct iPcCamera; 00029 struct iPcMesh; 00030 struct iCelEntity; 00031 struct iStringArray; 00032 struct iString; 00033 struct iDocumentNode; 00034 00035 SCF_VERSION (iCelMapFile, 0, 1, 0); 00036 00040 struct iCelMapFile : public iBase 00041 { 00047 virtual void SetPath (const char* path) = 0; 00048 00053 virtual void SetFile (const char* file) = 0; 00054 00059 virtual const char* GetPath () const = 0; 00060 00065 virtual const char* GetFile () const = 0; 00066 00073 virtual void SetSectorName (const char* name) = 0; 00074 00079 virtual const char* GetSectorName () const = 0; 00080 }; 00081 00082 SCF_VERSION (iCelRegion, 0, 2, 1); 00083 00088 struct iCelRegion : public iBase 00089 { 00091 virtual const char* GetName () const = 0; 00092 00099 virtual const char* GetCsRegionName () const = 0; 00100 00108 virtual void SetCachePath (const char* path) = 0; 00109 00114 virtual const char* GetCachePath () const = 0; 00115 00120 virtual iCelMapFile* CreateMapFile () = 0; 00121 00125 virtual size_t GetMapFileCount () const = 0; 00126 00130 virtual iCelMapFile* GetMapFile (int idx) const = 0; 00131 00136 virtual bool RemoveMapFile (iCelMapFile* mapfile) = 0; 00137 00141 virtual void RemoveAllMapFiles () = 0; 00142 00147 virtual void AssociateEntity (iCelEntity* entity) = 0; 00148 00152 virtual void DissociateEntity (iCelEntity* entity) = 0; 00153 }; 00154 00155 SCF_VERSION (iCelZone, 0, 1, 0); 00156 00161 struct iCelZone : public iBase 00162 { 00164 virtual const char* GetName () const = 0; 00165 00169 virtual void LinkRegion (iCelRegion* region) = 0; 00170 00174 virtual size_t GetRegionCount () const = 0; 00175 00179 virtual iCelRegion* GetRegion (size_t idx) const = 0; 00180 00184 virtual iCelRegion* FindRegion (const char* name) const = 0; 00185 00190 virtual bool UnlinkRegion (iCelRegion* region) = 0; 00191 00195 virtual void UnlinkAllRegions () = 0; 00196 }; 00197 00201 00202 #define CEL_ZONEERROR_OK 0 00203 00205 #define CEL_ZONEERROR_BADREGION 1 00206 00208 #define CEL_ZONEERROR_BADSTART 2 00209 00211 #define CEL_ZONEERROR_LOAD 3 00212 00217 00218 #define CEL_ZONE_NORMAL 0 00219 00221 #define CEL_ZONE_KEEP 1 00222 00224 #define CEL_ZONE_LOADALL 2 00225 00228 SCF_VERSION (iPcZoneManager, 0, 1, 2); 00229 00267 struct iPcZoneManager : public iBase 00268 { 00274 virtual void EnableColliderWrappers (bool en) = 0; 00275 00279 virtual bool IsColliderWrappers () const = 0; 00280 00289 virtual void SetLoadingMode (int mode) = 0; 00290 00294 virtual int GetLoadingMode () const = 0; 00295 00302 virtual bool Load (iDocumentNode* node) = 0; 00303 00316 virtual bool Load (const char* path, const char* file) = 0; 00317 00321 virtual iCelZone* CreateZone (const char* name) = 0; 00322 00326 virtual size_t GetZoneCount () const = 0; 00327 00331 virtual iCelZone* GetZone (int idx) const = 0; 00332 00336 virtual iCelZone* FindZone (const char* name) const = 0; 00337 00342 virtual bool RemoveZone (iCelZone* zone) = 0; 00343 00347 virtual void RemoveAllZones () = 0; 00348 00352 virtual iCelRegion* CreateRegion (const char* name) = 0; 00353 00357 virtual size_t GetRegionCount () const = 0; 00358 00362 virtual iCelRegion* GetRegion (int idx) const = 0; 00363 00367 virtual iCelRegion* FindRegion (const char* name) const = 0; 00368 00373 virtual bool RemoveRegion (iCelRegion* region) = 0; 00374 00378 virtual void RemoveAllRegions () = 0; 00379 00383 virtual void FindStartLocations (iStringArray* regionnames, 00384 iStringArray* startnames) = 0; 00385 00391 virtual void GetLastStartLocation (iString* regionname, 00392 iString* startname) = 0; 00398 virtual const char *GetLastStartRegionName () = 0; 00399 00404 virtual const char *GetLastStartName () = 0; 00405 00422 virtual int PointCamera (const char* entity, const char* regionname, 00423 const char* startname = 0) = 0; 00424 00441 virtual int PointMesh (const char* entity, const char* regionname, 00442 const char* startname = 0) = 0; 00443 00450 virtual bool ActivateRegion (iCelRegion* region, 00451 bool allow_entity_addon = true) = 0; 00452 }; 00453 00454 #endif // __CEL_PF_ZONE__ 00455
Generated for CEL: Crystal Entity Layer by doxygen 1.4.7