Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit 04bba86e authored by Sylvain Thery's avatar Sylvain Thery
Browse files

continue gen algorithms simplification

parents 42e869b6 059d7f9c
......@@ -196,6 +196,16 @@ void MyQT::cb_Open()
updateGL() ;
}
void MyQT::cb_Save()
{
std::string filters("all (*.*);; tetmesh (*.tetmesh);; tet (*.tet);; node (*.node);; msh (*.msh);; vtu (*.vtu);; nas (*.nas);; vbgz (*.vbgz)") ;
std::string filename = selectFileSave("Save Mesh", "", filters) ;
if (filename.empty())
return ;
Algo::Volume::Export::exportMesh<PFP>(myMap,position,filename);
}
void MyQT::cb_initGL()
{
......
......@@ -48,6 +48,8 @@
#include "ui_volumeExplorer.h"
#include "Utils/Qt/qtui.h"
#include "Algo/Export/exportVol.h"
using namespace CGoGN ;
......@@ -127,6 +129,7 @@ protected:
void cb_mousePress(int button, int x, int y);
void cb_mouseRelease(int button, int x, int y);
void cb_Open();
void cb_Save();
// slots locaux
......
......@@ -9,5 +9,5 @@ ADD_SUBDIRECTORY(renderScalar)
ADD_SUBDIRECTORY(renderExplod)
ADD_SUBDIRECTORY(renderTopoSurface)
ADD_SUBDIRECTORY(subdivideSurface)
ADD_SUBDIRECTORY(surfaceDeformation)
#ADD_SUBDIRECTORY(surfaceDeformation)
ADD_SUBDIRECTORY(subdivideMRVolume)
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>174</width>
<width>200</width>
<height>545</height>
</rect>
</property>
......@@ -101,7 +101,7 @@
<item row="1" column="1">
<widget class="QSlider" name="slider_facesScaleFactor">
<property name="value">
<number>50</number>
<number>99</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
......@@ -118,7 +118,7 @@
<item row="2" column="1">
<widget class="QSlider" name="slider_volumesScaleFactor">
<property name="value">
<number>50</number>
<number>99</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
......
......@@ -276,7 +276,7 @@ void RenderExplodPlugin::changeRenderFaces(View* view, MapHandlerGen* map, bool
void RenderExplodPlugin::changeFacesScaleFactor(View* view, MapHandlerGen* map, int i, bool fromUI)
{
ParameterSet* params = h_viewParams[view];
params->perMap[map->getName()]->facesScaleFactor = i / 50.0;
params->perMap[map->getName()]->facesScaleFactor = i / 99.0;
if(view->isCurrentView())
{
......@@ -289,7 +289,7 @@ void RenderExplodPlugin::changeFacesScaleFactor(View* view, MapHandlerGen* map,
void RenderExplodPlugin::changeVolumesScaleFactor(View* view, MapHandlerGen* map, int i, bool fromUI)
{
ParameterSet* params = h_viewParams[view];
params->perMap[map->getName()]->volumesScaleFactor = i / 50.0;
params->perMap[map->getName()]->volumesScaleFactor = i / 99.0;
if(view->isCurrentView())
{
......
......@@ -775,7 +775,7 @@ bool exportTetmesh(typename PFP::MAP& map, const VertexAttribute<typename PFP::V
VertexAutoAttribute<unsigned int> indices(map,"indices_vert");
fout << " Vertices" << std::endl<< position.nbElements() << std::endl;
fout << "Vertices" << std::endl<< position.nbElements() << std::endl;
std::vector<unsigned int> tetra;
tetra.reserve(2048);
......@@ -784,7 +784,7 @@ bool exportTetmesh(typename PFP::MAP& map, const VertexAttribute<typename PFP::V
for (unsigned int i = position.begin(); i != position.end(); position.next(i))
{
const VEC3& P = position[i];
fout << P[0]<< " " << P[1]<< " " << P[2] << std::endl;
fout << P[0]<< " " << P[1]<< " " << P[2] << " " << "0" << std::endl;
indices[i] = count++;
}
......@@ -815,7 +815,7 @@ bool exportTetmesh(typename PFP::MAP& map, const VertexAttribute<typename PFP::V
}
unsigned int nbtetra = tetra.size()/4;
fout << " Tetrahedra" << std::endl << nbtetra << std::endl;
fout << "Tetrahedra" << std::endl << nbtetra << std::endl;
for (unsigned int i=0; i<nbtetra; ++i)
{
......@@ -858,6 +858,7 @@ bool exportMesh(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3
break;
default:
CGoGNerr << "unknown file format for " << filename << CGoGNendl;
return false;
break;
}
}
......
......@@ -349,6 +349,7 @@ public:
};
template <typename PFP, typename V_ATT, typename W_ATT>
void computeCentroidELWVolumes(typename PFP::MAP& map,
const V_ATT& position, W_ATT& vol_centroid,
......
......@@ -40,23 +40,24 @@ namespace Surface
namespace Geometry
{
template <typename PFP>
typename PFP::VEC3 triangleNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) ;
template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE triangleNormal(typename PFP::MAP& map, Dart d, const V_ATT& position) ;
template <typename PFP>
typename PFP::VEC3 newellNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position);
template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE newellNormal(typename PFP::MAP& map, Dart d, const V_ATT& position);
template <typename PFP>
typename PFP::VEC3 faceNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) ;
template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE faceNormal(typename PFP::MAP& map, Dart d, const V_ATT& position) ;
template <typename PFP>
typename PFP::VEC3 vertexNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) ;
template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE vertexNormal(typename PFP::MAP& map, Dart d, const V_ATT& position) ;
template <typename PFP>
typename PFP::VEC3 vertexBorderNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) ;
template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE vertexBorderNormal(typename PFP::MAP& map, Dart d, const V_ATT& position) ;
template <typename PFP>
void computeNormalFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, FaceAttribute<typename PFP::VEC3>& face_normal, unsigned int thread = 0) ;
template <typename PFP, typename V_ATT, typename F_ATT>
void computeNormalFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_normal, unsigned int thread = 0) ;
/**
......@@ -67,27 +68,27 @@ void computeNormalFaces(typename PFP::MAP& map, const VertexAttribute<typename P
* @param the selector
* @ param th the thread number
*/
template <typename PFP>
void computeNormalVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::VEC3>& normal, unsigned int thread = 0) ;
template <typename PFP,typename V_ATT>
void computeNormalVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT& normal, unsigned int thread = 0) ;
namespace Parallel
{
template <typename PFP>
void computeNormalVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::VEC3>& normal, unsigned int nbth = 0) ;
template <typename PFP,typename V_ATT>
void computeNormalVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT& normal, unsigned int nbth = 0) ;
template <typename PFP>
void computeNormalFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, FaceAttribute<typename PFP::VEC3>& face_normal, unsigned int nbth = 0) ;
template <typename PFP, typename V_ATT, typename F_ATT>
void computeNormalFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_normal, unsigned int nbth = 0) ;
}
template <typename PFP>
typename PFP::REAL computeAngleBetweenNormalsOnEdge(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) ;
template <typename PFP, typename V_ATT>
typename PFP::REAL computeAngleBetweenNormalsOnEdge(typename PFP::MAP& map, Dart d, const V_ATT& position) ;
template <typename PFP>
void computeAnglesBetweenNormalsOnEdges(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, EdgeAttribute<typename PFP::REAL>& angles, unsigned int thread = 0) ;
template <typename PFP, typename V_ATT, typename E_ATT>
void computeAnglesBetweenNormalsOnEdges(typename PFP::MAP& map, const V_ATT& position, E_ATT& angles, unsigned int thread = 0) ;
} // namespace Geometry
......
......@@ -44,60 +44,145 @@ namespace Surface
namespace Geometry
{
template <typename PFP>
typename PFP::VEC3 triangleNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position)
//template <typename PFP>
//typename PFP::VEC3 triangleNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position)
//{
// typename PFP::VEC3 N = Geom::triangleNormal(position[d], position[map.phi1(d)], position[map.phi_1(d)]) ;
// N.normalize() ;
// return N ;
//}
//template<typename PFP>
//typename PFP::VEC3 newellNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position)
//{
// typename PFP::VEC3 N(0);
// Traversor2FV<typename PFP::MAP> t(map, d) ;
// for(Dart it = t.begin(); it != t.end(); it = t.next())
// {
// const typename PFP::VEC3& P = position[it];
// const typename PFP::VEC3& Q = position[map.phi1(it)];
// N[0] += (P[1] - Q[1]) * (P[2] + Q[2]);
// N[1] += (P[2] - Q[2]) * (P[0] + Q[0]);
// N[2] += (P[0] - Q[0]) * (P[1] + Q[1]);
// }
// N.normalize();
// return N;
//}
//template <typename PFP>
//typename PFP::VEC3 faceNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position)
//{
// if(map.faceDegree(d) == 3)
// return triangleNormal<PFP>(map, d, position) ;
// else
// return newellNormal<PFP>(map, d, position) ;
//}
//template <typename PFP>
//typename PFP::VEC3 vertexNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position)
//{
// typedef typename PFP::VEC3 VEC3 ;
// VEC3 N(0) ;
// Traversor2VF<typename PFP::MAP> t(map, d) ;
// for(Dart it = t.begin(); it != t.end(); it = t.next())
// {
// VEC3 n = faceNormal<PFP>(map, it, position) ;
// if(!n.hasNan())
// {
// VEC3 v1 = vectorOutOfDart<PFP>(map, it, position) ;
// VEC3 v2 = vectorOutOfDart<PFP>(map, map.phi_1(it), position) ;
// n *= convexFaceArea<PFP>(map, it, position) / (v1.norm2() * v2.norm2()) ;
// N += n ;
// }
// }
// N.normalize() ;
// return N ;
//}
//template <typename PFP>
//typename PFP::VEC3 vertexBorderNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position)
//{
// assert(map.dimension() == 3);
// typedef typename PFP::VEC3 VEC3 ;
// VEC3 N(0) ;
// std::vector<Dart> faces;
// CellMarker<FACE> f(map);
// FunctorStore fs(faces);
// map.foreach_dart_of_vertex(d,fs);
// for(std::vector<Dart>::iterator it = faces.begin() ; it != faces.end() ; ++it)
// {
// if(!f.isMarked(*it) && map.isBoundaryFace(*it))
// {
// f.mark(*it);
// VEC3 n = faceNormal<PFP>(map, *it, position);
// if(!n.hasNan())
// {
// VEC3 v1 = vectorOutOfDart<PFP>(map, *it, position);
// VEC3 v2 = vectorOutOfDart<PFP>(map, map.phi_1(*it), position);
// n *= convexFaceArea<PFP>(map, *it, position) / (v1.norm2() * v2.norm2());
// N += n ;
// }
// }
// }
// N.normalize() ;
// return N ;
//}
template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE triangleNormal(typename PFP::MAP& map, Dart d, const V_ATT& position)
{
typename PFP::VEC3 N = Geom::triangleNormal(position[d], position[map.phi1(d)], position[map.phi_1(d)]) ;
typename V_ATT::DATA_TYPE N = Geom::triangleNormal(position[d], position[map.phi1(d)], position[map.phi_1(d)]) ;
N.normalize() ;
return N ;
}
template<typename PFP>
typename PFP::VEC3 newellNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position)
template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE newellNormal(typename PFP::MAP& map, Dart d, const V_ATT& position)
{
typename PFP::VEC3 N(0);
Traversor2FV<typename PFP::MAP> t(map, d) ;
for(Dart it = t.begin(); it != t.end(); it = t.next())
{
const typename PFP::VEC3& P = position[it];
const typename PFP::VEC3& Q = position[map.phi1(it)];
N[0] += (P[1] - Q[1]) * (P[2] + Q[2]);
N[1] += (P[2] - Q[2]) * (P[0] + Q[0]);
N[2] += (P[0] - Q[0]) * (P[1] + Q[1]);
}
N.normalize();
return N;
typedef typename V_ATT::DATA_TYPE VEC3;
VEC3 N(0);
Traversor2FV<typename PFP::MAP> t(map, d) ;
for(Dart it = t.begin(); it != t.end(); it = t.next())
{
const VEC3& P = position[it];
const VEC3& Q = position[map.phi1(it)];
N[0] += (P[1] - Q[1]) * (P[2] + Q[2]);
N[1] += (P[2] - Q[2]) * (P[0] + Q[0]);
N[2] += (P[0] - Q[0]) * (P[1] + Q[1]);
}
N.normalize();
return N;
}
template <typename PFP>
typename PFP::VEC3 faceNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position)
template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE faceNormal(typename PFP::MAP& map, Dart d, const V_ATT& position)
{
if(map.faceDegree(d) == 3)
return triangleNormal<PFP>(map, d, position) ;
else
return newellNormal<PFP>(map, d, position) ;
// {
// VEC3 N(0) ;
// Dart it = d ;
// do
// {
// VEC3 n = triangleNormal<PFP>(map, it, position) ;
// //if(!std::isnan(n[0]) && !std::isnan(n[1]) && !std::isnan(n[2]))
// if(!n.hasNan())
// N += n ;
// it = map.phi1(it) ;
// } while (it != d) ;
// N.normalize() ;
// return N ;
// }
}
template <typename PFP>
typename PFP::VEC3 vertexNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position)
template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE vertexNormal(typename PFP::MAP& map, Dart d, const V_ATT& position)
{
typedef typename PFP::VEC3 VEC3 ;
typedef typename V_ATT::DATA_TYPE VEC3 ;
VEC3 N(0) ;
......@@ -118,12 +203,12 @@ typename PFP::VEC3 vertexNormal(typename PFP::MAP& map, Dart d, const VertexAttr
return N ;
}
template <typename PFP>
typename PFP::VEC3 vertexBorderNormal(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position)
template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE vertexBorderNormal(typename PFP::MAP& map, Dart d, const V_ATT& position)
{
assert(map.dimension() == 3);
typedef typename PFP::VEC3 VEC3 ;
typedef typename V_ATT::DATA_TYPE VEC3 ;
VEC3 N(0) ;
std::vector<Dart> faces;
......@@ -152,16 +237,18 @@ typename PFP::VEC3 vertexBorderNormal(typename PFP::MAP& map, Dart d, const Vert
return N ;
}
template <typename PFP>
void computeNormalFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, FaceAttribute<typename PFP::VEC3>& face_normal, unsigned int thread)
template <typename PFP, typename V_ATT, typename F_ATT>
void computeNormalFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_normal, unsigned int thread)
{
TraversorF<typename PFP::MAP> trav(map, thread);
for (Dart d = trav.begin(); d != trav.end(); d = trav.next())
face_normal[d] = faceNormal<PFP>(map, d, position) ;
}
template <typename PFP>
void computeNormalVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::VEC3>& normal, unsigned int thread)
template <typename PFP, typename V_ATT>
void computeNormalVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT& normal, unsigned int thread)
{
TraversorV<typename PFP::MAP> trav(map, thread);
for (Dart d = trav.begin(); d != trav.end(); d = trav.next())
......@@ -173,13 +260,13 @@ void computeNormalVertices(typename PFP::MAP& map, const VertexAttribute<typenam
namespace Parallel
{
template <typename PFP>
template <typename PFP, typename V_ATT>
class FunctorComputeNormalVertices: public FunctorMapThreaded<typename PFP::MAP >
{
const VertexAttribute<typename PFP::VEC3>& m_position;
VertexAttribute<typename PFP::VEC3>& m_normal;
const V_ATT& m_position;
V_ATT& m_normal;
public:
FunctorComputeNormalVertices<PFP>( typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::VEC3>& normal):
FunctorComputeNormalVertices<PFP,V_ATT>( typename PFP::MAP& map, const V_ATT& position, V_ATT& normal):
FunctorMapThreaded<typename PFP::MAP>(map), m_position(position), m_normal(normal)
{ }
......@@ -189,45 +276,45 @@ public:
}
};
template <typename PFP>
void computeNormalVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::VEC3>& normal, unsigned int nbth)
template <typename PFP, typename V_ATT>
void computeNormalVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT& normal, unsigned int nbth)
{
FunctorComputeNormalVertices<PFP> funct(map,position,normal);
FunctorComputeNormalVertices<PFP,V_ATT> funct(map,position,normal);
Algo::Parallel::foreach_cell<typename PFP::MAP,VERTEX>(map, funct, nbth, false);
}
template <typename PFP>
template <typename PFP, typename V_ATT, typename F_ATT>
class FunctorComputeNormalFaces: public FunctorMapThreaded<typename PFP::MAP >
{
const VertexAttribute<typename PFP::VEC3>& m_position;
FaceAttribute<typename PFP::VEC3>& m_normal;
const V_ATT& m_position;
F_ATT& m_normal;
public:
FunctorComputeNormalFaces<PFP>( typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, FaceAttribute<typename PFP::VEC3>& normal):
FunctorComputeNormalFaces<PFP,V_ATT,F_ATT>( typename PFP::MAP& map, const V_ATT& position, F_ATT& normal):
FunctorMapThreaded<typename PFP::MAP>(map), m_position(position), m_normal(normal)
{ }
void run(Dart d, unsigned int threadID)
void run(Dart d, unsigned int /*threadID*/)
{
m_normal[d] = faceNormal<PFP>(this->m_map, d, m_position) ;
}
};
template <typename PFP>
void computeNormalFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, FaceAttribute<typename PFP::VEC3>& normal, unsigned int nbth)
template <typename PFP, typename V_ATT, typename F_ATT>
void computeNormalFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& normal, unsigned int nbth)
{
FunctorComputeNormalFaces<PFP> funct(map,position,normal);
FunctorComputeNormalFaces<PFP,V_ATT,F_ATT> funct(map,position,normal);
Algo::Parallel::foreach_cell<typename PFP::MAP,FACE>(map, funct, nbth, false);
}
template <typename PFP>
template <typename PFP, typename V_ATT, typename E_ATT>
class FunctorComputeAngleBetweenNormalsOnEdge: public FunctorMapThreaded<typename PFP::MAP >
{
const VertexAttribute<typename PFP::VEC3>& m_position;
FaceAttribute<typename PFP::VEC3>& m_angles;
const V_ATT& m_position;
E_ATT& m_angles;
public:
FunctorComputeAngleBetweenNormalsOnEdge<PFP>( typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, EdgeAttribute<typename PFP::VEC3>& angles):
FunctorComputeAngleBetweenNormalsOnEdge<PFP,V_ATT,E_ATT>( typename PFP::MAP& map, const V_ATT& position, E_ATT& angles):
FunctorMapThreaded<typename PFP::MAP>(map), m_position(position), m_angles(angles)
{ }
......@@ -238,10 +325,10 @@ public:
};
template <typename PFP>
void computeAnglesBetweenNormalsOnEdges(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, EdgeAttribute<typename PFP::REAL>& angles, unsigned int nbth)
template <typename PFP, typename V_ATT, typename E_ATT>
void computeAnglesBetweenNormalsOnEdges(typename PFP::MAP& map, const V_ATT& position, E_ATT& angles, unsigned int nbth)
{
FunctorComputeAngleBetweenNormalsOnEdge<PFP> funct(map,position,angles);
FunctorComputeAngleBetweenNormalsOnEdge<PFP,V_ATT,E_ATT> funct(map,position,angles);
Algo::Parallel::foreach_cell<typename PFP::MAP,EDGE>(map, funct, nbth, false);
}
......@@ -249,10 +336,10 @@ void computeAnglesBetweenNormalsOnEdges(typename PFP::MAP& map, const VertexAttr
template <typename PFP>
typename PFP::REAL computeAngleBetweenNormalsOnEdge(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position)
template <typename PFP, typename V_ATT>
typename PFP::REAL computeAngleBetweenNormalsOnEdge(typename PFP::MAP& map, Dart d, const V_ATT& position)
{
typedef typename PFP::VEC3 VEC3 ;
typedef typename V_ATT::DATA_TYPE VEC3 ;
if(map.isBoundaryEdge(d))
return 0 ;
......@@ -280,8 +367,8 @@ typename PFP::REAL computeAngleBetweenNormalsOnEdge(typename PFP::MAP& map, Dart
return a ;
}
template <typename PFP>
void computeAnglesBetweenNormalsOnEdges(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, EdgeAttribute<typename PFP::REAL>& angles, unsigned int thread)
template <typename PFP, typename V_ATT, typename E_ATT>
void computeAnglesBetweenNormalsOnEdges(typename PFP::MAP& map, const V_ATT& position, E_ATT& angles, unsigned int thread)
{
TraversorE<typename PFP::MAP> trav(map, thread);
for (Dart d = trav.begin(); d != trav.end(); d = trav.next())
......
......@@ -141,6 +141,10 @@ public:
* Topological operations on Hierarchical Implicit 3-maps
*************************************************************************/
// void deleteVolume(Dart d);
bool isWellEmbedded();
//@{
//!
......@@ -162,6 +166,11 @@ public:
void deleteVertexSubdividedFace(Dart d);
//@}
void setVertexVertexFunctor(FunctorType* f) { vertexVertexFunctor = f ; }
void setEdgeVertexFunctor(FunctorType* f) { edgeVertexFunctor = f ; }
void setFaceVertexFunctor(FunctorType* f) { faceVertexFunctor = f ; }
void setVolumeVertexFunctor(FunctorType* f) { volumeVertexFunctor = f ; }
void computeVertexVertexFunctor(Dart d) { (*vertexVertexFunctor)(d); }
void computeEdgeVertexFunctor(Dart d) { (*edgeVertexFunctor)(d); }
void computeFaceVertexFunctor(Dart d) { (*faceVertexFunctor)(d); }
......@@ -373,7 +382,8 @@ public:
virtual bool foreach_dart_of_face2(Dart d, FunctorType& f, unsigned int thread = 0);
//@}
template <unsigned int ORBIT>
unsigned int getEmbedding(Dart d);
} ;