From: vbd Date: Wed, 24 Oct 2007 07:28:14 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: trio_trio_coupling~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eaec48df00bb282dda59e10215ccc5597e22f64f;p=tools%2Fmedcoupling.git *** empty log message *** --- diff --git a/src/INTERP_KERNEL/BBTree.H b/src/INTERP_KERNEL/BBTree.H index 892353ef0..4354abec8 100644 --- a/src/INTERP_KERNEL/BBTree.H +++ b/src/INTERP_KERNEL/BBTree.H @@ -75,25 +75,38 @@ BBTree(double* bbs, int* elems, int level, int nbelems): if (minmax_left) max_left = max; } + } _max_left=max_left; _min_right=min_right; _left=new BBTree(bbs, &(new_elems_left[0]), level+1, new_elems_left.size()); _right=new BBTree(bbs, &(new_elems_right[0]), level+1, new_elems_right.size()); + } + + ~BBTree() { if (_left!=0) delete _left; if (_right!=0) delete _right; + } + + /*! returns in \a elems the list of elements potentially intersecting the bounding box pointed to by \a bb + + \param bb pointer to query bounding box + \param elems list of elements (given in 0-indexing) intersecting the bounding box + */ + void getIntersectingElems(const double* bb, vector& elems) const { // terminal node : return list of elements intersecting bb @@ -135,6 +148,8 @@ void getIntersectingElems(const double* bb, vector& elems) const _right->getIntersectingElems(bb,elems); } + + int size() { if (_terminal) return _nbelems; diff --git a/src/INTERP_KERNEL/Test/Makefile.in b/src/INTERP_KERNEL/Test/Makefile.in index 9e77c87f2..e3b27d019 100644 --- a/src/INTERP_KERNEL/Test/Makefile.in +++ b/src/INTERP_KERNEL/Test/Makefile.in @@ -71,8 +71,9 @@ CXXFLAGS+=@CXXTMPDPTHFLAGS@ $(MED2_INCLUDES) $(HDF5_INCLUDES) -I$(top_srcdir)/sr CPPFLAGS+=$(BOOST_CPPFLAGS) $(MED2_INCLUDES) $(HDF5_INCLUDES) -I$(top_srcdir)/src/INTERP_KERNEL #include CppUnit -CXXFLAGS+= ${CPPUNIT_INCLUDES} -CPPFLAGS+= ${CPPUNIT_INCLUDES} + +CXXFLAGS+= $(CPPUNIT_INCLUDES) +CPPFLAGS+= $(CPPUNIT_INCLUDES) # for log CXXFLAGS+= -DLOG_LEVEL=3 -DOPTIMIZE -O2 -Wall diff --git a/src/INTERP_KERNEL/TransformedTriangle.hxx b/src/INTERP_KERNEL/TransformedTriangle.hxx index bcd62da80..178184d19 100644 --- a/src/INTERP_KERNEL/TransformedTriangle.hxx +++ b/src/INTERP_KERNEL/TransformedTriangle.hxx @@ -85,11 +85,12 @@ namespace INTERP_UTILS class TransformedTriangle { + + public: friend class INTERP_TEST::TransformedTriangleTest; friend class INTERP_TEST::TransformedTriangleIntersectTest; - /* * Enumerations representing the different geometric elements of the unit tetrahedron * and the triangle. The end element, NO_* gives the number of elements in the enumeration