00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 # ifndef shape_kdtree_hpp
00014 # define shape_kdtree_hpp
00015 # include <shape/node.hpp>
00016 # define KDTREE kdtree<CELL>
00017 # define NODE node<CELL>
00018 # define TMPL template <class CELL>
00019
00020 namespace mmx { namespace shape {
00021
00022 TMPL class kdtree
00023 {
00024 public:
00025 kdtree(void) {
00026 m_root = new NODE ;
00027 m_root->set_parent(NULL) ;
00028 }
00029
00030 NODE * root(void) {
00031 return m_root ;
00032 }
00033
00034 const NODE * root(void) const {
00035 return m_root ;
00036 }
00037
00038 private:
00039 NODE * m_root ;
00040 } ;
00041
00042 } ;
00043 } ;
00044 # undef TMPL
00045 # undef NODE
00046 # undef KDTREE
00047 # endif