Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

region.h

00001 /*
00002     Copyright (C) 2000 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_REGION_H__
00020 #define __CS_REGION_H__
00021 
00022 #include "csutil/csobject.h"
00023 #include "csutil/nobjvec.h"
00024 #include "iengine/region.h"
00025 
00026 struct iEngine;
00027 
00032 class csRegion : public csObject
00033 {
00034 private:
00035   iEngine* engine;
00036 
00037 public:
00041   csRegion (iEngine*);
00042 
00047   virtual ~csRegion ();
00048 
00054   virtual bool IsInRegion (iObject* obj);
00055 
00059   virtual void DeleteAll ();
00060 
00064   virtual bool PrepareTextures ();
00065 
00069   virtual bool ShineLights ();
00070 
00077   virtual bool Prepare ();
00078 
00079   SCF_DECLARE_IBASE_EXT (csObject);
00080 
00081   //--------------------- iRegion implementation ---------------------
00082   struct Region : public iRegion
00083   {
00084     SCF_DECLARE_EMBEDDED_IBASE (csRegion);
00085 
00087     virtual iObject *QueryObject();
00088 
00093     virtual void Clear ();
00094 
00098     virtual void DeleteAll ();
00099 
00103     virtual bool PrepareTextures ();
00104 
00108     virtual bool ShineLights ();
00109 
00116     virtual bool Prepare ();
00117 
00119     virtual iSector *FindSector (const char *iName);
00121     virtual iMeshWrapper *FindMeshObject (const char *iName);
00123     virtual iMeshFactoryWrapper *FindMeshFactory (const char *iName);
00125     virtual iTextureWrapper *FindTexture (const char *iName);
00127     virtual iMaterialWrapper *FindMaterial (const char *iName);
00129     virtual iCameraPosition *FindCameraPosition (const char *iName);
00131     virtual iCollection *FindCollection (const char *iName);
00132 
00138     virtual bool IsInRegion (iObject* obj);
00139   } scfiRegion;
00140   friend struct Region;
00141 };
00142 
00143 
00144 CS_DECLARE_OBJECT_VECTOR (csRegionListHelper, iRegion);
00145 
00146 class csRegionList : public csRegionListHelper
00147 {
00148 public:
00149   SCF_DECLARE_IBASE;
00150 
00152   csRegionList ();
00153 
00154   class RegionList : public iRegionList
00155   {
00156   public:
00157     SCF_DECLARE_EMBEDDED_IBASE (csRegionList);
00158 
00159     virtual int GetCount () const;
00160     virtual iRegion *Get (int n) const;
00161     virtual int Add (iRegion *obj);
00162     virtual bool Remove (iRegion *obj);
00163     virtual bool Remove (int n);
00164     virtual void RemoveAll ();
00165     virtual int Find (iRegion *obj) const;
00166     virtual iRegion *FindByName (const char *Name) const;
00167   } scfiRegionList;
00168 };
00169 
00170 #endif // __CS_REGION_H__

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000