LightsExplorer.h

Go to the documentation of this file.
00001 /* $Id:$ */
00002 
00003 #ifndef __LIGHTS_EXPLORER_H
00004 #define __LIGHTS_EXPLORER_H
00005 
00006 #include <esg/explorer/Explorer.h>
00007 #include <esg/LightArray.h>
00008 #include <esg/Export>
00009 
00010 /*
00011  * Explorer searching all lights in the scene
00012  */
00013 
00014 namespace esg {
00015 
00016 class OGSCENE_EXPORT LightsExplorer : public Explorer {
00017 protected:
00018     ESGint       _freePosition;
00019     LightArray * _pLights;
00020     unsigned     _caches;
00021     
00022 protected:
00023     virtual bool _process_leaf              (SceneGraphObject&);
00024     virtual void _accept_new_transformation (const Matrix4&) {}
00025 
00026 public:
00027     LightsExplorer (unsigned caches = 0)
00028         : _freePosition(0), _pLights(NULL), _caches(caches) {}
00029     
00030     virtual ~LightsExplorer () { if (_pLights) delete _pLights; }
00031 
00032     LightArray* result (void) {
00033         LightArray* pRet = _pLights;
00034         _pLights = NULL;
00035         _freePosition = 0;
00036         return pRet;
00037     }
00038 };
00039     
00040 }; // namespace
00041 
00042 #endif // __LIGHTS_EXPLORER_H

Generated on Wed Jun 28 12:24:28 2006 for esg by  doxygen 1.4.6