Salome HOME
Merge from V6_main 13/12/2012
[modules/smesh.git] / src / SMESHUtils / SMESH_OctreeNode.hxx
index cc66a275b12fa8a7f85ec97a1d7d45ceff5dd559..eea34d11f8ea462f40d521c6150013066d978f16 100644 (file)
@@ -109,7 +109,16 @@ public:
 
 protected:
 
-  SMESH_OctreeNode (int maxNbNodes );
+  struct Limit : public SMESH_TreeLimit
+  {
+    int myMaxNbNodes;
+    Limit(int maxLevel, double minSize, int maxNbNodes)
+      :SMESH_TreeLimit(maxLevel, minSize), myMaxNbNodes(maxNbNodes) {}
+  };
+
+  int                   getMaxNbNodes() const;
+
+  SMESH_OctreeNode();
 
   // Compute the bounding box of the whole set of nodes myNodes
   virtual Bnd_B3d*      buildRootBox();
@@ -118,7 +127,7 @@ protected:
   virtual void          buildChildrenData();
 
   // Construct an empty SMESH_OctreeNode used by SMESH_Octree::buildChildren()
-  virtual SMESH_Octree* allocateOctreeChild() const;
+  virtual SMESH_Octree* newChild() const;
 
   // Return in result a list of nodes closed to Node and remove it from SetOfNodes
   void                  FindCoincidentNodes( const SMDS_MeshNode *            Node,
@@ -126,9 +135,6 @@ protected:
                                              std::list<const SMDS_MeshNode*>* Result,
                                              const double                     precision);
 
-  // The max number of nodes a leaf box can contain
-  int                myMaxNbNodes;
-
   // The set of nodes inside the box of the Octree (Empty if Octree is not a leaf)
   TIDSortedNodeSet   myNodes;