shape_doc 0.1
|
00001 /***************************************************************************** 00002 * M a t h e m a g i x 00003 ***************************************************************************** 00004 * Quadtree 00005 * 2008-03-21 00006 * Julien Wintz 00007 ***************************************************************************** 00008 * Copyright (C) 2006 INRIA Sophia-Antipolis 00009 ***************************************************************************** 00010 * Comments : 00011 ****************************************************************************/ 00012 00013 # ifndef QUADTREE_H 00014 # define QUADTREE_H 00015 00016 # include <shape/octree_node.hpp> 00017 00018 namespace mmx { 00019 00020 namespace shape { 00021 00022 template <class Object, class CELL> class quadtree 00023 { 00024 typedef octree_node<Object, CELL> Node; 00025 00026 public: 00027 quadtree<Object, CELL>(void) { 00028 m_root = new Node ; 00029 m_root->setParent(NULL) ; 00030 } 00031 00032 inline Node * root(void) { 00033 return m_root ; 00034 } 00035 00036 private: 00037 Node * m_root ; 00038 } ; 00039 00040 } ; // namespace shape 00041 00042 } ; // namespace mmx 00043 00044 # endif // QUADTREE_H