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) ...@@ -792,7 +792,7 @@ void Clipping::importMesh(std::string& filename)
if(extension == std::string(".tet")) 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 ; CGoGNerr << "could not import " << filename << CGoGNendl ;
return; return;
...@@ -802,7 +802,7 @@ void Clipping::importMesh(std::string& filename) ...@@ -802,7 +802,7 @@ void Clipping::importMesh(std::string& filename)
} }
else if(extension == std::string(".ts")) 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 ; CGoGNerr << "could not import " << filename << CGoGNendl ;
return; return;
...@@ -1124,7 +1124,7 @@ int main(int argc, char** argv) ...@@ -1124,7 +1124,7 @@ int main(int argc, char** argv)
else else
{ {
sqt.position = sqt.myMap.addAttribute<PFP::VEC3, VERTEX>("position"); 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.hexaGrid_topo(10,10,10);
prim.embedHexaGrid(1.0f,1.0f,1.0f); prim.embedHexaGrid(1.0f,1.0f,1.0f);
} }
......
...@@ -213,7 +213,7 @@ void MyQT::cb_keyPress(int code) ...@@ -213,7 +213,7 @@ void MyQT::cb_keyPress(int code)
case 't': case 't':
{ {
Algo::Modelisation::EarTriangulation<PFP> triangulation(myMap); Algo::Surface::Modelisation::EarTriangulation<PFP> triangulation(myMap);
triangulation.triangule(); triangulation.triangule();
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES); m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES);
......
...@@ -133,7 +133,7 @@ int main(int argc, char **argv) ...@@ -133,7 +133,7 @@ int main(int argc, char **argv)
} }
// extrusion // 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 // bounding box
Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position); Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position);
......
...@@ -133,9 +133,9 @@ void MCMesh::MC() ...@@ -133,9 +133,9 @@ void MCMesh::MC()
{ {
myMap.clear(false); myMap.clear(false);
// elargir l'image pour le calcul de la courbure // 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)); myWindFunc.setIsoValue(DATATYPE(127));
position = myMap.getAttribute<VEC3, VERTEX>("position"); position = myMap.getAttribute<VEC3, VERTEX>("position");
...@@ -143,7 +143,7 @@ void MCMesh::MC() ...@@ -143,7 +143,7 @@ void MCMesh::MC()
position = myMap.addAttribute<VEC3, VERTEX>("position"); position = myMap.addAttribute<VEC3, VERTEX>("position");
// instanciation du mc // 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(); mc.simpleMeshing();
delete myImgFr; delete myImgFr;
...@@ -168,7 +168,7 @@ void MCMesh::updateRender() ...@@ -168,7 +168,7 @@ void MCMesh::updateRender()
void MCMesh::fromFile(char* fname) void MCMesh::fromFile(char* fname)
{ {
myImg = new Algo::MC::Image<DATATYPE>(); myImg = new SAlgo::MC::Image<DATATYPE>();
myImg->loadInrgz(fname); myImg->loadInrgz(fname);
CGoGNout << "Image chargee"<<CGoGNendl; CGoGNout << "Image chargee"<<CGoGNendl;
CGoGNout << myImg->getWidthX() <<"x"<< myImg->getWidthY() <<"x"<< myImg->getWidthZ() << "voxels"<<CGoGNendl; CGoGNout << myImg->getWidthX() <<"x"<< myImg->getWidthY() <<"x"<< myImg->getWidthZ() << "voxels"<<CGoGNendl;
...@@ -193,7 +193,7 @@ void MCMesh::sphere() ...@@ -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 @@ ...@@ -46,6 +46,8 @@
using namespace CGoGN ; using namespace CGoGN ;
namespace SAlgo = ::CGoGN::Algo::Surface;
struct PFP: public PFP_STANDARD struct PFP: public PFP_STANDARD
{ {
// definition of the map // definition of the map
...@@ -83,7 +85,7 @@ public: ...@@ -83,7 +85,7 @@ public:
Utils::ShaderSimpleColor* m_simpleColorShader ; Utils::ShaderSimpleColor* m_simpleColorShader ;
DATATYPE valLabel; DATATYPE valLabel;
Algo::MC::Image<DATATYPE>* myImg; SAlgo::MC::Image<DATATYPE>* myImg;
MCMesh() ; MCMesh() ;
......
...@@ -31,7 +31,7 @@ SimpleGMap2::SimpleGMap2() ...@@ -31,7 +31,7 @@ SimpleGMap2::SimpleGMap2()
{ {
position = myMap.addAttribute<VEC3, VERTEX>("position"); 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[d] = VEC3(0,0,0);
position[myMap.phi1(d)] = VEC3(10,0,15); position[myMap.phi1(d)] = VEC3(10,0,15);
position[myMap.phi_1(d)] = VEC3(10,20,15); position[myMap.phi_1(d)] = VEC3(10,20,15);
...@@ -41,7 +41,7 @@ SimpleGMap2::SimpleGMap2() ...@@ -41,7 +41,7 @@ SimpleGMap2::SimpleGMap2()
myMap.cutEdge(d); myMap.cutEdge(d);
position[myMap.phi1(d)] = mid; 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); d = poly.cylinder_topo(5, 1, false, false);
......
...@@ -36,7 +36,7 @@ SimpleGMap3::SimpleGMap3() ...@@ -36,7 +36,7 @@ SimpleGMap3::SimpleGMap3()
CellMarker<EDGE> mE(myMap); 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); Dart d = primCat.hexaGrid_topo(3,1,1);
primCat.embedHexaGrid(2,1,1); primCat.embedHexaGrid(2,1,1);
myMap.check(); myMap.check();
...@@ -56,14 +56,14 @@ SimpleGMap3::SimpleGMap3() ...@@ -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(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)); 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(); myMap.check();
for(unsigned int i = position.begin() ; i != position.end() ; position.next(i)) for(unsigned int i = position.begin() ; i != position.end() ; position.next(i))
position[i] += VEC3(2,0,0); 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); d = prim.hexaGrid_topo(2,2,1);
prim.embedHexaGrid(1,1,1); prim.embedHexaGrid(1,1,1);
...@@ -88,7 +88,7 @@ SimpleGMap3::SimpleGMap3() ...@@ -88,7 +88,7 @@ SimpleGMap3::SimpleGMap3()
for(unsigned int i = position.begin() ; i != position.end() ; position.next(i)) for(unsigned int i = position.begin() ; i != position.end() ; position.next(i))
position[i] += VEC3(0,2,0); 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); d = prim2.hexaGrid_topo(2,1,1);
prim2.embedHexaGrid(1,1,1); prim2.embedHexaGrid(1,1,1);
......
...@@ -32,7 +32,7 @@ SimpleMap3::SimpleMap3() ...@@ -32,7 +32,7 @@ SimpleMap3::SimpleMap3()
{ {
position = myMap.addAttribute<VEC3, VERTEX>("position"); 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); Dart d = primCat.hexaGrid_topo(2,1,1);
primCat.embedHexaGrid(1,1,1); primCat.embedHexaGrid(1,1,1);
......
...@@ -232,7 +232,7 @@ int main(int argc, char**argv) ...@@ -232,7 +232,7 @@ int main(int argc, char**argv)
#define NB 96 #define NB 96
Algo::Modelisation::Polyhedron<PFP> prim(m, position); Algo::Surface::Modelisation::Polyhedron<PFP> prim(m, position);
prim.tore_topo(NB, NB); prim.tore_topo(NB, NB);
prim.embedTore(40.0f,20.0f); prim.embedTore(40.0f,20.0f);
......
...@@ -188,7 +188,8 @@ void Viewer::cb_Save() ...@@ -188,7 +188,8 @@ void Viewer::cb_Save()
std::string filters("all (*.*);; map (*.map);; off (*.off);; ply (*.ply)") ; std::string filters("all (*.*);; map (*.map);; off (*.off);; ply (*.ply)") ;
std::string filename = selectFileSave("Save Mesh", "", filters) ; std::string filename = selectFileSave("Save Mesh", "", filters) ;
exportMesh(filename) ; if (!filename.empty())
exportMesh(filename) ;
} }
void Viewer::cb_keyPress(int keycode) void Viewer::cb_keyPress(int keycode)
...@@ -218,7 +219,7 @@ void Viewer::importMesh(std::string& filename) ...@@ -218,7 +219,7 @@ void Viewer::importMesh(std::string& filename)
else else
{ {
std::vector<std::string> attrNames ; 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 ; CGoGNerr << "could not import " << filename << CGoGNendl ;
return; return;
...@@ -242,7 +243,7 @@ void Viewer::importMesh(std::string& filename) ...@@ -242,7 +243,7 @@ void Viewer::importMesh(std::string& filename)
if(!normal.isValid()) if(!normal.isValid())
normal = myMap.addAttribute<VEC3, VERTEX>("normal") ; 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_positionVBO->updateData(position) ;
m_normalVBO->updateData(normal) ; m_normalVBO->updateData(normal) ;
...@@ -257,7 +258,7 @@ void Viewer::exportMesh(std::string& filename, bool askExportMode) ...@@ -257,7 +258,7 @@ void Viewer::exportMesh(std::string& filename, bool askExportMode)
std::string extension = filename.substr(pos) ; std::string extension = filename.substr(pos) ;
if (extension == std::string(".off")) 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) else if (extension.compare(0, 4, std::string(".ply")) == 0)
{ {
int ascii = 0 ; int ascii = 0 ;
...@@ -266,7 +267,7 @@ void Viewer::exportMesh(std::string& filename, bool askExportMode) ...@@ -266,7 +267,7 @@ void Viewer::exportMesh(std::string& filename, bool askExportMode)
std::vector<VertexAttribute<VEC3>*> attributes ; std::vector<VertexAttribute<VEC3>*> attributes ;
attributes.push_back(&position) ; 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")) else if (extension == std::string(".map"))
myMap.saveMapBin(filename) ; myMap.saveMapBin(filename) ;
......
...@@ -146,7 +146,7 @@ void MyQT::cb_Open() ...@@ -146,7 +146,7 @@ void MyQT::cb_Open()
if(extension == std::string(".tet")) 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 ; CGoGNerr << "could not import " << filename << CGoGNendl ;
return; return;
...@@ -157,7 +157,7 @@ void MyQT::cb_Open() ...@@ -157,7 +157,7 @@ void MyQT::cb_Open()
if(extension == std::string(".node")) 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 ; std::cerr << "could not import " << filename << std::endl ;
return ; return ;
...@@ -169,7 +169,7 @@ void MyQT::cb_Open() ...@@ -169,7 +169,7 @@ void MyQT::cb_Open()
if(extension == std::string(".off")) 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 ; std::cerr << "could not import " << filename << std::endl ;
return ; return ;
...@@ -388,7 +388,7 @@ int main(int argc, char **argv) ...@@ -388,7 +388,7 @@ int main(int argc, char **argv)
if(extension == std::string(".tet")) 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 ; CGoGNerr << "could not import " << argv[1] << CGoGNendl ;
return 1; return 1;
...@@ -399,7 +399,7 @@ int main(int argc, char **argv) ...@@ -399,7 +399,7 @@ int main(int argc, char **argv)
if(extension == std::string(".node")) 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 ; std::cerr << "could not import " << argv[1] << std::endl ;
return 1; return 1;
...@@ -411,7 +411,7 @@ int main(int argc, char **argv) ...@@ -411,7 +411,7 @@ int main(int argc, char **argv)
if(extension == std::string(".off")) 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 ; std::cerr << "could not import " << std::endl ;
return 1; return 1;
...@@ -443,7 +443,7 @@ int main(int argc, char **argv) ...@@ -443,7 +443,7 @@ int main(int argc, char **argv)
else else
{ {
position = myMap.addAttribute<PFP::VEC3, VERTEX>("position"); 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; int nb = 8;
prim.hexaGrid_topo(nb,nb,nb); prim.hexaGrid_topo(nb,nb,nb);
prim.embedHexaGrid(1.0f,1.0f,1.0f); prim.embedHexaGrid(1.0f,1.0f,1.0f);
......
...@@ -603,7 +603,7 @@ int main(int argc, char **argv) ...@@ -603,7 +603,7 @@ int main(int argc, char **argv)
{ {
position = myMap.addAttribute<VEC3, VERTEX>( "position"); 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); dglobal = prim.hexaGrid_topo(4,4,4);
prim.embedHexaGrid(1.0f,1.0f,1.0f); prim.embedHexaGrid(1.0f,1.0f,1.0f);
......
...@@ -110,7 +110,7 @@ void MyQT::createMap() ...@@ -110,7 +110,7 @@ void MyQT::createMap()
for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d)) for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d))
{ {
CGoGNout << "Dart "<< d; CGoGNout << "Dart "<< d;
if (myMap.isBoundaryMarked(d)) if (myMap.isBoundaryMarked<PFP::MAP::DIMENSION>(d))
CGoGNout << " is a boundary dart (implicitly added)"<< CGoGNendl; CGoGNout << " is a boundary dart (implicitly added)"<< CGoGNendl;
else else
{ {
......
...@@ -154,7 +154,7 @@ void MyQT::createMap() ...@@ -154,7 +154,7 @@ void MyQT::createMap()
position = myMap.addAttribute<PFP::VEC3, VERTEX>("position"); 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.cylinder_topo(256, 256, true, true); // topo of sphere is a closed cylinder
prim1.embedSphere(2.0f); prim1.embedSphere(2.0f);
...@@ -167,7 +167,7 @@ void MyQT::createMap() ...@@ -167,7 +167,7 @@ void MyQT::createMap()
// d2 = PHI<211>(d2); // d2 = PHI<211>(d2);
// position[d2] = PFP::VEC3(0, 1, 2); // 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.cylinder_topo(256, 256, true, true); // topo of sphere is a closed cylinder
prim2.embedSphere(2.0f); prim2.embedSphere(2.0f);
......
...@@ -119,7 +119,7 @@ void MyQT::traverseMap() ...@@ -119,7 +119,7 @@ void MyQT::traverseMap()
void MyQT::createMap() void MyQT::createMap()
{ {
Dart d1 = Algo::Modelisation::createHexahedron<PFP>(myMap); Dart d1 = Algo::Surface::Modelisation::createHexahedron<PFP>(myMap);
Dart d2 = d1; Dart d2 = d1;
......
...@@ -259,7 +259,7 @@ void MyQT::cb_keyPress(int code) ...@@ -259,7 +259,7 @@ void MyQT::cb_keyPress(int code)
if(code == 'c') if(code == 'c')
{ {
//SelectorDartNoBoundary<PFP::MAP> nb(myMap); //SelectorDartNoBoundary<PFP::MAP> nb(myMap);
Algo::Modelisation::catmullClarkVol<PFP>(myMap, position); Algo::Volume::Modelisation::catmullClarkVol<PFP>(myMap, position);
m_positionVBO->updateData(position); m_positionVBO->updateData(position);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES); m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES);
...@@ -277,7 +277,7 @@ int main(int argc, char **argv) ...@@ -277,7 +277,7 @@ int main(int argc, char **argv)
CGoGNout << 5.34 << " toto "<< Geom::Vec3f(2.5f, 2.2f, 4.3f) << CGoGNendl; CGoGNout << 5.34 << " toto "<< Geom::Vec3f(2.5f, 2.2f, 4.3f) << CGoGNendl;
CGoGNout << 3 << " tutu "<< 4 << CGoGNendl; CGoGNout << 3 << " tutu "<< 4 << CGoGNendl;
Algo::Modelisation::Primitive3D<PFP> prim(myMap, position); Algo::Volume::Modelisation::Primitive3D<PFP> prim(myMap, position);
int nb=3; int nb=3;
if (argc>1) if (argc>1)
nb = atoi(argv[1]); nb = atoi(argv[1]);
......
...@@ -68,7 +68,7 @@ void MyQT::createMap(const std::string& filename) ...@@ -68,7 +68,7 @@ void MyQT::createMap(const std::string& filename)
std::string extension = filename.substr(pos); std::string extension = filename.substr(pos);
std::vector<std::string> attrNames ; 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 ; CGoGNerr << "could not import " << filename << CGoGNendl ;
return; return;
...@@ -82,7 +82,7 @@ void MyQT::createMap(const std::string& filename) ...@@ -82,7 +82,7 @@ void MyQT::createMap(const std::string& filename)
VertexAttribute<VEC3> colorF = myMap.addAttribute<PFP::VEC3, VERTEX>("colorF"); VertexAttribute<VEC3> colorF = myMap.addAttribute<PFP::VEC3, VERTEX>("colorF");
// compute the area attribute // 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 // just some tricks to obtain relatives value
float amax=0; float amax=0;
......
...@@ -87,7 +87,7 @@ void MyQT::cb_initGL() ...@@ -87,7 +87,7 @@ void MyQT::cb_initGL()
m_lines->setScale(2.0f); m_lines->setScale(2.0f);
m_lines->setColor(Geom::Vec4f(0.0f, 1.0f, 0.2f, 0.0f)); m_lines->setColor(Geom::Vec4f(0.0f, 1.0f, 0.2f, 0.0f));