Commit 492e71b3 authored by untereiner's avatar untereiner

Adding volume Regular tilings

Cubic tiling ok
parent 0bd11b96
...@@ -1115,9 +1115,9 @@ int main(int argc, char** argv) ...@@ -1115,9 +1115,9 @@ 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::Volume::Modelisation::Primitive3D<PFP> prim(sqt.myMap, sqt.position);
prim.hexaGrid_topo(10,10,10); Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(sqt.myMap, 10,10,10);
prim.embedHexaGrid(1.0f,1.0f,1.0f); cubic.embedIntoGrid(sqt.position, 1.0f, 1.0f, 1.0f);
} }
sqt.initGUI(); sqt.initGUI();
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
#include "Utils/cgognStream.h" #include "Utils/cgognStream.h"
#include "Utils/drawer.h" #include "Utils/drawer.h"
#include "Algo/Modelisation/primitives3d.h" #include "Algo/Tiling/Volume/cubic.h"
#include <string> #include <string>
#include <sstream> #include <sstream>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "simpleGMap3.h" #include "simpleGMap3.h"
#include "Utils/GLSLShader.h" #include "Utils/GLSLShader.h"
#include "Algo/Geometry/boundingbox.h" #include "Algo/Geometry/boundingbox.h"
#include "Algo/Modelisation/primitives3d.h" #include "Algo/Tiling/Volume/cubic.h"
#include "Algo/Modelisation/subdivision3.h" #include "Algo/Modelisation/subdivision3.h"
SimpleGMap3::SimpleGMap3() SimpleGMap3::SimpleGMap3()
...@@ -35,22 +35,21 @@ SimpleGMap3::SimpleGMap3() ...@@ -35,22 +35,21 @@ SimpleGMap3::SimpleGMap3()
// CellMarker<EDGE> mE(myMap); // CellMarker<EDGE> mE(myMap);
Algo::Volume::Modelisation::Primitive3D<PFP> primCat(myMap,position); Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, 1, 1, 1);
Dart d = primCat.hexaGrid_topo(1,1,1); cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f);
primCat.embedHexaGrid(1,1,1);
myMap.check(); myMap.check();
Dart dp = Algo::Surface::Modelisation::createQuadrangularPyramid<PFP>(myMap); // Dart dp = Algo::Surface::Modelisation::createQuadrangularPyramid<PFP>(myMap);
position[dp] = typename PFP::VEC3(0.5,0.5,-0.5); // position[dp] = typename PFP::VEC3(0.5,0.5,-0.5);
position[myMap.phi1(dp)] = typename PFP::VEC3(0.5,0.5,0.5); // position[myMap.phi1(dp)] = typename PFP::VEC3(0.5,0.5,0.5);
position[myMap.phi1(myMap.phi1(dp))] = typename PFP::VEC3(0.5,-0.5,0.5); // position[myMap.phi1(myMap.phi1(dp))] = typename PFP::VEC3(0.5,-0.5,0.5);
position[myMap.phi_1(dp)] = typename PFP::VEC3(0.5,-0.5,-0.5); // position[myMap.phi_1(dp)] = typename PFP::VEC3(0.5,-0.5,-0.5);
position[myMap.phi_1(myMap.phi2(dp))] = typename PFP::VEC3(1.5f, 0.0f, 0.0f); // position[myMap.phi_1(myMap.phi2(dp))] = typename PFP::VEC3(1.5f, 0.0f, 0.0f);
Dart dtemp = myMap.beta1(myMap.beta0(myMap.beta1(myMap.beta2(myMap.beta1(myMap.beta0(myMap.beta1(myMap.beta2(d)))))))); // Dart dtemp = myMap.beta1(myMap.beta0(myMap.beta1(myMap.beta2(myMap.beta1(myMap.beta0(myMap.beta1(myMap.beta2(d))))))));
myMap.sewVolumes(dtemp,dp); // myMap.sewVolumes(dtemp,dp);
// 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::Volume::Modelisation::sliceConvexVolume<PFP>(myMap, position, d, pl); // Algo::Volume::Modelisation::sliceConvexVolume<PFP>(myMap, position, d, pl);
......
...@@ -25,35 +25,34 @@ ...@@ -25,35 +25,34 @@
#include "simpleMap3.h" #include "simpleMap3.h"
#include "Utils/GLSLShader.h" #include "Utils/GLSLShader.h"
#include "Algo/Geometry/boundingbox.h" #include "Algo/Geometry/boundingbox.h"
#include "Algo/Modelisation/primitives3d.h" #include "Algo/Tiling/Volume/cubic.h"
#include "Algo/Modelisation/subdivision3.h" #include "Algo/Modelisation/subdivision3.h"
SimpleMap3::SimpleMap3() SimpleMap3::SimpleMap3()
{ {
position = myMap.addAttribute<VEC3, VERTEX>("position"); position = myMap.addAttribute<VEC3, VERTEX>("position");
Algo::Volume::Modelisation::Primitive3D<PFP> primCat(myMap,position);
Dart d = primCat.hexaGrid_topo(1,1,1); Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, 1, 1, 1);
primCat.embedHexaGrid(1,1,1); cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f);
myMap.closeMap();
myMap.check(); myMap.check();
Dart dp = Algo::Surface::Modelisation::createQuadrangularPyramid<PFP>(myMap);
position[dp] = typename PFP::VEC3(0.5,0.5,-0.5); // Dart dp = Algo::Surface::Modelisation::createQuadrangularPyramid<PFP>(myMap);
position[myMap.phi1(dp)] = typename PFP::VEC3(0.5,0.5,0.5);
position[myMap.phi1(myMap.phi1(dp))] = typename PFP::VEC3(0.5,-0.5,0.5); // position[dp] = typename PFP::VEC3(0.5,0.5,-0.5);
position[myMap.phi_1(dp)] = typename PFP::VEC3(0.5,-0.5,-0.5); // position[myMap.phi1(dp)] = typename PFP::VEC3(0.5,0.5,0.5);
position[myMap.phi_1(myMap.phi2(dp))] = typename PFP::VEC3(1.5f, 0.0f, 0.0f); // position[myMap.phi1(myMap.phi1(dp))] = typename PFP::VEC3(0.5,-0.5,0.5);
// position[myMap.phi_1(dp)] = typename PFP::VEC3(0.5,-0.5,-0.5);
// position[myMap.phi_1(myMap.phi2(dp))] = typename PFP::VEC3(1.5f, 0.0f, 0.0f);
Dart dtemp = myMap.phi_1(myMap.phi2(myMap.phi_1(myMap.phi_1(myMap.phi2(d))))); // Dart dtemp = myMap.phi_1(myMap.phi2(myMap.phi_1(myMap.phi_1(myMap.phi2(d)))));
myMap.sewVolumes(dtemp,dp); // myMap.sewVolumes(dtemp,dp);
// Algo::Volume::Modelisation::Primitive3D<PFP> primCat(myMap, position); // Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, 2, 1, 1);
// Dart d = primCat.hexaGrid_topo(2,1,1); // cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f);
// primCat.embedHexaGrid(1,1,1); // myMap.check();
// myMap.closeMap();
// unsigned int nb=0; // unsigned int nb=0;
// for(unsigned int i = position.begin(); i!=position.end(); position.next(i)) // for(unsigned int i = position.begin(); i!=position.end(); position.next(i))
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "volumeExplorer.h" #include "volumeExplorer.h"
#include <iostream> #include <iostream>
#include "Algo/Modelisation/primitives3d.h" #include "Algo/Tiling/Volume/cubic.h"
#include "Algo/Modelisation/polyhedron.h" #include "Algo/Modelisation/polyhedron.h"
#include "Algo/Import/import.h" #include "Algo/Import/import.h"
#include "Algo/Geometry/volume.h" #include "Algo/Geometry/volume.h"
...@@ -440,10 +440,10 @@ int main(int argc, char **argv) ...@@ -440,10 +440,10 @@ int main(int argc, char **argv)
else else
{ {
position = myMap.addAttribute<PFP::VEC3, VERTEX>("position"); position = myMap.addAttribute<PFP::VEC3, VERTEX>("position");
Algo::Volume::Modelisation::Primitive3D<PFP> prim(myMap, position);
int nb = 8; int nb = 8;
prim.hexaGrid_topo(nb,nb,nb); Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, nb, nb, nb);
prim.embedHexaGrid(1.0f,1.0f,1.0f); cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f);
for (unsigned int i=position.begin(); i != position.end(); position.next(i)) for (unsigned int i=position.begin(); i != position.end(); position.next(i))
{ {
......
...@@ -26,7 +26,8 @@ ENDIF(WIN32) ...@@ -26,7 +26,8 @@ ENDIF(WIN32)
add_executable(multi_att multi_att.cpp) add_executable(multi_att multi_att.cpp)
target_link_libraries(multi_att ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) target_link_libraries(multi_att ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS})
add_executable(tilings tilings.cpp) QT4_WRAP_CPP(tilings_moc tilings.h)
add_executable(tilings tilings.cpp ${tilings_moc})
target_link_libraries(tilings ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) target_link_libraries(tilings ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS})
# Example with Qt # Example with Qt
......
...@@ -22,19 +22,19 @@ ...@@ -22,19 +22,19 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#include <iostream> #include "tilings.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
#include "Algo/Export/export.h" #include "Algo/Import/import.h"
#include "Algo/Geometry/boundingbox.h"
#include "Utils/GLSLShader.h"
//#include "Algo/Geometry/area.h"
#include "Algo/Geometry/normal.h"
#include "Algo/Tiling/square.h" #include "Utils/cgognStream.h"
//#include "Algo/Tiling/triangular.h" #include "Utils/chrono.h"
//#include "Algo/Tiling/hexagonal.h"
using namespace CGoGN ; using namespace CGoGN ;
...@@ -48,25 +48,60 @@ struct PFP: public PFP_STANDARD ...@@ -48,25 +48,60 @@ struct PFP: public PFP_STANDARD
typedef EmbeddedMap2 MAP; typedef EmbeddedMap2 MAP;
}; };
int main(int argc, char **argv)
PFP::MAP myMap;
VertexAttribute<PFP::VEC3> position;
VertexAttribute<PFP::VEC3> position2;
VertexAttribute<PFP::VEC3> normal;
void MyQT::cb_initGL()
{ {
if(argc != 2) Utils::GLSLShader::setCurrentOGLVersion(2);
{
CGoGNout << "Usage : " << argv[0] << " tiling-type" << CGoGNendl; // create the render
return 0; m_render = new Algo::Render::GL2::MapRender();
}
// create VBO for position
m_positionVBO = new Utils::VBO();
m_positionVBO->updateData(position);
unsigned int tiling; m_normalVBO = new Utils::VBO();
std::istringstream iss(argv[1]);
iss >> tiling;
// declaration of the map m_shader = new Utils::ShaderSimpleColor();
PFP::MAP myMap; m_shader->setAttributePosition(m_positionVBO);
m_shader->setColor(Geom::Vec4f(1.,1.,0.,0.));
VertexAttribute<PFP::VEC3> position = myMap.addAttribute<PFP::VEC3, VERTEX>("position");
m_lines = new Utils::ShaderVectorPerVertex();
m_lines->setAttributePosition(m_positionVBO);
m_lines->setAttributeVector(m_normalVBO);
m_lines->setScale(0.2f);
m_lines->setColor(Geom::Vec4f(0.0f, 1.0f, 0.2f, 0.0f));
switch(tiling) Algo::Surface::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::LINES);
m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::POINTS);
registerShader(m_shader);
registerShader(m_lines);
m_normalVBO->updateData(normal);
}
void MyQT::cb_redraw()
{
m_render->draw(m_shader, Algo::Render::GL2::LINES);
m_render->draw(m_lines, Algo::Render::GL2::POINTS);
}
// mouse picking
void MyQT::tiling(int code)
{
//myMap.clear(false);
switch(code)
{ {
case 1: case 1:
{ {
...@@ -74,8 +109,6 @@ int main(int argc, char **argv) ...@@ -74,8 +109,6 @@ int main(int argc, char **argv)
Algo::Surface::Tilings::Square::Grid<PFP> g(myMap,10,10,true); Algo::Surface::Tilings::Square::Grid<PFP> g(myMap,10,10,true);
g.embedIntoGrid(position,50,50); g.embedIntoGrid(position,50,50);
Algo::Surface::Export::exportOFF<PFP>(myMap,position,"square_grid.off");
break; break;
} }
case 2: case 2:
...@@ -84,8 +117,6 @@ int main(int argc, char **argv) ...@@ -84,8 +117,6 @@ int main(int argc, char **argv)
Algo::Surface::Tilings::Square::Grid<PFP> g(myMap,10,10,true); Algo::Surface::Tilings::Square::Grid<PFP> g(myMap,10,10,true);
g.embedIntoTwistedStrip(position, 0.3, 0.8, 5); g.embedIntoTwistedStrip(position, 0.3, 0.8, 5);
Algo::Surface::Export::exportOFF<PFP>(myMap,position,"square_grid_strip.off");
break; break;
} }
case 3: case 3:
...@@ -94,45 +125,109 @@ int main(int argc, char **argv) ...@@ -94,45 +125,109 @@ int main(int argc, char **argv)
Algo::Surface::Tilings::Square::Grid<PFP> g(myMap,20,20,true); Algo::Surface::Tilings::Square::Grid<PFP> g(myMap,20,20,true);
g.embedIntoHelicoid(position, 0.3, 0.8, 5.0, 2.0); g.embedIntoHelicoid(position, 0.3, 0.8, 5.0, 2.0);
Algo::Surface::Export::exportOFF<PFP>(myMap,position,"square_grid_helicoid.off");
break; break;
} }
case 4: case 4:
{ {
std::cout << "square cylinder tiling" << std::endl; std::cout << "square cylinder tiling" << std::endl;
Algo::Surface::Tilings::Square::Cylinder<PFP> c(myMap,20,20); Algo::Surface::Tilings::Square::Cylinder<PFP> c(myMap,20,20);
c.closeTop();
c.closeBottom();
//c.triangleTop();
//c.triangleBottom();
c.embedIntoCylinder(position,0.5,0.7,5.0); c.embedIntoCylinder(position,0.5,0.7,5.0);
Algo::Surface::Export::exportOFF<PFP>(myMap,position,"square_cylinder.off");
break; break;
} }
case 5: case 5:
{
std::cout << "square cylinder tiling" << std::endl;
Algo::Surface::Tilings::Square::Cylinder<PFP> c(myMap,20,20);
c.triangleBottom();
c.triangleTop();
c.embedIntoCylinder(position,0.5,0.7,5.0);
break;
}
case 6:
{ {
std::cout << "square cylinder sphere tiling" << std::endl; std::cout << "square cylinder sphere tiling" << std::endl;
Algo::Surface::Tilings::Square::Cylinder<PFP> c(myMap,20,20); Algo::Surface::Tilings::Square::Cylinder<PFP> c(myMap,20,20);
c.closeTop();
c.closeBottom();
c.triangleTop(); c.triangleTop();
c.triangleBottom(); c.triangleBottom();
c.embedIntoSphere(position,0.5); c.embedIntoSphere(position,0.5);
Algo::Surface::Export::exportOFF<PFP>(myMap,position,"square_cylinder_sphere.off"); break;
}
case 7:
{
std::cout << "square cylinder cone tiling" << std::endl;
Algo::Surface::Tilings::Square::Cylinder<PFP> c(myMap,20,20);
c.triangleTop();
c.triangleBottom();
c.embedIntoCone(position,0.5, 5.0);
break;
}
case 8:
{
std::cout << "square cylinder cone tiling" << std::endl;
Algo::Surface::Tilings::Square::Cube<PFP> c(myMap,20,20,20);
c.embedIntoCube(position,5.0,5.0, 5.0);
break;
}
case 9:
{
std::cout << "square cylinder cone tiling" << std::endl;
Algo::Surface::Tilings::Square::Tore<PFP> c(myMap,20,10);
c.embedIntoTore(position,5.0,2.0);
break; break;
} }
default: default:
{ {
break; break;
} }
} }
// m_positionVBO->updateData(position);
// m_lines->setAttributePosition(m_positionVBO);
// updateGL();
}
int main(int argc, char **argv)
{
// interface:
QApplication app(argc, argv);
MyQT sqt;
sqt.statusMsg("Neww to create a sphere or Load for a mesh file");
CGoGNStream::allToConsole(&sqt);
if (!position.isValid())
position = myMap.addAttribute<PFP::VEC3, VERTEX>("position");
if (!normal.isValid())
normal = myMap.addAttribute<PFP::VEC3, VERTEX>("normal");
if(argc == 2)
{
sqt.tiling(atoi(argv[1]));
}
// bounding box
Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position);
float lWidthObj = std::max<PFP::REAL>(std::max<PFP::REAL>(bb.size(0), bb.size(1)), bb.size(2));
Geom::Vec3f lPosObj = (bb.min() + bb.max()) / PFP::REAL(2);
CGoGNout << "lPosObj=" << lPosObj << CGoGNendl;
CGoGNout << "lWidthObj=" << lWidthObj << CGoGNendl;
sqt.setParamObject(lWidthObj,lPosObj.data());
// myMap.enableQuickTraversal<EDGE>() ;
// myMap.enableQuickTraversal<VERTEX>() ;
sqt.show();
return 0; return app.exec();
} }
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "show_traversors.h" #include "show_traversors.h"
#include <iostream> #include <iostream>
#include "Algo/Modelisation/primitives3d.h" #include "Algo/Tiling/Volume/cubic.h"
#include "Algo/Modelisation/polyhedron.h" #include "Algo/Modelisation/polyhedron.h"
#include "Algo/Modelisation/subdivision.h" #include "Algo/Modelisation/subdivision.h"
...@@ -613,9 +613,9 @@ int main(int argc, char **argv) ...@@ -613,9 +613,9 @@ int main(int argc, char **argv)
{ {
position = myMap.addAttribute<VEC3, VERTEX>( "position"); position = myMap.addAttribute<VEC3, VERTEX>( "position");
Algo::Volume::Modelisation::Primitive3D<PFP> prim(myMap, position); Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, 3, 3, 3);
dglobal = prim.hexaGrid_topo(3,3,3); cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f);
prim.embedHexaGrid(1.0f,1.0f,1.0f); dglobal = NIL;
} }
else else
{ {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "tuto5.h" #include "tuto5.h"
#include <iostream> #include <iostream>
#include "Algo/Modelisation/primitives3d.h" #include "Algo/Tiling/Volume/cubic.h"
#include "Algo/Modelisation/polyhedron.h" #include "Algo/Modelisation/polyhedron.h"
#include "Algo/Modelisation/subdivision.h" #include "Algo/Modelisation/subdivision.h"
#include "Algo/Modelisation/subdivision3.h" #include "Algo/Modelisation/subdivision3.h"
...@@ -275,12 +275,12 @@ int main(int argc, char **argv) ...@@ -275,12 +275,12 @@ 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::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]);
dglobal = prim.hexaGrid_topo(nb,nb,nb); Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, nb, nb, nb);
prim.embedHexaGrid(1.0f,1.0f,1.0f); cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f);
dglobal = NIL;
// un peu d'interface // un peu d'interface
QApplication app(argc, argv); QApplication app(argc, argv);
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "Algo/Geometry/boundingbox.h" #include "Algo/Geometry/boundingbox.h"
#include "Algo/Modelisation/polyhedron.h" #include "Algo/Modelisation/polyhedron.h"
#include "Algo/Modelisation/tetrahedralization.h" #include "Algo/Modelisation/tetrahedralization.h"
#include "Algo/Modelisation/primitives3d.h" #include "Algo/Tiling/Volume/cubic.h"
#include "Algo/Geometry/centroid.h" #include "Algo/Geometry/centroid.h"
#include "Algo/Geometry/normal.h" #include "Algo/Geometry/normal.h"
#include "Algo/Import/import.h" #include "Algo/Import/import.h"
...@@ -262,15 +262,8 @@ void MyQT::createMap(int n) ...@@ -262,15 +262,8 @@ void MyQT::createMap(int n)
position = myMap.getAttribute<VEC3, VERTEX>("position"); position = myMap.getAttribute<VEC3, VERTEX>("position");
if (!position.isValid()) if (!position.isValid())
position = myMap.addAttribute<VEC3, VERTEX>("position"); position = myMap.addAttribute<VEC3, VERTEX>("position");
Algo::Volume::Modelisation::Primitive3D<PFP> prim(myMap, position); Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, n, n, n);
prim.hexaGrid_topo(n,n,n); cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f);
prim.embedHexaGrid(1.0f,1.0f,1.0f);
// Algo::Surface::Modelisation::Polyhedron<PFP> poly(myMap, position);
// poly.cylinder_topo(6,1,true,true);
// poly.embedCylinder(6.0,6.0,5.0);
myMap.closeMap();
// Dart d = Algo::Surface::Modelisation::embedPrism<PFP>(myMap, position, 5, true,6.0,6.0,5.0); // Dart d = Algo::Surface::Modelisation::embedPrism<PFP>(myMap, position, 5, true,6.0,6.0,5.0);
// Dart d2 = Algo::Surface::Modelisation::embedPyramid<PFP>(myMap, position, 4, true,6.0,5.0); // Dart d2 = Algo::Surface::Modelisation::embedPyramid<PFP>(myMap, position, 4, true,6.0,5.0);
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <iostream> #include <iostream>
#include "Algo/Modelisation/primitives3d.h" #include "Algo/Tiling/Volume/cubic.h"
#include "Algo/Modelisation/polyhedron.h" #include "Algo/Modelisation/polyhedron.h"
#include "Algo/Modelisation/subdivision.h" #include "Algo/Modelisation/subdivision.h"
...@@ -200,10 +200,9 @@ void MyQT::initMap() ...@@ -200,10 +200,9 @@ void MyQT::initMap()
std::cout << "INIT MAP"<< std::endl; std::cout << "INIT MAP"<< std::endl;
position = myMap.addAttribute<VEC3, VERTEX>("position"); position = myMap.addAttribute<VEC3, VERTEX>("position");
Algo::Volume::Modelisation::Primitive3D<PFP> prim(myMap, position);
int nb=2; int nb=2;
prim.hexaGrid_topo(nb,nb,nb); Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, nb, nb, nb);
prim.embedHexaGrid(1.0f,1.0f,1.0f); cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f);
m_att_orbits[0] = new AttributeHandler<int, VERTEX>(myMap.addAttribute<int, VERTEX>("vertex"));