home *** CD-ROM | disk | FTP | other *** search
/ Enter 2005 March / ENTER.ISO / files / fwp-0.0.6-win32-installer.exe / Quadtree.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-12-18  |  1015 b   |  60 lines

  1. #ifndef __Quadtree_h__
  2. #define __Quadtree_h__
  3.  
  4. /*!
  5. \file quadtree.h
  6. \author Karsten Schwenk
  7.  
  8. \brief This file contains the implementation of a quadtree (class #Quadtree).
  9.  
  10. \see sptree.h
  11. */
  12.  
  13. //#include "model.h"
  14. //#include "vectormath.h"
  15. #include "SpacePartitioningTree.h"
  16. #ifndef WIN32
  17. #include <string.h>
  18. #endif
  19.  
  20. enum quadtreeNeightbour_e{
  21.     QUADTREE_NEIGHBOUR_LEFT=0,
  22.     QUADTREE_NEIGHBOUR_RIGHT,
  23.     QUADTREE_NEIGHBOUR_UP,
  24.     QUADTREE_NEIGHBOUR_DOWN,
  25.  
  26.     QUADTREE_NUM_NEIGHBOURS
  27.  
  28. };
  29.  
  30. enum quadtreeChilds_e{
  31.     QUADTREE_CHILD_LOWER_RIGHT=0,
  32.     QUADTREE_CHILD_LOWER_LEFT,
  33.     QUADTREE_CHILD_UPPER_LEFT,
  34.     QUADTREE_CHILD_UPPER_RIGHT,
  35.  
  36.     QUADTREE_NUM_CHILDS
  37.  
  38. };
  39.  
  40.  
  41. class QuadtreeNode;
  42.  
  43. class Quadtree:public SpacePartitioningTree{
  44. public:
  45.     Quadtree(Model* model);
  46.     ~Quadtree();
  47. };
  48.  
  49. class QuadtreeNode:public SpacePartitioningTreeNode{
  50. public:
  51.     QuadtreeNode(Quadtree* tree);
  52.     ~QuadtreeNode();
  53.  
  54.     void buildNode();
  55.     void buildNeighbourhoodInfo();
  56. };
  57.  
  58. #endif    /* __Quadtree_h__ */
  59.  
  60.