shape_doc 0.1
/Users/mourrain/Devel/mmx/shape/include/shape/octree.hpp
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * M a t h e m a g i x
00003  *****************************************************************************
00004  * Octree
00005  * 2008-03-21
00006  * Julien Wintz
00007  *****************************************************************************
00008  *               Copyright (C) 2006 INRIA Sophia-Antipolis
00009  *****************************************************************************
00010  * Comments :
00011  ****************************************************************************/
00012 
00013 # ifndef shape_octree_hpp
00014 # define shape_octree_hpp
00015 # include <shape/node.hpp>
00016 
00017 //====================================================================
00018 namespace mmx {
00019 namespace shape {
00020 
00021 template <class OBJECT, class CELL> class octree
00022 {
00023 public:
00024     octree(void) {
00025         m_root = new node<OBJECT, CELL> ;
00026         m_root->setParent(NULL) ;
00027     } 
00028     
00029     node<OBJECT, CELL> * root(void) { 
00030                         return m_root ;
00031     }
00032 
00033                 const node<OBJECT, CELL> * root(void) const {
00034                         return m_root ;
00035                 }
00036 
00037 private:
00038     node<OBJECT, CELL> * m_root ;
00039 } ;
00040   //====================================================================
00041 } ; // namespace shape
00042 } ; // namespace mmx
00043 # endif