X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHUtils%2FSMESH_OctreeNode.hxx;h=dac8766ba7211b193800788ba07488b63c6adc76;hp=cc66a275b12fa8a7f85ec97a1d7d45ceff5dd559;hb=5d68554076bbca0e1e95fb0db215a6c2b84b6c54;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6 diff --git a/src/SMESHUtils/SMESH_OctreeNode.hxx b/src/SMESHUtils/SMESH_OctreeNode.hxx index cc66a275b..dac8766ba 100644 --- a/src/SMESHUtils/SMESH_OctreeNode.hxx +++ b/src/SMESHUtils/SMESH_OctreeNode.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -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* 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;