BVExplorer.h

Go to the documentation of this file.
00001 /* $Id:$ */
00002 
00003 #ifndef __BOUNDING_VOLUMES_EXPLORER_H
00004 #define __BOUNDING_VOLUMES_EXPLORER_H
00005 
00006 #include <esg/explorer/Explorer.h>
00007 
00008 /*
00009  * Explorer returning bounding volumes from given depth of BV hierarchy.
00010  */
00011 
00012 namespace esg {
00013 
00014 class OGSCENE_EXPORT BVExplorer : public Explorer {
00015 protected:
00016     List<Geometry> _boundingVolumes;
00017     unsigned       _depth;
00018 
00019 protected:
00020     virtual bool _iterate                   (SceneGraphObject&);
00021     virtual bool _process_leaf              (SceneGraphObject&) {return false;}
00022     virtual void _accept_new_transformation (const Matrix4&)    {}
00023 
00024 public:
00025     BVExplorer (unsigned depth) : _depth(depth) {}
00026     virtual ~BVExplorer () { _boundingVolumes.deleteAll(); }
00027 
00028     Geometry* result (void) {
00029         return _boundingVolumes.remove(_boundingVolumes.firstItem());
00030     }
00031 };
00032     
00033 }; // namespace
00034 
00035 #endif // __BOUNDING_VOLUMES_EXPLORER_H

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