Commit a5f73b59 authored by unknown's avatar unknown

Merge branch 'master' of cgogn:~thery/CGoGN

parents 53965fa8 d7105b9b
This diff is collapsed.
......@@ -194,7 +194,12 @@ void MyQT::createMap(int n)
m_render_topo->setDartWidth(4.0f);
m_render_topo->setInitialDartsColor(0.0f,0.0f,0.0f);
m_render_topo->setInitialBoundaryDartsColor(0.0f,0.0f,0.0f);
m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f,true); // nb
#ifdef PRIMAL_TOPO
m_render_topo->updateData<PFP>(myMap, position, 0.9);
#else
m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f,true);
#endif
for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
{
......@@ -213,7 +218,12 @@ void MyQT::createMap(int n)
void MyQT::updateMap()
{
m_render_topo->setInitialBoundaryDartsColor(0.0f,0.0f,0.0f);
m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f,true); // nb
#ifdef PRIMAL_TOPO
m_render_topo->updateData<PFP>(myMap, position, 0.9);
#else
m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f,true);
#endif
for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
{
if (dm.isMarked(d) && (!myMap.isBoundaryMarked2(d)))
......@@ -229,7 +239,11 @@ void MyQT::updateMap()
void MyQT::cb_initGL()
{
glClearColor(1.0f,1.0f,1.0f,1.0f);
m_render_topo = new Algo::Render::GL2::TopoRender(0.01f) ;
#ifdef PRIMAL_TOPO
m_render_topo = new Algo::Render::GL2::TopoPrimalRender() ;
#else
m_render_topo = new Algo::Render::GL2::TopoRender(0.01f) ;
#endif
}
// redraw GL callback (clear and swap already done)
......
......@@ -27,6 +27,7 @@
//#define USE_GMAP
//#define PRIMAL_TOPO 1
#include "Topology/generic/parameters.h"
......@@ -36,8 +37,11 @@
#include "Topology/map/embeddedMap2.h"
#endif
#include "Algo/Render/GL2/topoRender.h"
#ifdef PRIMAL_TOPO
#include "Algo/Render/GL2/topoPrimalRender.h"
#else
#include "Algo/Render/GL2/topoRender.h"
#endif
#include "ui_tuto_oper2.h"
#include "Utils/Qt/qtui.h"
......@@ -88,7 +92,11 @@ protected:
DartAttribute<VEC3> colorDarts;
// render (for the topo)
Algo::Render::GL2::TopoRender* m_render_topo;
#ifdef PRIMAL_TOPO
Algo::Render::GL2::TopoPrimalRender* m_render_topo;
#else
Algo::Render::GL2::TopoRender* m_render_topo;
#endif
Dart m_selected;
Dart m_selected2;
DartMarker dm;
......
This diff is collapsed.
......@@ -27,6 +27,7 @@
//#define USE_GMAP
//#define PRIMAL_TOPO 1
#include "Topology/generic/parameters.h"
......@@ -36,7 +37,12 @@
#include "Topology/map/embeddedMap3.h"
#endif
#include "Algo/Render/GL2/topo3Render.h"
#ifdef PRIMAL_TOPO
#include "Algo/Render/GL2/topo3PrimalRender.h"
#else
#include "Algo/Render/GL2/topo3Render.h"
#endif
#include "Algo/Render/GL2/topoRender.h"
#include "Algo/Geometry/boundingbox.h"
......@@ -71,7 +77,7 @@ class MyQT: public Utils::QT::SimpleQT
{
Q_OBJECT
public:
MyQT():m_render_topo(NULL),m_selected(NIL),m_selected2(NIL),dm(myMap),m_shift(0.01f),m_ex1(0.9f),m_ex2(0.9f),m_ex3(0.9f), clip_volume(true) , hide_clipping(false) {}
MyQT():m_render_topo(NULL),m_selected(NIL),m_selected2(NIL),m_shift(0.01f),m_ex1(0.9f),m_ex2(0.9f),m_ex3(0.9f), clip_volume(true) , hide_clipping(false) {}
void cb_redraw();
void cb_initGL();
......@@ -95,12 +101,15 @@ protected:
Geom::BoundingBox<PFP::VEC3> bb;
// render (for the topo)
#ifdef PRIMAL_TOPO
Algo::Render::GL2::Topo3PrimalRender* m_render_topo;
#else
Algo::Render::GL2::Topo3Render* m_render_topo;
#endif
Algo::Render::GL2::TopoRender* m_render_topo_boundary;
Dart m_selected;
Dart m_selected2;
std::vector<Dart> m_selecteds;
DartMarker dm;
float m_shift;
float m_ex1, m_ex2, m_ex3;
......@@ -136,6 +145,7 @@ protected:
public:
// example of simple map creation
void createMap(int n);
void createMapTets();
void updateMap();
void importMesh(std::string& filename);
......
......@@ -150,6 +150,11 @@
<string>unsewVolumes</string>
</property>
</item>
<item>
<property name="text">
<string>deleteVolume</string>
</property>
</item>
</widget>
</item>
<item row="6" column="0">
......
*** english version below ***
Dépendences Linux:
installer les paquets suivants:
cmake cmake-curses-gui libXi-dev libXmu-dev libglew-dev libxml2-dev libboost-all-dev zlib1g-dev qt4-designer qt4-dev-tools uuid-dev libgsl0-dev libsuitesparse-dev
Pour compiler CGoGN:
- aller dans ThirdParty, cd build, taper "cmake .", puis make ( avec -j x si vous avez x core sur votre machine) suivi de make install
On peut fixer certaines option pour ne pas tout compiler (cf le README.TXT dans ThirdParty)
- on compile tout d'abord les bibliothèques third-party :
- ensuite on compile CGoGN (compile les libs dans CGoGN/lib et des exemples dans CGoGN/bin) :
cd CGoGN/build
cd CGoGN/ThirdParty/build
cmake ..
make (-j x si vous avez x cores)
make (-j x if you have x cores)
make install
Certaines options (booléennes) sont ici aussi disponible:
On peut fixer certaines option pour ne pas tout compiler (cf le README.TXT dans ThirdParty)
On peut aussi compiler en debug en créant un répertoir qui fini par Debug à la place de build
- aller dans build et taper "cmake ..", puis make
Des options (booléennes) sont ici aussi disponible:
BUILD_SHARED_LIBS (F) experimental !
WITH_ASSIMP (T)
WITH_NUMERICAL (T)
WITH_ZINRI (T)
WITH_QT (T)
afin de limiter les dépendances et le temps de compilation
afin de limiter les dépendances et le temps de compilation/
FORCE_MR (2)
permet de compiler dans 3 modes: mono-resolution (0), multi-resolution (1)
permet de compiler dans 3 modes: mixte (0), multi-resolution(1), mono-resolution(2).
ONELIB (F)
permet de forcer la compilation en une seule lib (libcgogn.a) au lieu de quatre.
- on peut ensuite compiler SCHNApps ainsi que les plugins fournis :
cd CGoGN/SCHNApps/build
cmake ..
make (-j x si vous avez x cores)
- la compilation des sous-parties se fait en allant dans les sous-repertoires de build
Les applications (Examples et Tutos) sont dans le répertoire Apps
Les binaires sont générés dans le repertoire bin
Des exemples de données:
- fichiers trianbgz, off, etc
......@@ -72,16 +74,17 @@ To compile CGoGN:
WITH_QT (T)
to minimize dependencies and compilation time
FORCE_MR (2)
allows the compilation in 3 modes: mono-resolution (0), multi-resolution (1)
allow the compilation in 3 mode: mixed(0), multi-resolution(1), mono-resolution(2).
ONELIB (F)
allowss to force the compilation in one lib (libcgogn.a) instead of four.
allow compilation in one lib (libcgogn.a) instead of four.
- we can then compile SCHNApps and the provided plugins :
cd CGoGN/SCHNApps/build
cmake ..
make (-j x if you have x cores)
- the compilation of each sub-parts is done by going in the subdirectories of build
Applications (examples and tutorials) are in the Apps directory
The binaries are generated in the bin directory
Examples of data:
- Trianbgz files, off, etc.
......
......@@ -529,9 +529,11 @@ Dart flip1To3(typename PFP::MAP& map, Dart d)
edges.push_back(dit);
map.splitVolume(edges);
map.splitFace(map.phi1(map.phi2(edges[0])),map.phi1(map.phi2(edges[2])));
// Cut the 2nd Tetrahedron
map.splitFace(map.phi1(map.phi2(edges[0])),map.phi1(map.phi2(edges[2])));
// Cut the 3rd Tetrahedron
dit = map.phi1(map.phi2(edges[0]));
edges.clear();
edges.push_back(dit);
......
......@@ -51,6 +51,11 @@ public:
{
}
virtual ~ParticleBase()
{
}
void setState(unsigned int state)
{
m_state = state ;
......
......@@ -57,6 +57,10 @@ public:
{
}
~ParticleCell2D()
{
}
Dart getCell()
{
return d ;
......
......@@ -191,7 +191,7 @@ void ParticleCell2D<PFP>::edgeState(const VEC3& goal, Geom::Orientation2D sideOf
float p2 = (P[0] - Pb[0]) * (Pa[1] - Pb[1]) - (Pa[0] - Pb[0]) * (P[1] - Pb[1]) ;
CGoGNout<<"p2 :"<<p2<<CGoGNendl;
CGoGNout<<"goal :"<<goal<<CGoGNendl;
#endif
assert(goal.isFinite()) ;
......
......@@ -42,7 +42,10 @@ public:
ParticleCell2DMemo(MAP& map, Dart belonging_cell, VEC3 pos, const TAB_POS& tabPos) :
ParticleCell2D<PFP>(map, belonging_cell, pos, tabPos)
{
}
virtual ~ParticleCell2DMemo()
{
}
virtual void vertexState(const VEC3& current, CellMarkerMemo<FACE>& memo_cross) ;
......
......@@ -40,7 +40,12 @@ public:
ParticleCell2DSecured(MAP& map, Dart belonging_cell, VEC3 pos, const TAB_POS& tabPos) :
ParticleCell2DMemo<PFP>(map, belonging_cell, pos, tabPos)
{
std::cout << "Particle Memo : for debugging (unoptimized)" << std::endl;
// std::cout << "Particle Memo : for debugging (unoptimized)" << std::endl;
}
~ParticleCell2DSecured()
{
}
......
......@@ -121,6 +121,7 @@ void ParticleCell2DAndHalf<PFP>::vertexState(VEC3 goal)
if(Geometry::isPointOnVertex<PFP>(m,d,m_positions,goal))
{
state = VERTEX;
distance += (goal - this->getPosition()).norm();
this->Algo::MovingObjects::ParticleBase<PFP>::move(goal) ;
return;
}
......@@ -151,6 +152,7 @@ void ParticleCell2DAndHalf<PFP>::vertexState(VEC3 goal)
}
else
{
distance += (goal - this->getPosition()).norm();
this->Algo::MovingObjects::ParticleBase<PFP>::move(goal);
state = VERTEX;
return;
......@@ -235,6 +237,7 @@ void ParticleCell2DAndHalf<PFP>::edgeState(VEC3 goal, Geom::Orientation3D sideOf
if(!Geometry::isPointOnHalfEdge<PFP>(m, d, m_positions, goal))
{
distance += (goal - this->getPosition()).norm();
this->Algo::MovingObjects::ParticleBase<PFP>::move(m_positions[d]) ;
vertexState(goal);
return;
......@@ -242,11 +245,12 @@ void ParticleCell2DAndHalf<PFP>::edgeState(VEC3 goal, Geom::Orientation3D sideOf
else if(!Geometry::isPointOnHalfEdge<PFP>(m, m.phi2(d), m_positions, goal))
{
d = m.phi2(d);
distance += (m_positions[d] - this->getPosition()).norm();
this->Algo::MovingObjects::ParticleBase<PFP>::move(m_positions[d]) ;
vertexState(goal);
return;
}
distance += (goal - this->getPosition()).norm();
this->Algo::MovingObjects::ParticleBase<PFP>::move(goal);
}
......@@ -265,9 +269,9 @@ void ParticleCell2DAndHalf<PFP>::faceState(VEC3 goal)
VEC3 n2 = goal - this->getPosition();
// n1.normalize();
VEC3 n3 = n1 ^ n2;
n3.normalize();
VEC3 n4 = n3 ^ n1;
goal = this->getPosition() + (n2 * n4) * n4;
goal = this->getPosition() + n4;
//track new position within map
Dart dd = d;
......@@ -294,20 +298,24 @@ void ParticleCell2DAndHalf<PFP>::faceState(VEC3 goal)
case Geom::UNDER: d = m.phi1(d);
break;
// case Geom::ON: this->Algo::MovingObjects::ParticleBase<PFP>::move(current) ;
case Geom::ON: this->Algo::MovingObjects::ParticleBase<PFP>::move(goal) ;
case Geom::ON: distance += (goal - this->getPosition()).norm();
this->Algo::MovingObjects::ParticleBase<PFP>::move(goal) ;
edgeState(goal);
return;
case Geom::OVER:
// CGoGNout << "smthg went bad " << m_position << " " << goal << CGoGNendl;
// CGoGNout << "d1 " << m_positions[d] << " d2 " << m_positions[m.phi1(d)] << CGoGNendl;
// this->Algo::MovingObjects::ParticleBase<PFP>::move(intersectLineEdge(current, this->getPosition(), d));
this->Algo::MovingObjects::ParticleBase<PFP>::move(intersectLineEdge(goal, this->getPosition(), d));
VEC3 inter = intersectLineEdge(goal, this->getPosition(), d);
distance += (inter - this->getPosition()).norm();
this->Algo::MovingObjects::ParticleBase<PFP>::move(inter);
// CGoGNout << " " << m_position << CGoGNendl;
edgeState(goal,Geom::OVER);
return;
}
} while(d != dd);
distance += (goal - this->getPosition()).norm();
this->Algo::MovingObjects::ParticleBase<PFP>::move(goal);
state = FACE;
......@@ -346,12 +354,15 @@ void ParticleCell2DAndHalf<PFP>::faceState(VEC3 goal)
break;
case Geom::ON :
// CGoGNout << "pic" << CGoGNendl;
distance += (goal - this->getPosition()).norm();
this->Algo::MovingObjects::ParticleBase<PFP>::move(goal) ;
edgeState(goal);
return;
case Geom::OVER:
// CGoGNout << "smthg went bad(2) " << m_position << CGoGNendl;
this->Algo::MovingObjects::ParticleBase<PFP>::move(intersectLineEdge(goal, this->getPosition(), d)) ;
VEC3 inter = intersectLineEdge(goal, this->getPosition(), d);
distance += (inter - this->getPosition()).norm();
this->Algo::MovingObjects::ParticleBase<PFP>::move(inter) ;
// CGoGNout << " " << m_position << CGoGNendl;
// edgeState(current, Geom::OVER);
edgeState(goal, Geom::OVER);
......@@ -359,7 +370,7 @@ void ParticleCell2DAndHalf<PFP>::faceState(VEC3 goal)
}
} while(d != dd);
distance += (goal - this->getPosition()).norm();
this->Algo::MovingObjects::ParticleBase<PFP>::move(goal);
state = FACE;
return;
......@@ -377,7 +388,7 @@ void ParticleCell2DAndHalf<PFP>::faceState(VEC3 goal)
default :
if(wsoe == Geom::ON)
{
std::cout << __FILE__ << " to uncomment and check" << std::endl;
// std::cout << __FILE__ << " to uncomment and check" << std::endl;
// d = m.phi1(d); //to check
// m_position = m_positions[d];
//
......
......@@ -246,7 +246,7 @@ void ParticleCell2DAndHalfMemo<PFP>::faceState(VEC3 current, CellMarkerMemo<FACE
#ifdef DEBUG
CGoGNout << "faceState" << this->d << CGoGNendl;
#endif
if(memo_cross.isMarked(this->d)) return ;
memo_cross.mark(this->d);
assert(this->getPosition().isFinite());
......@@ -258,9 +258,9 @@ void ParticleCell2DAndHalfMemo<PFP>::faceState(VEC3 current, CellMarkerMemo<FACE
VEC3 n2 = current - this->getPosition();
// n1.normalize();
VEC3 n3 = n1 ^ n2;
n3.normalize();
VEC3 n4 = n3 ^ n1;
current = this->getPosition() + (n2 * n4) * n4;
current = this->getPosition() + n4;
//track new position within map
Dart dd = this->d;
......
......@@ -50,10 +50,11 @@ namespace Masks
/* MJ96 basic functions : polyhedral meshes
*********************************************************************************/
template <typename PFP, typename EMBV, typename EMB>
template <typename PFP, typename EMBV>
class MJ96VertexVertexFunctor : public FunctorType
{
protected:
typedef typename EMBV::DATA_TYPE EMB;
typename PFP::MAP& m_map ;
EMBV& m_attribut;
//Algo::Volume::IHM::AttributeHandler_IHM<typename PFP::VEC3, VERTEX>& m_position ;
......@@ -118,7 +119,7 @@ public:
Traversor3VW<typename PFP::MAP> travVW(m_map, d);
for(Dart dit = travVW.begin() ; dit != travVW.end() ; dit = travVW.next())
{
Cavg += Algo::Surface::Geometry::volumeCentroidGen<PFP, EMBV, EMB>(m_map, dit, m_attribut);
Cavg += Algo::Surface::Geometry::volumeCentroid<PFP, EMBV>(m_map, dit, m_attribut);
++degree;
}
Cavg /= degree;
......@@ -128,7 +129,7 @@ public:
Traversor3VF<typename PFP::MAP> travVF(m_map, d);
for(Dart dit = travVF.begin() ; dit != travVF.end() ; dit = travVF.next())
{
Aavg += Algo::Surface::Geometry::faceCentroidGen<PFP, EMBV, EMB>(m_map, dit, m_attribut);
Aavg += Algo::Surface::Geometry::faceCentroid<PFP, EMBV>(m_map, dit, m_attribut);
++degree;
}
Aavg /= degree;
......@@ -156,10 +157,11 @@ public:
}
};
template <typename PFP, typename EMBV, typename EMB>
template <typename PFP, typename EMBV>
class MJ96EdgeVertexFunctor : public FunctorType
{
protected:
typedef typename EMBV::DATA_TYPE EMB;
typename PFP::MAP& m_map ;
EMBV& m_attribut;
//Algo::Volume::IHM::AttributeHandler_IHM<typename PFP::VEC3, VERTEX>& m_position ;
......@@ -217,7 +219,7 @@ public:
Traversor3EW<typename PFP::MAP> travEW(m_map, d2);
for(Dart dit = travEW.begin() ; dit != travEW.end() ; dit = travEW.next())
{
Cavg += Algo::Surface::Geometry::volumeCentroidGen<PFP, EMBV, EMB>(m_map, dit, m_attribut);
Cavg += Algo::Surface::Geometry::volumeCentroid<PFP, EMBV>(m_map, dit, m_attribut);
++degree;
}
Cavg /= degree;
......@@ -227,7 +229,7 @@ public:
Traversor3EF<typename PFP::MAP> travEF(m_map, d2);
for(Dart dit = travEF.begin() ; dit != travEF.end() ; dit = travEF.next())
{
Aavg += Algo::Surface::Geometry::faceCentroidGen<PFP, EMBV, EMB>(m_map, dit, m_attribut);
Aavg += Algo::Surface::Geometry::faceCentroid<PFP, EMBV>(m_map, dit, m_attribut);
++degree;
}
Aavg /= degree;
......@@ -247,10 +249,11 @@ public:
}
};
template <typename PFP, typename EMBV, typename EMB>
template <typename PFP, typename EMBV>
class MJ96FaceVertexFunctor : public FunctorType
{
protected:
typedef typename EMBV::DATA_TYPE EMB;
typename PFP::MAP& m_map ;
EMBV& m_attribut;
//Algo::Volume::IHM::AttributeHandler_IHM<typename PFP::VEC3, VERTEX>& m_position ;
......@@ -291,10 +294,10 @@ public:
m_map.decCurrentLevel() ;
//face points
EMB C0 = Algo::Surface::Geometry::volumeCentroidGen<PFP, EMBV, EMB>(m_map, df, m_attribut);
EMB C1 = Algo::Surface::Geometry::volumeCentroidGen<PFP, EMBV, EMB>(m_map, m_map.phi3(df), m_attribut);
EMB C0 = Algo::Surface::Geometry::volumeCentroid<PFP, EMBV>(m_map, df, m_attribut);
EMB C1 = Algo::Surface::Geometry::volumeCentroid<PFP, EMBV>(m_map, m_map.phi3(df), m_attribut);
EMB A = Algo::Surface::Geometry::faceCentroidGen<PFP, EMBV, EMB>(m_map, df, m_attribut);
EMB A = Algo::Surface::Geometry::faceCentroid<PFP, EMBV>(m_map, df, m_attribut);
EMB fp = C0 + A * 2 + C1;
fp /= 4;
......@@ -309,10 +312,11 @@ public:
};
template <typename PFP, typename EMBV, typename EMB>
template <typename PFP, typename EMBV>
class MJ96VolumeVertexFunctor : public FunctorType
{
protected:
typedef typename EMBV::DATA_TYPE EMB;
typename PFP::MAP& m_map ;
EMBV& m_attribut;
//Algo::Volume::IHM::AttributeHandler_IHM<typename PFP::VEC3, VERTEX>& m_position ;
......@@ -332,7 +336,7 @@ public:
//cell points : these points are the average of the
//vertices of the lattice that bound the cell
EMB p = Algo::Surface::Geometry::volumeCentroidGen<PFP, EMBV, EMB>(m_map,df,m_attribut);
EMB p = Algo::Surface::Geometry::volumeCentroid<PFP, EMBV>(m_map,df,m_attribut);
m_map.incCurrentLevel() ;
......
......@@ -90,6 +90,8 @@ public:
void swapEdges(Dart d, Dart e);
Dart swap2To2(Dart d);
void swap4To4(Dart d);
Dart swap2To3(Dart d);
void swapGen3To2(Dart d);
......
......@@ -171,6 +171,61 @@ Dart Map3MR<PFP>::swap2To3(Dart d)
return m_map.phi1(d2_1);
}
template <typename PFP>
Dart Map3MR<PFP>::swap2To2(Dart d)
{
std::vector<Dart> edges;
Dart d2_1 = m_map.phi_1(m_map.phi2(d));
m_map.mergeVolumes(d,false);
Dart d2 = m_map.phi1(d2_1);
Dart d3 = m_map.phi3(d2);
m_map.flipEdge(d2);
m_map.flipBackEdge(d3);
Dart e = m_map.phi2(d2) ;
m_map.template copyDartEmbedding<VERTEX>(d2, m_map.phi1(e)) ;
m_map.template copyDartEmbedding<VERTEX>(e, m_map.phi1(d2)) ;
Dart e3 = m_map.phi2(d3);
m_map.template copyDartEmbedding<VERTEX>(d3, m_map.phi1(e3)) ;
m_map.template copyDartEmbedding<VERTEX>(e3, m_map.phi1(d3)) ;
Dart stop = m_map.phi_1(d2_1);
Dart dit = stop;
do
{
edges.push_back(dit);
dit = m_map.phi1(m_map.phi2(m_map.phi1(dit)));
}
while(dit != stop);
m_map.splitVolumeWithFace(edges,m_map.phi_1(m_map.phi3(d)));
return m_map.phi2(stop);
}
template <typename PFP>
void Map3MR<PFP>::swap4To4(Dart d)
{
Dart e = m_map.phi2(m_map.phi3(d));
Dart dd = m_map.phi2(d);
//unsew middle crossing darts
m_map.unsewVolumes(d);
m_map.unsewVolumes(m_map.phi2(m_map.phi3(dd)));
Dart d1 = swap2To2(dd);
Dart d2 = swap2To2(e);
//sew middle darts so that they do not cross
m_map.sewVolumes(m_map.phi2(d1),m_map.phi2(m_map.phi3(d2)));
m_map.sewVolumes(m_map.phi2(m_map.phi3(d1)),m_map.phi2(d2));
}
template <typename PFP>
void Map3MR<PFP>::swapGen3To2(Dart d)
......@@ -187,7 +242,7 @@ void Map3MR<PFP>::swapGen3To2(Dart d)
dit = m_map.phi2(swap2To3(dit));
}
//Volume::Modelisation::Tetrahedralization::swap2To2<PFP>(m_map, dit);
swap2To2(dit);
}
else
{
......@@ -195,17 +250,19 @@ void Map3MR<PFP>::swapGen3To2(Dart d)
{
dit = m_map.phi2(swap2To3(dit));
}
//Volume::Modelisation::Tetrahedralization::swap4To4<PFP>(m_map, m_map.alpha2(dit));
std::cout << "balalbalabaaaaaaaaaaaaaaaaaaa" << std::endl;
swap4To4(m_map.alpha2(dit));
}
}
else if (n == 3)
{
Dart dres = swap2To3(d);
//Volume::Modelisation::Tetrahedralization::swap2To2<PFP>(m_map, m_map.phi2(dres));
swap2To2(m_map.phi2(dres));
}
else // si (n == 2)
{
//Volume::Modelisation::Tetrahedralization::swap2To2<PFP>(m_map, d);
std::cout << "arrrrrrghhhhhhhhhhhh" << std::endl;
swap2To2(d);
}
}
......@@ -244,8 +301,23 @@ void Map3MR<PFP>::addNewLevelSqrt3(bool embedNewVertices, VertexAttribute<typena
m_map.setCurrentLevel(m_map.getMaxLevel());
DartMarkerStore m(m_map);
DartMarkerStore newBoundaryV(m_map);
DartMarkerStore newV(m_map);
if(embedNewVertices)
{
TraversorV<typename PFP::MAP> tW(m_map);
for(Dart dit = tW.begin() ; dit != tW.end() ; dit = tW.next())
{
m_map.decCurrentLevel();
unsigned int emb = m_map.template getEmbedding<VERTEX>(dit);
m_map.incCurrentLevel();
unsigned int newemb = m_map.template setOrbitEmbeddingOnNewCell<VERTEX>(dit) ;
m_map.template copyCell<VERTEX>(newemb, emb);