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

  1. #ifndef __Octree_h__
  2. #define __Octree_h__
  3.  
  4. /*!
  5. \file octree.h
  6. \author Karsten Schwenk
  7.  
  8. \brief This file contains the implementation of an octree (class #Octree).
  9.  
  10.  
  11. \see sptree.h
  12. \todo document everything
  13. */
  14.  
  15. //#include "model.h"
  16. //#include "vectormath.h"
  17. #include "SpacePartitioningTree.h"
  18. #ifndef WIN32
  19. #include <string.h>
  20. #endif
  21.  
  22. enum octreeNeightbour_e{
  23.     OCTREE_NEIGHBOUR_LEFT=0,
  24.     OCTREE_NEIGHBOUR_RIGHT,
  25.     OCTREE_NEIGHBOUR_UP,
  26.     OCTREE_NEIGHBOUR_DOWN,
  27.     OCTREE_NEIGHBOUR_FRONT,
  28.     OCTREE_NEIGHBOUR_BACK,
  29.  
  30.     OCTREE_NUM_NEIGHBOURS
  31.  
  32. };
  33.  
  34. enum octreechilds_e{
  35.     OCTREE_CHILD_LOWER_RIGHT_FRONT=0,
  36.     OCTREE_CHILD_LOWER_LEFT_FRONT,
  37.     OCTREE_CHILD_UPPER_LEFT_FRONT,
  38.     OCTREE_CHILD_UPPER_RIGHT_FRONT,
  39.  
  40.     OCTREE_CHILD_LOWER_RIGHT_BACK,
  41.     OCTREE_CHILD_LOWER_LEFT_BACK,
  42.     OCTREE_CHILD_UPPER_LEFT_BACK,
  43.     OCTREE_CHILD_UPPER_RIGHT_BACK,
  44.  
  45.     OCTREE_NUM_CHILDS
  46.  
  47. };
  48.  
  49.  
  50. class OctreeNode;
  51.  
  52. class Octree:public SpacePartitioningTree{
  53. public:
  54.     Octree(Model* model);
  55.     ~Octree();
  56. };
  57.  
  58. class OctreeNode:public SpacePartitioningTreeNode{
  59. public:
  60.     OctreeNode(Octree* tree);
  61.     ~OctreeNode();
  62.  
  63.     void buildNode();
  64.     void buildNeighbourhoodInfo();
  65. };
  66.  
  67.  
  68. #endif    /* __Octree_h__ */
  69.  
  70.