Skip to content
Snippets Groups Projects
Commit b4bf46dc authored by Paul-Emile Bernard's avatar Paul-Emile Bernard
Browse files

No commit message

No commit message
parent aa71fc9b
No related branches found
No related tags found
No related merge requests found
...@@ -1016,4 +1016,13 @@ MElementOctree* backgroundMesh::get_octree(){ ...@@ -1016,4 +1016,13 @@ MElementOctree* backgroundMesh::get_octree(){
return _octree; return _octree;
} }
MElement *backgroundMesh::getMeshElementByCoord(double u, double v, double w, bool strict)
{
if(!_octree){
Msg::Debug("Rebuilding BackgroundMesh element octree");
_octree = new MElementOctree(_triangles);
}
return _octree->find(u,v,w, 2, strict);
}
backgroundMesh* backgroundMesh::_current = 0; backgroundMesh* backgroundMesh::_current = 0;
...@@ -85,6 +85,16 @@ class backgroundMesh : public simpleFunction<double> ...@@ -85,6 +85,16 @@ class backgroundMesh : public simpleFunction<double>
} }
} }
MElementOctree* get_octree(); MElementOctree* get_octree();
MElement *getMeshElementByCoord(double u, double v, double w, bool strict=true);
int getNumMeshElements()const{return _triangles.size();}
std::vector<MVertex*>::iterator begin_vertices(){return _vertices.begin();}
std::vector<MVertex*>::iterator end_vertices(){return _vertices.end();}
std::vector<MVertex*>::const_iterator begin_vertices()const{return _vertices.begin();}
std::vector<MVertex*>::const_iterator end_vertices()const{return _vertices.end();}
std::vector<MElement*>::iterator begin_triangles(){return _triangles.begin();}
std::vector<MElement*>::iterator end_triangles(){return _triangles.end();}
std::vector<MElement*>::const_iterator begin_triangles()const{return _triangles.begin();}
std::vector<MElement*>::const_iterator end_triangles()const{return _triangles.end();}
}; };
SMetric3 buildMetricTangentToCurve (SVector3 &t, double l_t, double l_n); SMetric3 buildMetricTangentToCurve (SVector3 &t, double l_t, double l_n);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment