home *** CD-ROM | disk | FTP | other *** search
- #ifndef __Octree_h__
- #define __Octree_h__
-
- /*!
- \file octree.h
- \author Karsten Schwenk
-
- \brief This file contains the implementation of an octree (class #Octree).
-
-
- \see sptree.h
- \todo document everything
- */
-
- //#include "model.h"
- //#include "vectormath.h"
- #include "SpacePartitioningTree.h"
- #ifndef WIN32
- #include <string.h>
- #endif
-
- enum octreeNeightbour_e{
- OCTREE_NEIGHBOUR_LEFT=0,
- OCTREE_NEIGHBOUR_RIGHT,
- OCTREE_NEIGHBOUR_UP,
- OCTREE_NEIGHBOUR_DOWN,
- OCTREE_NEIGHBOUR_FRONT,
- OCTREE_NEIGHBOUR_BACK,
-
- OCTREE_NUM_NEIGHBOURS
-
- };
-
- enum octreechilds_e{
- OCTREE_CHILD_LOWER_RIGHT_FRONT=0,
- OCTREE_CHILD_LOWER_LEFT_FRONT,
- OCTREE_CHILD_UPPER_LEFT_FRONT,
- OCTREE_CHILD_UPPER_RIGHT_FRONT,
-
- OCTREE_CHILD_LOWER_RIGHT_BACK,
- OCTREE_CHILD_LOWER_LEFT_BACK,
- OCTREE_CHILD_UPPER_LEFT_BACK,
- OCTREE_CHILD_UPPER_RIGHT_BACK,
-
- OCTREE_NUM_CHILDS
-
- };
-
-
- class OctreeNode;
-
- class Octree:public SpacePartitioningTree{
- public:
- Octree(Model* model);
- ~Octree();
- };
-
- class OctreeNode:public SpacePartitioningTreeNode{
- public:
- OctreeNode(Octree* tree);
- ~OctreeNode();
-
- void buildNode();
- void buildNeighbourhoodInfo();
- };
-
-
- #endif /* __Octree_h__ */
-
-