diff --git a/Geo/MElementOctree.cpp b/Geo/MElementOctree.cpp index c49fc04336326811b32ce15c8c8c872ce48ee867..360e6afb02e3fc24b119e9f51b78a75d29298402 100644 --- a/Geo/MElementOctree.cpp +++ b/Geo/MElementOctree.cpp @@ -5,7 +5,6 @@ #include "GModel.h" #include "MElement.h" -#include "MTetrahedron.h" #include "MElementOctree.h" #include "Octree.h" #include "Context.h" @@ -119,41 +118,6 @@ MElementOctree::MElementOctree(std::vector<MElement*> &v) : _gm(0), _elems(v) } -MElementOctree::MElementOctree(std::vector<MTetrahedron*> &v) : _gm(0) -{ - // exactly the same as MElementOctree::MElementOctree(vector<MElement*>) !!! - for (std::vector<MTetrahedron*>::iterator it = v.begin();it!=v.end();it++){ - _elems.push_back(*it); - } - // exactly the same as MElementOctree::MElementOctree(vector<MElement*>) !!! - - - SBoundingBox3d bb; - for (unsigned int i = 0; i < v.size(); i++){ - for(int j = 0; j < v[i]->getNumVertices(); j++){ - //if (!_gm) _gm = v[i]->getVertex(j)->onWhat()->model(); - bb += SPoint3(v[i]->getVertex(j)->x(), - v[i]->getVertex(j)->y(), - v[i]->getVertex(j)->z()); - } - } - // make bounding box larger up to (absolute) geometrical tolerance - double eps = CTX::instance()->geom.tolerance; - SPoint3 bbmin = bb.min(), bbmax = bb.max(), bbeps(eps, eps, eps); - bbmin -= bbeps; - bbmax += bbeps; - double min[3] = {bbmin.x(), bbmin.y(), bbmin.z()}; - double size[3] = {bbmax.x() - bbmin.x(), - bbmax.y() - bbmin.y(), - bbmax.z() - bbmin.z()}; - const int maxElePerBucket = 100; // memory vs. speed trade-off - _octree = Octree_Create(maxElePerBucket, min, size, - MElementBB, MElementCentroid, MElementInEle); - for (unsigned int i = 0; i < v.size(); i++) - Octree_Insert(v[i], _octree); - Octree_Arrange(_octree); -} - MElementOctree::~MElementOctree() { Octree_Delete(_octree); diff --git a/Geo/MElementOctree.h b/Geo/MElementOctree.h index 61beb1e6a4f6ed11f03bbef1fff64f58dc7d2c54..a517f8b68d211f750489a2e3052a2784caf4374c 100644 --- a/Geo/MElementOctree.h +++ b/Geo/MElementOctree.h @@ -11,7 +11,6 @@ class Octree; class GModel; class MElement; -class MTetrahedron; class MElementOctree{ private: @@ -21,7 +20,6 @@ class MElementOctree{ public: MElementOctree(GModel *); MElementOctree(std::vector<MElement*> &); - MElementOctree(std::vector<MTetrahedron*> &); ~MElementOctree(); MElement *find(double x, double y, double z, int dim = -1, bool strict = false) const; Octree *getInternalOctree(){ return _octree; }