Coupure prévue mardi 3 Août au matin pour maintenance du serveur. Nous faisons au mieux pour que celle-ci soit la plus brève possible.

Commit 10e52114 by untereiner

### Tilings :

```- changed all polyhedron to tiling square
- renamed primitives3d to kick out
IHM2 :
- renamed Algo/IHM/ihm.h/hpp to kick out (use Topology/ihmap/ihm2.h instead)
- add ihm2_PrimalRegular object wich is similar implicit equivalent to map2MR_PrimalRegular```
parent 492e71b3
 ... @@ -26,6 +26,7 @@ ... @@ -26,6 +26,7 @@ #include "Utils/GLSLShader.h" #include "Utils/GLSLShader.h" #include "Algo/Geometry/boundingbox.h" #include "Algo/Geometry/boundingbox.h" #include "Algo/Modelisation/polyhedron.h" #include "Algo/Modelisation/polyhedron.h" #include "Algo/Tiling/Surface/square.h" SimpleGMap2::SimpleGMap2() SimpleGMap2::SimpleGMap2() { { ... @@ -41,11 +42,9 @@ SimpleGMap2::SimpleGMap2() ... @@ -41,11 +42,9 @@ SimpleGMap2::SimpleGMap2() myMap.cutEdge(d); myMap.cutEdge(d); position[myMap.phi1(d)] = mid; position[myMap.phi1(d)] = mid; Algo::Surface::Modelisation::Polyhedron poly(myMap, position); Algo::Surface::Tilings::Square::Cylinder poly(myMap, 5 ,1, false, false); d = poly.getDart(); d = poly.cylinder_topo(5, 1, false, false); poly.embedIntoCylinder(position, 10, 10, 5); poly.embedCylinder(10, 10, 5); d = myMap.phi1(d); d = myMap.phi1(d); Dart dd = myMap.beta2(d); Dart dd = myMap.beta2(d); ... ...
 ... @@ -24,7 +24,7 @@ ... @@ -24,7 +24,7 @@ #include "texturesExample.h" #include "texturesExample.h" #include "Algo/Geometry/boundingbox.h" #include "Algo/Geometry/boundingbox.h" #include "Algo/Modelisation/polyhedron.h" #include "Algo/Tiling/Surface/square.h" #include "Utils/vbo.h" #include "Utils/vbo.h" TexView::TexView(): TexView::TexView(): ... @@ -215,9 +215,9 @@ void TexView::computeTore() ... @@ -215,9 +215,9 @@ void TexView::computeTore() VertexAttribute position = myMap.addAttribute("position"); VertexAttribute position = myMap.addAttribute("position"); VertexAttribute texcoord = myMap.addAttribute("texcoord"); VertexAttribute texcoord = myMap.addAttribute("texcoord"); Algo::Surface::Modelisation::Polyhedron prim(myMap, position); //Algo::Surface::Modelisation::Polyhedron prim(myMap, position); prim.tore_topo(NB, NB); Algo::Surface::Tilings::Square::Tore prim(myMap, NB, NB); prim.embedTore(40.0f,20.0f); prim.embedIntoTore(position, 40.0f,20.0f); Dart d = prim.getDart(); Dart d = prim.getDart(); for(unsigned int i=0; i
 ... @@ -25,7 +25,7 @@ ... @@ -25,7 +25,7 @@ #include "tuto3.h" #include "tuto3.h" #include "Algo/Geometry/boundingbox.h" #include "Algo/Geometry/boundingbox.h" #include "Algo/Selection/raySelector.h" #include "Algo/Selection/raySelector.h" #include "Algo/Modelisation/polyhedron.h" #include "Algo/Tiling/Surface/square.h" using namespace CGoGN ; using namespace CGoGN ; ... @@ -154,9 +154,8 @@ void MyQT::createMap() ... @@ -154,9 +154,8 @@ void MyQT::createMap() position = myMap.addAttribute("position"); position = myMap.addAttribute("position"); Algo::Surface::Modelisation::Polyhedron prim1(myMap, position); Algo::Surface::Tilings::Square::Cylinder prim1(myMap, 256,256,true,true); prim1.cylinder_topo(256, 256, true, true); // topo of sphere is a closed cylinder prim1.embedIntoSphere(position, 2.0f); prim1.embedSphere(2.0f); // Dart d2 = d1; // Dart d2 = d1; // position[d2] = PFP::VEC3(1, 0, 0); // position[d2] = PFP::VEC3(1, 0, 0); ... @@ -167,14 +166,14 @@ void MyQT::createMap() ... @@ -167,14 +166,14 @@ 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::Surface::Modelisation::Polyhedron prim2(myMap, position); Algo::Surface::Tilings::Square::Cylinder prim2(myMap, 256 ,256, true, true); prim2.cylinder_topo(256, 256, true, true); // topo of sphere is a closed cylinder prim2.embedIntoSphere(position, 2.0f); prim2.embedSphere(2.0f); Geom::Matrix44f trf; Geom::Matrix44f trf; trf.identity(); trf.identity(); Geom::translate(5.0f, 0.0, 0.0, trf); Geom::translate(5.0f, 0.0, 0.0, trf); prim2.transform(trf); prim2.transform(position, trf); xd1 = prim2.getDart(); xd1 = prim2.getDart(); ... ...
 ... @@ -36,7 +36,8 @@ ... @@ -36,7 +36,8 @@ #include "Utils/GLSLShader.h" #include "Utils/GLSLShader.h" //#include "Algo/Geometry/area.h" //#include "Algo/Geometry/area.h" #include "Algo/Geometry/normal.h" #include "Algo/Geometry/normal.h" #include "Algo/Modelisation/polyhedron.h" //#include "Algo/Modelisation/polyhedron.h" #include "Algo/Tiling/Surface/square.h" #include "Algo/Parallel/parallel_foreach.h" #include "Algo/Parallel/parallel_foreach.h" ... @@ -298,9 +299,8 @@ int main(int argc, char **argv) ... @@ -298,9 +299,8 @@ int main(int argc, char **argv) if (argc==2) if (argc==2) nbt = atoi(argv[1]); nbt = atoi(argv[1]); // create a sphere // create a sphere Algo::Surface::Modelisation::Polyhedron prim(myMap, position); Algo::Surface::Tilings::Square::Cylinder prim(myMap, nbt, nbt, true, true); prim.cylinder_topo(nbt,nbt, true, true); prim.embedIntoSphere(position, 20.0f); prim.embedSphere(20.0f); // bounding box // bounding box ... ...
 ... @@ -24,7 +24,7 @@ ... @@ -24,7 +24,7 @@ #include "tuto_oper2.h" #include "tuto_oper2.h" #include "Algo/Geometry/boundingbox.h" #include "Algo/Geometry/boundingbox.h" #include "Algo/Modelisation/polyhedron.h" #include "Algo/Tiling/Surface/square.h" #include "Algo/Geometry/centroid.h" #include "Algo/Geometry/centroid.h" #include "Algo/Import/import.h" #include "Algo/Import/import.h" #include "Algo/Export/export.h" #include "Algo/Export/export.h" ... @@ -175,9 +175,8 @@ void MyQT::createMap(int n) ... @@ -175,9 +175,8 @@ void MyQT::createMap(int n) position = myMap.addAttribute("position"); position = myMap.addAttribute("position"); colorDarts = myMap.addAttribute("color"); colorDarts = myMap.addAttribute("color"); Algo::Surface::Modelisation::Polyhedron grid(myMap,position); Algo::Surface::Tilings::Square::Grid grid(myMap, n, n, true); grid.grid_topo(n,n); grid.embedIntoGrid(position, 1.,1.,0.); grid.embedGrid(1.,1.,0.); // bounding box of scene // bounding box of scene Geom::BoundingBox bb = Algo::Geometry::computeBoundingBox(myMap, position) ; Geom::BoundingBox bb = Algo::Geometry::computeBoundingBox(myMap, position) ; ... ...
 ... @@ -94,65 +94,65 @@ void subdivideFace(typename PFP::MAP& map, Dart d, VertexAttribute
 ... @@ -27,7 +27,7 @@ ... @@ -27,7 +27,7 @@ #include #include #include #include #include "Algo/Modelisation/polyhedron.h" #include "Algo/Tiling/Surface/square.h" #include "Algo/Modelisation/subdivision.h" #include "Algo/Modelisation/subdivision.h" #include "Algo/Geometry/normal.h" #include "Algo/Geometry/normal.h" ... @@ -82,7 +82,8 @@ Dart extrusion_scale(typename PFP::MAP& the_map, VertexAttribute template Polyhedron* extrusion_scale_prim(typename PFP::MAP& the_map, VertexAttribute& positions, //Polyhedron* extrusion_scale_prim(typename PFP::MAP& the_map, VertexAttribute& positions, Algo::Surface::Tilings::Tiling* extrusion_scale_prim(typename PFP::MAP& the_map, VertexAttribute& positions, const std::vector& profile, const std::vector& profile, const typename PFP::VEC3& centerProfile, const typename PFP::VEC3& centerProfile, const typename PFP::VEC3& normalProfile, const typename PFP::VEC3& normalProfile, ... @@ -106,7 +107,8 @@ Polyhedron* extrusion_scale_prim(typename PFP::MAP& the_map, VertexAttribut ... @@ -106,7 +107,8 @@ Polyhedron* extrusion_scale_prim(typename PFP::MAP& the_map, VertexAttribut * size of vector must be the same as path * size of vector must be the same as path */ */ template template Polyhedron* extrusion_prim(typename PFP::MAP& the_map, VertexAttribute& positions, //Polyhedron* extrusion_prim(typename PFP::MAP& the_map, VertexAttribute& positions, Algo::Surface::Tilings::Tiling* extrusion_prim(typename PFP::MAP& the_map, VertexAttribute& positions, const std::vector& profile, const std::vector& profile, const typename PFP::VEC3& centerProfile, const typename PFP::VEC3& centerProfile, const typename PFP::VEC3& normalProfile, const typename PFP::VEC3& normalProfile, ... @@ -146,7 +148,8 @@ Dart extrusion(typename PFP::MAP& the_map, VertexAttribute& ... @@ -146,7 +148,8 @@ Dart extrusion(typename PFP::MAP& the_map, VertexAttribute& * @param nbSide number of steps around the revolution * @param nbSide number of steps around the revolution */ */ template template Polyhedron* revolution_prim(typename PFP::MAP& the_map, VertexAttribute& positions, //Polyhedron* revolution_prim(typename PFP::MAP& the_map, VertexAttribute& positions, Algo::Surface::Tilings::Tiling* revolution_prim(typename PFP::MAP& the_map, VertexAttribute& positions, const std::vector& profile, const std::vector& profile, const typename PFP::VEC3& center, const typename PFP::VEC3& center, const typename PFP::VEC3& axis, const typename PFP::VEC3& axis, ... @@ -197,7 +200,7 @@ Dart extrudeRegion(typename PFP::MAP& the_map, VertexAttribute
 ... @@ -38,7 +38,8 @@ namespace Modelisation ... @@ -38,7 +38,8 @@ namespace Modelisation { { template template Polyhedron* revolution_prim(typename PFP::MAP& the_map, VertexAttribute& position, const std::vector& profile, const typename PFP::VEC3& center, //Polyhedron* revolution_prim(typename PFP::MAP& the_map, VertexAttribute& position, const std::vector& profile, const typename PFP::VEC3& center, Algo::Surface::Tilings::Tiling* revolution_prim(typename PFP::MAP& the_map, VertexAttribute& position, const std::vector& profile, const typename PFP::VEC3& center, const typename PFP::VEC3& axis, bool profile_closed, int nbSides) const typename PFP::VEC3& axis, bool profile_closed, int nbSides) { { typedef typename PFP::VEC3 VEC3 ; typedef typename PFP::VEC3 VEC3 ; ... @@ -70,7 +71,8 @@ template ... @@ -70,7 +71,8 @@ template Dart revolution(typename PFP::MAP& the_map, VertexAttribute& position, const std::vector& profile, const typename PFP::VEC3& center, Dart revolution(typename PFP::MAP& the_map, VertexAttribute& position, const std::vector& profile, const typename PFP::VEC3& center, const typename PFP::VEC3& axis, bool profile_closed, int nbSides) const typename PFP::VEC3& axis, bool profile_closed, int nbSides) { { Polyhedron *prim = revolution_prim(the_map, position, profile, center, axis, profile_closed, nbSides); //Polyhedron *prim = revolution_prim(the_map, position, profile, center, axis, profile_closed, nbSides); Algo::Surface::Tilings::Tiling *prim = revolution_prim(the_map, position, profile, center, axis, profile_closed, nbSides); Dart d = prim->getDart(); Dart d = prim->getDart(); delete prim; delete prim; return d; return d; ... @@ -81,7 +83,8 @@ template ... @@ -81,7 +83,8 @@ template Dart extrusion_scale(typename PFP::MAP& the_map, VertexAttribute& position, const std::vector& profile, const typename PFP::VEC3& centerProfile, const typename PFP::VEC3& normalProfile, bool profile_closed, Dart extrusion_scale(typename PFP::MAP& the_map, VertexAttribute& position, const std::vector& profile, const typename PFP::VEC3& centerProfile, const typename PFP::VEC3& normalProfile, bool profile_closed, const std::vector& path, bool path_closed, const std::vector& scalePath) const std::vector& path, bool path_closed, const std::vector& scalePath) { { Polyhedron *prim = extrusion_scale_prim(the_map, position, profile, centerProfile, normalProfile, profile_closed, path, path_closed,scalePath); //Polyhedron *prim = extrusion_scale_prim(the_map, position, profile, centerProfile, normalProfile, profile_closed, path, path_closed,scalePath); Algo::Surface::Tilings::Tiling *prim = extrusion_scale_prim(the_map, position, profile, centerProfile, normalProfile, profile_closed, path, path_closed,scalePath); Dart d = prim->getDart(); Dart d = prim->getDart(); delete prim; delete prim; return d; return d; ... @@ -92,14 +95,16 @@ Dart extrusion(typename PFP::MAP& the_map, VertexAttribute& ... @@ -92,14 +95,16 @@ Dart extrusion(typename PFP::MAP& the_map, VertexAttribute& const std::vector& path, bool path_closed) const std::vector& path, bool path_closed) { { std::vector scalePath; std::vector scalePath; Polyhedron *prim = extrusion_scale_prim(the_map, position, profile, centerProfile, normalProfile, profile_closed, path, path_closed,scalePath); //Polyhedron *prim = extrusion_scale_prim(the_map, position, profile, centerProfile, normalProfile, profile_closed, path, path_closed,scalePath); Algo::Surface::Tilings::Tiling *prim = extrusion_scale_prim(the_map, position, profile, centerProfile, normalProfile, profile_closed, path, path_closed,scalePath); Dart d = prim->getDart(); Dart d = prim->getDart(); delete prim; delete prim; return d; return d; } } template template Polyhedron* extrusion_prim(typename PFP::MAP& the_map, VertexAttribute& position, const std::vector& profile, const typename PFP::VEC3& centerProfile, const typename PFP::VEC3& normalProfile, bool profile_closed, //Polyhedron* extrusion_prim(typename PFP::MAP& the_map, VertexAttribute& position, const std::vector& profile, const typename PFP::VEC3& centerProfile, const typename PFP::VEC3& normalProfile, bool profile_closed, Algo::Surface::Tilings::Tiling* extrusion_prim(typename PFP::MAP& the_map, VertexAttribute& position, const std::vector& profile, const typename PFP::VEC3& centerProfile, const typename PFP::VEC3& normalProfile, bool profile_closed, const std::vector& path, bool path_closed) const std::vector& path, bool path_closed) { { std::vector scalePath; std::vector scalePath; ... @@ -107,24 +112,30 @@ Polyhedron* extrusion_prim(typename PFP::MAP& the_map, VertexAttribute* extrusion_prim(typename PFP::MAP& the_map, VertexAttribute template Polyhedron* extrusion_scale_prim(typename PFP::MAP& the_map, VertexAttribute& position, const std::vector& profile, const typename PFP::VEC3& centerProfile, const typename PFP::VEC3& normal, bool profile_closed, const std::vector& path, bool path_closed, const std::vector& scalePath) //Polyhedron* extrusion_scale_prim(typename PFP::MAP& the_map, VertexAttribute& position, const std::vector& profile, const typename PFP::VEC3& centerProfile, const typename PFP::VEC3& normal, bool profile_closed, const std::vector& path, bool path_closed, const std::vector& scalePath) Algo::Surface::Tilings::Tiling* extrusion_scale_prim(typename PFP::MAP& the_map, VertexAttribute& position, const std::vector& profile, const typename PFP::VEC3& centerProfile, const typename PFP::VEC3& normal, bool profile_closed, const std::vector& path, bool path_closed, const std::vector& scalePath) { { // topological creation // topological creation Polyhedron *prim = new Polyhedron(the_map, position); //Polyhedron *prim = new Polyhedron(the_map, position); Dart grid; Algo::Surface::Tilings::Tiling* prim; //Dart grid; if (profile_closed) if (profile_closed) { { if (path_closed) if (path_closed) grid = prim->tore_topo(profile.size() ,path.size()); //grid = prim->tore_topo(profile.size() ,path.size()); prim = new Algo::Surface::Tilings::Square::Tore(the_map, profile.size(), path.size()); else else grid = prim->cylinder_topo(profile.size() ,path.size()-1, false, false); //grid = prim->cylinder_topo(profile.size() ,path.size()-1, false, false); prim = new Algo::Surface::Tilings::Square::Cylinder(the_map, profile.size(), path.size()-1,false, false); } } else else { { if (path_closed) if (path_closed) { { grid = prim->grid_topo(profile.size()-1 ,path.size()); //grid = prim->grid_topo(profile.size()-1 ,path.size()); prim = new Algo::Surface::Tilings::Square::Grid(the_map, profile.size()-1 ,path.size(), true); // sewing boundaries correponding to path boundaries