Commit 8ce52f3c authored by untereiner's avatar untereiner

Merge cgogn:~thery/CGoGN

Conflicts:
	include/Algo/Geometry/centroid.h
	include/Algo/Geometry/centroid.hpp
	include/Algo/Import/importMesh.hpp
	include/Algo/Import/importNodeEle.hpp
	include/Algo/Import/importObjEle.hpp
	include/Algo/Import/importTet.hpp
	include/Algo/Import/importTs.hpp
	include/Algo/Modelisation/polyhedron.hpp
	include/Algo/Modelisation/primitives3d.hpp
	include/Algo/Modelisation/subdivision.h
	include/Algo/Modelisation/subdivision.hpp
	include/Algo/Multiresolution/Map2MR/Filters/bertram.h
	include/Algo/Multiresolution/Map2MR/Filters/lerp.h
	include/Algo/Multiresolution/Map3MR/Filters/lerp.h
	include/Algo/Multiresolution/Map3MR/map3MR_PrimalRegular.hpp
	include/Topology/generic/attributeHandler.h
	src/Topology/map/map3.cpp
	src/Utils/Shaders/shaderSimpleTexture.cpp
parents 310ff12b afad58ac
......@@ -792,7 +792,7 @@ void Clipping::importMesh(std::string& filename)
if(extension == std::string(".tet"))
{
if(!Algo::Import::importTet<PFP>(myMap,filename.c_str(),attrNames))
if(!Algo::Volume::Import::importTet<PFP>(myMap,filename.c_str(),attrNames))
{
CGoGNerr << "could not import " << filename << CGoGNendl ;
return;
......@@ -802,7 +802,7 @@ void Clipping::importMesh(std::string& filename)
}
else if(extension == std::string(".ts"))
{
if(!Algo::Import::importTs<PFP>(myMap,filename.c_str(),attrNames))
if(!Algo::Volume::Import::importTs<PFP>(myMap,filename.c_str(),attrNames))
{
CGoGNerr << "could not import " << filename << CGoGNendl ;
return;
......@@ -1124,7 +1124,7 @@ int main(int argc, char** argv)
else
{
sqt.position = sqt.myMap.addAttribute<PFP::VEC3, VERTEX>("position");
Algo::Modelisation::Primitive3D<PFP> prim(sqt.myMap, sqt.position);
Algo::Volume::Modelisation::Primitive3D<PFP> prim(sqt.myMap, sqt.position);
prim.hexaGrid_topo(10,10,10);
prim.embedHexaGrid(1.0f,1.0f,1.0f);
}
......
......@@ -213,7 +213,7 @@ void MyQT::cb_keyPress(int code)
case 't':
{
Algo::Modelisation::EarTriangulation<PFP> triangulation(myMap);
Algo::Surface::Modelisation::EarTriangulation<PFP> triangulation(myMap);
triangulation.triangule();
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES);
......
......@@ -133,7 +133,7 @@ int main(int argc, char **argv)
}
// extrusion
Algo::Modelisation::extrusion_scale<PFP>(myMap, position, objV, PFP::VEC3(0.0,0.0,0.0), PFP::VEC3(0.0,1.0,0.0),true, pathV, false, pathRadius);
Algo::Surface::Modelisation::extrusion_scale<PFP>(myMap, position, objV, PFP::VEC3(0.0,0.0,0.0), PFP::VEC3(0.0,1.0,0.0),true, pathV, false, pathRadius);
// bounding box
Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position);
......
......@@ -133,9 +133,9 @@ void MCMesh::MC()
{
myMap.clear(false);
// elargir l'image pour le calcul de la courbure
Algo::MC::Image<DATATYPE>* myImgFr = myImg->addFrame(1);
SAlgo::MC::Image<DATATYPE>* myImgFr = myImg->addFrame(1);
Algo::MC::WindowingGreater<DATATYPE> myWindFunc;
SAlgo::MC::WindowingGreater<DATATYPE> myWindFunc;
myWindFunc.setIsoValue(DATATYPE(127));
position = myMap.getAttribute<VEC3, VERTEX>("position");
......@@ -143,7 +143,7 @@ void MCMesh::MC()
position = myMap.addAttribute<VEC3, VERTEX>("position");
// instanciation du mc
Algo::MC::MarchingCube<DATATYPE, Algo::MC::WindowingGreater,PFP> mc(myImgFr, &myMap, position, myWindFunc, false);
SAlgo::MC::MarchingCube<DATATYPE, SAlgo::MC::WindowingGreater,PFP> mc(myImgFr, &myMap, position, myWindFunc, false);
mc.simpleMeshing();
delete myImgFr;
......@@ -168,7 +168,7 @@ void MCMesh::updateRender()
void MCMesh::fromFile(char* fname)
{
myImg = new Algo::MC::Image<DATATYPE>();
myImg = new SAlgo::MC::Image<DATATYPE>();
myImg->loadInrgz(fname);
CGoGNout << "Image chargee"<<CGoGNendl;
CGoGNout << myImg->getWidthX() <<"x"<< myImg->getWidthY() <<"x"<< myImg->getWidthZ() << "voxels"<<CGoGNendl;
......@@ -193,7 +193,7 @@ void MCMesh::sphere()
}
}
myImg = new Algo::MC::Image<DATATYPE>(img,128,128,128,1.0f,1.0f,1.0f,false);
myImg = new SAlgo::MC::Image<DATATYPE>(img,128,128,128,1.0f,1.0f,1.0f,false);
}
......
......@@ -46,6 +46,8 @@
using namespace CGoGN ;
namespace SAlgo = ::CGoGN::Algo::Surface;
struct PFP: public PFP_STANDARD
{
// definition of the map
......@@ -83,7 +85,7 @@ public:
Utils::ShaderSimpleColor* m_simpleColorShader ;
DATATYPE valLabel;
Algo::MC::Image<DATATYPE>* myImg;
SAlgo::MC::Image<DATATYPE>* myImg;
MCMesh() ;
......
......@@ -31,7 +31,7 @@ SimpleGMap2::SimpleGMap2()
{
position = myMap.addAttribute<VEC3, VERTEX>("position");
Dart d = Algo::Modelisation::createTetrahedron<PFP>(myMap);
Dart d = Algo::Surface::Modelisation::createTetrahedron<PFP>(myMap);
position[d] = VEC3(0,0,0);
position[myMap.phi1(d)] = VEC3(10,0,15);
position[myMap.phi_1(d)] = VEC3(10,20,15);
......@@ -41,7 +41,7 @@ SimpleGMap2::SimpleGMap2()
myMap.cutEdge(d);
position[myMap.phi1(d)] = mid;
Algo::Modelisation::Polyhedron<PFP> poly(myMap, position);
Algo::Surface::Modelisation::Polyhedron<PFP> poly(myMap, position);
d = poly.cylinder_topo(5, 1, false, false);
......
......@@ -36,7 +36,7 @@ SimpleGMap3::SimpleGMap3()
CellMarker<EDGE> mE(myMap);
Algo::Modelisation::Primitive3D<PFP> primCat(myMap,position);
Algo::Volume::Modelisation::Primitive3D<PFP> primCat(myMap,position);
Dart d = primCat.hexaGrid_topo(3,1,1);
primCat.embedHexaGrid(2,1,1);
myMap.check();
......@@ -56,14 +56,14 @@ SimpleGMap3::SimpleGMap3()
// Geom::Plane3D<PFP::REAL> pl(VEC3(0.5,0.14,0.5),VEC3(1.5,0.45,0.5),VEC3(0.5,0.15,1.5));
Geom::Plane3D<PFP::REAL> pl(VEC3(-1,-0.5,-0.5),VEC3(-1,-0.5,0.5),VEC3(1,0.5,0.5));
Algo::Modelisation::sliceConvexVolume<PFP>(myMap, position, d, pl);
Algo::Volume::Modelisation::sliceConvexVolume<PFP>(myMap, position, d, pl);
myMap.check();
for(unsigned int i = position.begin() ; i != position.end() ; position.next(i))
position[i] += VEC3(2,0,0);
Algo::Modelisation::Primitive3D<PFP> prim(myMap, position);
Algo::Volume::Modelisation::Primitive3D<PFP> prim(myMap, position);
d = prim.hexaGrid_topo(2,2,1);
prim.embedHexaGrid(1,1,1);
......@@ -88,7 +88,7 @@ SimpleGMap3::SimpleGMap3()
for(unsigned int i = position.begin() ; i != position.end() ; position.next(i))
position[i] += VEC3(0,2,0);
Algo::Modelisation::Primitive3D<PFP> prim2(myMap,position);
Algo::Volume::Modelisation::Primitive3D<PFP> prim2(myMap,position);
d = prim2.hexaGrid_topo(2,1,1);
prim2.embedHexaGrid(1,1,1);
......
......@@ -32,7 +32,7 @@ SimpleMap3::SimpleMap3()
{
position = myMap.addAttribute<VEC3, VERTEX>("position");
Algo::Modelisation::Primitive3D<PFP> primCat(myMap, position);
Algo::Volume::Modelisation::Primitive3D<PFP> primCat(myMap, position);
Dart d = primCat.hexaGrid_topo(2,1,1);
primCat.embedHexaGrid(1,1,1);
......
......@@ -232,7 +232,7 @@ int main(int argc, char**argv)
#define NB 96
Algo::Modelisation::Polyhedron<PFP> prim(m, position);
Algo::Surface::Modelisation::Polyhedron<PFP> prim(m, position);
prim.tore_topo(NB, NB);
prim.embedTore(40.0f,20.0f);
......
......@@ -188,7 +188,8 @@ void Viewer::cb_Save()
std::string filters("all (*.*);; map (*.map);; off (*.off);; ply (*.ply)") ;
std::string filename = selectFileSave("Save Mesh", "", filters) ;
exportMesh(filename) ;
if (!filename.empty())
exportMesh(filename) ;
}
void Viewer::cb_keyPress(int keycode)
......@@ -218,7 +219,7 @@ void Viewer::importMesh(std::string& filename)
else
{
std::vector<std::string> attrNames ;
if(!Algo::Import::importMesh<PFP>(myMap, filename.c_str(), attrNames))
if(!Algo::Surface::Import::importMesh<PFP>(myMap, filename.c_str(), attrNames))
{
CGoGNerr << "could not import " << filename << CGoGNendl ;
return;
......@@ -242,7 +243,7 @@ void Viewer::importMesh(std::string& filename)
if(!normal.isValid())
normal = myMap.addAttribute<VEC3, VERTEX>("normal") ;
Algo::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
Algo::Surface::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
m_positionVBO->updateData(position) ;
m_normalVBO->updateData(normal) ;
......@@ -257,7 +258,7 @@ void Viewer::exportMesh(std::string& filename, bool askExportMode)
std::string extension = filename.substr(pos) ;
if (extension == std::string(".off"))
Algo::Export::exportOFF<PFP>(myMap, position, filename.c_str(), allDarts) ;
Algo::Surface::Export::exportOFF<PFP>(myMap, position, filename.c_str(), allDarts) ;
else if (extension.compare(0, 4, std::string(".ply")) == 0)
{
int ascii = 0 ;
......@@ -266,7 +267,7 @@ void Viewer::exportMesh(std::string& filename, bool askExportMode)
std::vector<VertexAttribute<VEC3>*> attributes ;
attributes.push_back(&position) ;
Algo::Export::exportPLYnew<PFP>(myMap, attributes, filename.c_str(), !ascii, allDarts) ;
Algo::Surface::Export::exportPLYnew<PFP>(myMap, attributes, filename.c_str(), !ascii, allDarts) ;
}
else if (extension == std::string(".map"))
myMap.saveMapBin(filename) ;
......
......@@ -146,7 +146,7 @@ void MyQT::cb_Open()
if(extension == std::string(".tet"))
{
if(!Algo::Import::importTet<PFP>(myMap,filename,attrNames))
if(!Algo::Volume::Import::importTet<PFP>(myMap,filename,attrNames))
{
CGoGNerr << "could not import " << filename << CGoGNendl ;
return;
......@@ -157,7 +157,7 @@ void MyQT::cb_Open()
if(extension == std::string(".node"))
{
if(!Algo::Import::importMeshV<PFP>(myMap, filename, attrNames, Algo::Import::ImportVolumique::NODE))
if(!Algo::Volume::Import::importMeshV<PFP>(myMap, filename, attrNames, Algo::Volume::Import::NODE))
{
std::cerr << "could not import " << filename << std::endl ;
return ;
......@@ -169,7 +169,7 @@ void MyQT::cb_Open()
if(extension == std::string(".off"))
{
if(!Algo::Import::importMeshToExtrude<PFP>(myMap, filename, attrNames))
if(!Algo::Volume::Import::importMeshToExtrude<PFP>(myMap, filename, attrNames))
{
std::cerr << "could not import " << filename << std::endl ;
return ;
......@@ -388,7 +388,7 @@ int main(int argc, char **argv)
if(extension == std::string(".tet"))
{
if(!Algo::Import::importTet<PFP>(myMap,argv[1],attrNames))
if(!Algo::Volume::Import::importTet<PFP>(myMap,argv[1],attrNames))
{
CGoGNerr << "could not import " << argv[1] << CGoGNendl ;
return 1;
......@@ -399,7 +399,7 @@ int main(int argc, char **argv)
if(extension == std::string(".node"))
{
if(!Algo::Import::importMeshV<PFP>(myMap, argv[1], attrNames, Algo::Import::ImportVolumique::NODE))
if(!Algo::Volume::Import::importMeshV<PFP>(myMap, argv[1], attrNames, Algo::Volume::Import::NODE))
{
std::cerr << "could not import " << argv[1] << std::endl ;
return 1;
......@@ -411,7 +411,7 @@ int main(int argc, char **argv)
if(extension == std::string(".off"))
{
if(!Algo::Import::importMeshToExtrude<PFP>(myMap, argv[1], attrNames))
if(!Algo::Volume::Import::importMeshToExtrude<PFP>(myMap, argv[1], attrNames))
{
std::cerr << "could not import " << std::endl ;
return 1;
......@@ -443,7 +443,7 @@ int main(int argc, char **argv)
else
{
position = myMap.addAttribute<PFP::VEC3, VERTEX>("position");
Algo::Modelisation::Primitive3D<PFP> prim(myMap, position);
Algo::Volume::Modelisation::Primitive3D<PFP> prim(myMap, position);
int nb = 8;
prim.hexaGrid_topo(nb,nb,nb);
prim.embedHexaGrid(1.0f,1.0f,1.0f);
......
......@@ -603,7 +603,7 @@ int main(int argc, char **argv)
{
position = myMap.addAttribute<VEC3, VERTEX>( "position");
Algo::Modelisation::Primitive3D<PFP> prim(myMap, position);
Algo::Volume::Modelisation::Primitive3D<PFP> prim(myMap, position);
dglobal = prim.hexaGrid_topo(4,4,4);
prim.embedHexaGrid(1.0f,1.0f,1.0f);
......
......@@ -110,7 +110,7 @@ void MyQT::createMap()
for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d))
{
CGoGNout << "Dart "<< d;
if (myMap.isBoundaryMarked(d))
if (myMap.isBoundaryMarked<PFP::MAP::DIMENSION>(d))
CGoGNout << " is a boundary dart (implicitly added)"<< CGoGNendl;
else
{
......
......@@ -154,7 +154,7 @@ void MyQT::createMap()
position = myMap.addAttribute<PFP::VEC3, VERTEX>("position");
Algo::Modelisation::Polyhedron<PFP> prim1(myMap, position);
Algo::Surface::Modelisation::Polyhedron<PFP> prim1(myMap, position);
prim1.cylinder_topo(256, 256, true, true); // topo of sphere is a closed cylinder
prim1.embedSphere(2.0f);
......@@ -167,7 +167,7 @@ void MyQT::createMap()
// d2 = PHI<211>(d2);
// position[d2] = PFP::VEC3(0, 1, 2);
Algo::Modelisation::Polyhedron<PFP> prim2(myMap, position);
Algo::Surface::Modelisation::Polyhedron<PFP> prim2(myMap, position);
prim2.cylinder_topo(256, 256, true, true); // topo of sphere is a closed cylinder
prim2.embedSphere(2.0f);
......
......@@ -119,7 +119,7 @@ void MyQT::traverseMap()
void MyQT::createMap()
{
Dart d1 = Algo::Modelisation::createHexahedron<PFP>(myMap);
Dart d1 = Algo::Surface::Modelisation::createHexahedron<PFP>(myMap);
Dart d2 = d1;
......
......@@ -259,7 +259,7 @@ void MyQT::cb_keyPress(int code)
if(code == 'c')
{
//SelectorDartNoBoundary<PFP::MAP> nb(myMap);
Algo::Modelisation::catmullClarkVol<PFP>(myMap, position);
Algo::Volume::Modelisation::catmullClarkVol<PFP>(myMap, position);
m_positionVBO->updateData(position);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES);
......@@ -277,7 +277,7 @@ int main(int argc, char **argv)
CGoGNout << 5.34 << " toto "<< Geom::Vec3f(2.5f, 2.2f, 4.3f) << CGoGNendl;
CGoGNout << 3 << " tutu "<< 4 << CGoGNendl;
Algo::Modelisation::Primitive3D<PFP> prim(myMap, position);
Algo::Volume::Modelisation::Primitive3D<PFP> prim(myMap, position);
int nb=3;
if (argc>1)
nb = atoi(argv[1]);
......
......@@ -68,7 +68,7 @@ void MyQT::createMap(const std::string& filename)
std::string extension = filename.substr(pos);
std::vector<std::string> attrNames ;
if(!Algo::Import::importMesh<PFP>(myMap, filename.c_str(), attrNames))
if(!Algo::Surface::Import::importMesh<PFP>(myMap, filename.c_str(), attrNames))
{
CGoGNerr << "could not import " << filename << CGoGNendl ;
return;
......@@ -82,7 +82,7 @@ void MyQT::createMap(const std::string& filename)
VertexAttribute<VEC3> colorF = myMap.addAttribute<PFP::VEC3, VERTEX>("colorF");
// compute the area attribute
Algo::Geometry::computeOneRingAreaVertices<PFP>(myMap,position,area);
Algo::Surface::Geometry::computeOneRingAreaVertices<PFP>(myMap,position,area);
// just some tricks to obtain relatives value
float amax=0;
......
......@@ -87,7 +87,7 @@ void MyQT::cb_initGL()
m_lines->setScale(2.0f);
m_lines->setColor(Geom::Vec4f(0.0f, 1.0f, 0.2f, 0.0f));
Algo::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
Algo::Surface::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::POINTS);
......@@ -298,7 +298,7 @@ int main(int argc, char **argv)
if (argc==2)
nbt = atoi(argv[1]);
// create a sphere
Algo::Modelisation::Polyhedron<PFP> prim(myMap, position);
Algo::Surface::Modelisation::Polyhedron<PFP> prim(myMap, position);
prim.cylinder_topo(nbt,nbt, true, true);
prim.embedSphere(20.0f);
......
......@@ -73,8 +73,8 @@ void MyQT::operation(int x)
{
dm.markAll();
myMap.splitVertex(m_selected,m_selected2);
PFP::VEC3 c1 = Algo::Geometry::faceCentroid<PFP>(myMap, m_selected, position);
PFP::VEC3 c2 = Algo::Geometry::faceCentroid<PFP>(myMap, m_selected2, position);
PFP::VEC3 c1 = Algo::Surface::Geometry::faceCentroid<PFP>(myMap, m_selected, position);
PFP::VEC3 c2 = Algo::Surface::Geometry::faceCentroid<PFP>(myMap, m_selected2, position);
position[m_selected] = position[m_selected] * 0.7f + c1*0.3f;
position[m_selected2] = position[m_selected2] * 0.7f + c2*0.3f;
updateMap();
......@@ -175,7 +175,7 @@ void MyQT::createMap(int n)
position = myMap.addAttribute<VEC3, VERTEX>("position");
colorDarts = myMap.addAttribute<VEC3, DART>("color");
Algo::Modelisation::Polyhedron<PFP> grid(myMap,position);
Algo::Surface::Modelisation::Polyhedron<PFP> grid(myMap,position);
grid.grid_topo(n,n);
grid.embedGrid(1.,1.,0.);
......@@ -197,7 +197,7 @@ void MyQT::createMap(int n)
for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
{
if (dm.isMarked(d) && (!myMap.isBoundaryMarked(d)))
if (dm.isMarked(d) && (!myMap.isBoundaryMarked2(d)))
{
int n = rand();
float r = float(n&0x7f)/255.0f + 0.25f;
......@@ -214,7 +214,7 @@ void MyQT::updateMap()
m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f,nb);
for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
{
if (dm.isMarked(d) && (!myMap.isBoundaryMarked(d)))
if (dm.isMarked(d) && (!myMap.isBoundaryMarked2(d)))
{
const Geom::Vec3f& C = colorDarts[d];
if (C*C != 0.0f)
......@@ -273,7 +273,7 @@ void MyQT::cb_keyPress(int keycode)
case 'c':
for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d))
{
if (!myMap.isBoundaryMarked(d))
if (!myMap.isBoundaryMarked2(d))
{
int n = rand();
float r = float(n&0x7f)/255.0f + 0.25f;
......@@ -287,7 +287,7 @@ void MyQT::cb_keyPress(int keycode)
case 'g':
for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d))
{
if (!myMap.isBoundaryMarked(d))
if (!myMap.isBoundaryMarked2(d))
{
colorDarts[d] = Geom::Vec3f(0.5f,0.5f,0.5f);
m_render_topo->setDartColor(d,0.5f,0.5f,0.5f);
......@@ -298,7 +298,7 @@ void MyQT::cb_keyPress(int keycode)
case 'b':
for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d))
{
if (!myMap.isBoundaryMarked(d))
if (!myMap.isBoundaryMarked2(d))
{
colorDarts[d] = Geom::Vec3f(0.0f,0.0f,0.0f);
m_render_topo->setDartColor(d,0.0f,0.0f,0.0f);
......@@ -356,7 +356,7 @@ void MyQT::cb_Open()
void MyQT::cb_Save()
{
std::string filename = selectFileSave("Export SVG file ",".","(*.off)");
Algo::Export::exportOFF<PFP>(myMap,position,filename.c_str());
Algo::Surface::Export::exportOFF<PFP>(myMap,position,filename.c_str());
}
void MyQT::importMesh(std::string& filename)
......@@ -374,7 +374,7 @@ void MyQT::importMesh(std::string& filename)
else
{
std::vector<std::string> attrNames ;
if(!Algo::Import::importMesh<PFP>(myMap, filename.c_str(), attrNames))
if(!Algo::Surface::Import::importMesh<PFP>(myMap, filename.c_str(), attrNames))
{
CGoGNerr << "could not import " << filename << CGoGNendl ;
return;
......@@ -388,7 +388,7 @@ void MyQT::importMesh(std::string& filename)
colorDarts = myMap.addAttribute<VEC3, DART>("color");
for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
{
if (dm.isMarked(d) && (!myMap.isBoundaryMarked(d)))
if (dm.isMarked(d) && (!myMap.isBoundaryMarked2(d)))
{
int n = rand();
float r = float(n&0x7f)/255.0f + 0.25f;
......
......@@ -196,7 +196,7 @@ void MyQT::operation(int x)
CGoGNout <<"collapse face"<<CGoGNendl;
if (m_selected != NIL)
{
PFP::VEC3 Q = Algo::Geometry::faceCentroid<PFP>(myMap,m_selected,position);
PFP::VEC3 Q = Algo::Surface::Geometry::faceCentroid<PFP>(myMap,m_selected,position);
Dart x = myMap.collapseFace(m_selected);
dm.markAll();
position[x]= Q;
......@@ -208,7 +208,7 @@ void MyQT::operation(int x)
CGoGNout <<"collapse volume"<<CGoGNendl;
if (m_selected != NIL)
{
PFP::VEC3 Q = Algo::Geometry::volumeCentroid<PFP>(myMap,m_selected,position);
PFP::VEC3 Q = Algo::Surface::Geometry::volumeCentroid<PFP>(myMap,m_selected,position);
Dart x = myMap.collapseVolume(m_selected);
dm.markAll();
position[x]= Q;
......@@ -248,7 +248,7 @@ void MyQT::createMap(int n)
position = myMap.getAttribute<VEC3, VERTEX>("position");
if (!position.isValid())
position = myMap.addAttribute<VEC3, VERTEX>("position");
Algo::Modelisation::Primitive3D<PFP> prim(myMap, position);
Algo::Volume::Modelisation::Primitive3D<PFP> prim(myMap, position);
prim.hexaGrid_topo(n,n,n);
prim.embedHexaGrid(1.0f,1.0f,1.0f);
......@@ -520,7 +520,7 @@ void MyQT::cb_keyPress(int keycode)
// case 'c':
// for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
// {
// if (!myMap.isBoundaryMarked(d))
// if (!myMap.isBoundaryMarked3(d))
// {
// int n = random();
// float r = float(n&0x7f)/255.0f + 0.25f;
......@@ -534,7 +534,7 @@ void MyQT::cb_keyPress(int keycode)
// case 'g':
// for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
// {
// if (!myMap.isBoundaryMarked(d))
// if (!myMap.isBoundaryMarked3(d))
// {
// colorDarts[d] = Geom::Vec3f(0.5f,0.5f,0.5f);
// m_render_topo->setDartColor(d,0.5f,0.5f,0.5f);
......@@ -545,7 +545,7 @@ void MyQT::cb_keyPress(int keycode)
// case 'b':
// for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
// {
// if (!myMap.isBoundaryMarked(d))
// if (!myMap.isBoundaryMarked3(d))
// {
// colorDarts[d] = Geom::Vec3f(0.0f,0.0f,0.0f);
// m_render_topo->setDartColor(d,0.0f,0.0f,0.0f);
......@@ -603,7 +603,7 @@ void MyQT::cb_Open()
void MyQT::cb_Save()
{
std::string filename = selectFileSave("Export SVG file ",".","(*.off)");
Algo::Export::exportOFF<PFP>(myMap, position, filename.c_str());
Algo::Surface::Export::exportOFF<PFP>(myMap, position, filename.c_str()); // ???
}
void MyQT::importMesh(std::string& filename)
......@@ -621,7 +621,7 @@ void MyQT::importMesh(std::string& filename)
else if (extension == std::string(".node"))
{
std::vector<std::string> attrNames ;
if(!Algo::Import::importMeshV<PFP>(myMap, filename, attrNames, Algo::Import::ImportVolumique::NODE))
if(!Algo::Volume::Import::importMeshV<PFP>(myMap, filename, attrNames, Algo::Volume::Import::NODE))
{
std::cerr << "could not import " << filename << std::endl ;
return ;
......@@ -631,7 +631,7 @@ void MyQT::importMesh(std::string& filename)
else if(extension == std::string(".tet"))
{
std::vector<std::string> attrNames ;
if(!Algo::Import::importMeshV<PFP>(myMap, filename, attrNames, Algo::Import::ImportVolumique::TET))
if(!Algo::Volume::Import::importMeshV<PFP>(myMap, filename, attrNames, Algo::Volume::Import::TET))
{
std::cerr << "could not import " << filename << std::endl ;
return ;
......@@ -641,7 +641,7 @@ void MyQT::importMesh(std::string& filename)
else if(extension == std::string(".off"))
{
std::vector<std::string> attrNames ;
if(!Algo::Import::importMeshV<PFP>(myMap, filename, attrNames, Algo::Import::ImportVolumique::OFF))
if(!Algo::Volume::Import::importMeshV<PFP>(myMap, filename, attrNames, Algo::Volume::Import::OFF))
{
std::cerr << "could not import " << filename << std::endl ;
return ;
......
......@@ -202,7 +202,7 @@ void MyQT::initMap()
std::cout << "INIT MAP"<< std