Commit acd4feb8 authored by Pierre Kraemer's avatar Pierre Kraemer

optim gestion plongement dans operateurs EmbeddedMap2

parent 17225370
......@@ -92,7 +92,7 @@ private:
// Assigne un nouveau plongement au sommet. Les anciens plongements sont libérés.
void newVertex(Dart d) {
setOrbitEmbeddingNewCell<VERTEX>(d);
setOrbitEmbeddingOnNewCell<VERTEX>(d);
}
public:
......
......@@ -95,7 +95,7 @@ private:
// Assigne un nouveau plongement au sommet. Les anciens plongements sont libérés.
void newVertex(Dart d) {
setOrbitEmbeddingNewCell(VERTEX,d);
setOrbitEmbeddingOnNewCell(VERTEX,d);
}
public:
......
......@@ -898,7 +898,7 @@ void EdgeSelector_Curvature<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo)
Dart d2 = m.phi2(m.phi_1(d)) ;
Dart dd2 = m.phi2(m.phi_1(dd)) ;
m.extractTrianglePair(d) ;
unsigned int newV = m.template setOrbitEmbeddingNewCell<VERTEX>(d2) ;
unsigned int newV = m.template setOrbitEmbeddingOnNewCell<VERTEX>(d2) ;
this->m_position[newV] = m_positionApproximator->getApprox(d) ;
// compute things on the coarse version of the mesh
......
......@@ -211,7 +211,7 @@ void Approximator_MidEdge<PFP>::approximate(Dart d)
// temporary edge collapse
m.extractTrianglePair(d) ;
unsigned int newV = m.template setOrbitEmbeddingNewCell<VERTEX>(d2) ;
unsigned int newV = m.template setOrbitEmbeddingOnNewCell<VERTEX>(d2) ;
this->m_attrV[0]->operator[](newV) = this->m_approx[0][d] ;
// compute the detail vector
......@@ -260,7 +260,7 @@ void Approximator_HalfCollapse<PFP>::approximate(Dart d)
// temporary edge collapse
m.extractTrianglePair(d) ;
unsigned int newV = m.template setOrbitEmbeddingNewCell<VERTEX>(d2) ;
unsigned int newV = m.template setOrbitEmbeddingOnNewCell<VERTEX>(d2) ;
for (unsigned int i = 0 ; i < this->m_attrV.size() ; ++i)
{
this->m_attrV[i]->operator[](newV) = this->m_approx[i][d] ;
......
......@@ -349,7 +349,7 @@ T& AttributeHandler_IHM<T, ORBIT>::operator[](Dart d)
if(index == EMBNULL)
{
index = m->setOrbitEmbeddingNewCell<ORBIT>(d) ;
index = m->setOrbitEmbeddingOnNewCell<ORBIT>(d) ;
m->m_nextLevelCell[orbit]->operator[](index) = EMBNULL ;
}
......
......@@ -616,7 +616,7 @@ T& AttributeHandler_IHM<T, ORBIT>::operator[](Dart d)
if(index == EMBNULL)
{
index = m->setOrbitEmbeddingNewCell<ORBIT>(d) ;
index = m->setOrbitEmbeddingOnNewCell<ORBIT>(d) ;
m->m_nextLevelCell[orbit]->operator[](index) = EMBNULL ;
}
......
......@@ -176,7 +176,7 @@ void Primitive3D<PFP>::embedHexaGrid(float x, float y, float z)
typename PFP::VEC3 pos(-x/2.0f + dx*float(k), -y/2.0f + dy*float(j), -z/2.0f + dz*float(i));
Dart d = m_tableVertDarts[ i*nbs+j*(m_nx+1)+k ];
m_map.template setOrbitEmbeddingNewCell<VERTEX>(d);
m_map.template setOrbitEmbeddingOnNewCell<VERTEX>(d);
m_positions[d] = pos;
}
}
......
......@@ -69,9 +69,9 @@ void Map2MR<PFP>::addNewLevel(bool triQuad, bool embedNewVertices)
if(!shareVertexEmbeddings && embedNewVertices)
{
if(m_map.template getEmbedding<VERTEX>(d) == EMBNULL)
m_map.template setOrbitEmbeddingNewCell<VERTEX>(d) ;
m_map.template setOrbitEmbeddingOnNewCell<VERTEX>(d) ;
if(m_map.template getEmbedding<VERTEX>(m_map.phi1(d)) == EMBNULL)
m_map.template setOrbitEmbeddingNewCell<VERTEX>(d) ;
m_map.template setOrbitEmbeddingOnNewCell<VERTEX>(d) ;
}
m_map.cutEdge(d) ;
......@@ -79,7 +79,7 @@ void Map2MR<PFP>::addNewLevel(bool triQuad, bool embedNewVertices)
travE.skip(m_map.phi1(d)) ;
if(embedNewVertices)
m_map.template setOrbitEmbeddingNewCell<VERTEX>(m_map.phi1(d)) ;
m_map.template setOrbitEmbeddingOnNewCell<VERTEX>(m_map.phi1(d)) ;
}
// split faces
......@@ -124,7 +124,7 @@ void Map2MR<PFP>::addNewLevel(bool triQuad, bool embedNewVertices)
travF.skip(dd) ;
if(embedNewVertices)
m_map.template setOrbitEmbeddingNewCell<VERTEX>(m_map.phi1(ne)) ;
m_map.template setOrbitEmbeddingOnNewCell<VERTEX>(m_map.phi1(ne)) ;
dd = m_map.phi1(m_map.phi1(next)) ;
while(dd != ne) // turn around the face and insert new edges
......@@ -169,7 +169,7 @@ void Map2MR<PFP>::addNewLevelSqrt3(bool embedNewVertices)
Dart cd = m_map.phi2(x);
if(embedNewVertices)
m_map.template setOrbitEmbeddingNewCell<VERTEX>(cd) ;
m_map.template setOrbitEmbeddingOnNewCell<VERTEX>(cd) ;
Dart fit = cd ;
do
......
......@@ -83,7 +83,7 @@ void Map3MR<PFP>::swapEdges(Dart d, Dart e)
}
if(m_map.template isOrbitEmbedded<VOLUME>())
m_map.template setOrbitEmbeddingNewCell<VOLUME>(d);
m_map.template setOrbitEmbeddingOnNewCell<VOLUME>(d);
// propagateDartRelation(d, m_phi2) ;
......
......@@ -73,7 +73,7 @@ void Map3MR<PFP>::swapEdges(Dart d, Dart e)
}
if(m_map.template isOrbitEmbedded<VOLUME>())
m_map.template setOrbitEmbeddingNewCell<VOLUME>(d);
m_map.template setOrbitEmbeddingOnNewCell<VOLUME>(d);
}
}
......@@ -203,9 +203,9 @@ void Map3MR<PFP>::addNewLevelTetraOcta(bool embedNewVertices)
// if(!shareVertexEmbeddings)
// {
// if(getEmbedding<VERTEX>(d) == EMBNULL)
// setOrbitEmbeddingNewCell<VERTEX>(d) ;
// setOrbitEmbeddingOnNewCell<VERTEX>(d) ;
// if(getEmbedding<VERTEX>(phi1(d)) == EMBNULL)
// setOrbitEmbeddingNewCell<VERTEX>(d) ;
// setOrbitEmbeddingOnNewCell<VERTEX>(d) ;
// }
m_map.cutEdge(d) ;
......@@ -214,7 +214,7 @@ void Map3MR<PFP>::addNewLevelTetraOcta(bool embedNewVertices)
// When importing MR files
// if(embedNewVertices)
// m_map.template setOrbitEmbeddingNewCell<VERTEX>(m_map.phi1(d)) ;
// m_map.template setOrbitEmbeddingOnNewCell<VERTEX>(m_map.phi1(d)) ;
}
//2. split faces - triangular faces
......@@ -332,7 +332,7 @@ void Map3MR<PFP>::addNewLevelTetraOcta(bool embedNewVertices)
// When importing MR files
//if(embedNewVertices)
// m_map.template setOrbitEmbeddingNewCell<VERTEX>(x) ;
// m_map.template setOrbitEmbeddingOnNewCell<VERTEX>(x) ;
}
m_map.setCurrentLevel(m_map.getMaxLevel() - 1) ;
}
......@@ -368,9 +368,9 @@ void Map3MR<PFP>::addNewLevelHexa(bool embedNewVertices)
// if(!shareVertexEmbeddings)
// {
// if(getEmbedding<VERTEX>(d) == EMBNULL)
// setOrbitEmbeddingNewCell<VERTEX>(d) ;
// setOrbitEmbeddingOnNewCell<VERTEX>(d) ;
// if(getEmbedding<VERTEX>(phi1(d)) == EMBNULL)
// setOrbitEmbeddingNewCell<VERTEX>(phi1(d)) ;
// setOrbitEmbeddingOnNewCell<VERTEX>(phi1(d)) ;
// }
m_map.cutEdge(d) ;
......@@ -379,7 +379,7 @@ void Map3MR<PFP>::addNewLevelHexa(bool embedNewVertices)
// When importing MR files : activated for DEBUG
// if(embedNewVertices)
// setOrbitEmbeddingNewCell<VERTEX>(phi1(d)) ;
// setOrbitEmbeddingOnNewCell<VERTEX>(phi1(d)) ;
}
//2. split faces - quadrangule faces
......@@ -400,7 +400,7 @@ void Map3MR<PFP>::addNewLevelHexa(bool embedNewVertices)
// When importing MR files : activated for DEBUG
// if(embedNewVertices)
// setOrbitEmbeddingNewCell<VERTEX>(phi1(ne)) ;
// setOrbitEmbeddingOnNewCell<VERTEX>(phi1(ne)) ;
dd = m_map.phi1(m_map.phi1(next)) ;
while(dd != ne) // turn around the face and insert new edges
......@@ -530,9 +530,9 @@ void Map3MR<PFP>::addNewLevelHexa(bool embedNewVertices)
// if(!shareVertexEmbeddings)
// {
// if(getEmbedding<VERTEX>(d) == EMBNULL)
// setOrbitEmbeddingNewCell<VERTEX>(d) ;
// setOrbitEmbeddingOnNewCell<VERTEX>(d) ;
// if(getEmbedding<VERTEX>(phi1(d)) == EMBNULL)
// setOrbitEmbeddingNewCell<VERTEX>(d) ;
// setOrbitEmbeddingOnNewCell<VERTEX>(d) ;
// }
//
// cutEdge(d) ;
......@@ -541,7 +541,7 @@ void Map3MR<PFP>::addNewLevelHexa(bool embedNewVertices)
//
//// When importing MR files : activated for DEBUG
// if(embedNewVertices)
// setOrbitEmbeddingNewCell<VERTEX>(phi1(d)) ;
// setOrbitEmbeddingOnNewCell<VERTEX>(phi1(d)) ;
// }
//
// //2. split faces - quadrangule faces
......@@ -587,7 +587,7 @@ void Map3MR<PFP>::addNewLevelHexa(bool embedNewVertices)
//
// // When importing MR files : activated for DEBUG
// if(embedNewVertices)
// setOrbitEmbeddingNewCell<VERTEX>(phi1(ne)) ;
// setOrbitEmbeddingOnNewCell<VERTEX>(phi1(ne)) ;
//
// dd = phi1(phi1(next)) ;
// while(dd != ne) // turn around the face and insert new edges
......
......@@ -174,9 +174,9 @@ void ProgressiveMesh<PFP>::createPM(unsigned int percentWantedVertices)
edgeCollapse(vs) ; // collapse edge
unsigned int newV = m_map.template setOrbitEmbeddingNewCell<VERTEX>(d2) ;
unsigned int newE1 = m_map.template setOrbitEmbeddingNewCell<EDGE>(d2) ;
unsigned int newE2 = m_map.template setOrbitEmbeddingNewCell<EDGE>(dd2) ;
unsigned int newV = m_map.template setOrbitEmbeddingOnNewCell<VERTEX>(d2) ;
unsigned int newE1 = m_map.template setOrbitEmbeddingOnNewCell<EDGE>(d2) ;
unsigned int newE2 = m_map.template setOrbitEmbeddingOnNewCell<EDGE>(dd2) ;
vs->setApproxV(newV) ;
vs->setApproxE1(newE1) ;
vs->setApproxE2(newE2) ;
......
......@@ -132,9 +132,9 @@ void VolumetricProgressiveMesh<PFP>::createPM(unsigned int percentWantedVertices
edgeCollapse(vs) ; // collapse edge
unsigned int newV = m_map.template setOrbitEmbeddingNewCell<VERTEX>(d2) ;
unsigned int newE1 = m_map.template setOrbitEmbeddingNewCell<EDGE>(d2) ;
unsigned int newE2 = m_map.template setOrbitEmbeddingNewCell<EDGE>(dd2) ;
unsigned int newV = m_map.template setOrbitEmbeddingOnNewCell<VERTEX>(d2) ;
unsigned int newE1 = m_map.template setOrbitEmbeddingOnNewCell<EDGE>(d2) ;
unsigned int newE2 = m_map.template setOrbitEmbeddingOnNewCell<EDGE>(dd2) ;
vs->setApproxV(newV) ;
vs->setApproxE1(newE1) ;
vs->setApproxE2(newE2) ;
......
......@@ -121,7 +121,7 @@ void AttribMap::bijectiveOrbitEmbedding()
{
if (counter[d] > 0)
{
unsigned int newEmb = setOrbitEmbeddingNewCell<ORBIT>(d) ;
unsigned int newEmb = setOrbitEmbeddingOnNewCell<ORBIT>(d) ;
copyCell<ORBIT>(newEmb, emb) ;
}
counter[d]++ ;
......
......@@ -138,7 +138,7 @@ inline T& AttributeHandler<T, ORBIT>::operator[](Dart d)
unsigned int a = m_map->getEmbedding<ORBIT>(d) ;
/*
if (a == EMBNULL)
a = m_map->setOrbitEmbeddingNewCell<ORBIT>(d) ;
a = m_map->setOrbitEmbeddingOnNewCell<ORBIT>(d) ;
*/
return m_attrib->operator[](a) ;
}
......
......@@ -133,7 +133,7 @@ public:
unsigned int a = m_map.getEmbedding<CELL>(d) ;
// if (a == EMBNULL)
// a = m_map.setOrbitEmbeddingNewCell<CELL>(d) ;
// a = m_map.setOrbitEmbeddingOnNewCell<CELL>(d) ;
m_markVector->operator[](a).setMark(m_mark) ;
}
......@@ -147,7 +147,7 @@ public:
unsigned int a = m_map.getEmbedding<CELL>(d) ;
// if (a == EMBNULL)
// a = m_map.setOrbitEmbeddingNewCell<CELL>(d) ;
// a = m_map.setOrbitEmbeddingOnNewCell<CELL>(d) ;
m_markVector->operator[](a).unsetMark(m_mark) ;
}
......
......@@ -46,7 +46,6 @@ protected:
Mark m_mark ;
AttributeMultiVector<Mark>* m_markVector ;
unsigned int m_thread ;
// unsigned int m_idReg ;
bool releaseOnDestruct ;
public:
......
......@@ -146,7 +146,7 @@ ECellDart<DIM> ECellDart<DIM>::operator[](Dart d)
unsigned int a = s_map->getEmbedding(d,DIM);
if (a == EMBNULL)
a = s_map->setOrbitEmbeddingNewCell(DIM, d);
a = s_map->setOrbitEmbeddingOnNewCell(DIM, d);
return ECellDart<DIM>(a);
}
......
......@@ -404,7 +404,7 @@ public:
* @return index of the attribute in table
*/
template <unsigned int ORBIT>
unsigned int setOrbitEmbeddingNewCell(Dart d) ;
unsigned int setOrbitEmbeddingOnNewCell(Dart d) ;
/**
* Associate an new cell to all darts of an orbit
......
......@@ -373,7 +373,7 @@ inline void GenericMap::initOrbitEmbedding(Dart d, unsigned int em)
}
template <unsigned int ORBIT>
inline unsigned int GenericMap::setOrbitEmbeddingNewCell(Dart d)
inline unsigned int GenericMap::setOrbitEmbeddingOnNewCell(Dart d)
{
assert(isOrbitEmbedded<ORBIT>() || !"Invalid parameter: orbit not embedded");
unsigned int em = newCell<ORBIT>();
......@@ -396,12 +396,12 @@ inline void GenericMap::copyCell(Dart d, Dart e)
assert(isOrbitEmbedded<ORBIT>() || !"Invalid parameter: orbit not embedded");
unsigned int dE = getEmbedding<ORBIT>(d) ;
unsigned int eE = getEmbedding<ORBIT>(e) ;
if(eE != EMBNULL) // if the source is NULL, nothing to copy
{
if(dE == EMBNULL) // if the dest is NULL, create a new cell
dE = setOrbitEmbeddingNewCell<ORBIT>(d) ;
// if(eE != EMBNULL) // if the source is NULL, nothing to copy
// {
// if(dE == EMBNULL) // if the dest is NULL, create a new cell
// dE = setOrbitEmbeddingOnNewCell<ORBIT>(d) ;
m_attribs[ORBIT].copyLine(dE, eE) ; // copy the data
}
// }
}
template <unsigned int ORBIT>
......
......@@ -111,7 +111,7 @@ void ImplicitHierarchicalMap3::swapEdges(Dart d, Dart e)
}
if(isOrbitEmbedded<VOLUME>())
setOrbitEmbeddingNewCell<VOLUME>(d);
setOrbitEmbeddingOnNewCell<VOLUME>(d);
}
}
......
......@@ -44,7 +44,7 @@ void EmbeddedGMap2::splitVertex(Dart d, Dart e)
setDartEmbedding<VERTEX>(beta2(phi1(dd)), vEmb) ;
setDartEmbedding<VERTEX>(beta0(dd), vEmb) ;
setOrbitEmbeddingNewCell<VERTEX>(e) ;
setOrbitEmbeddingOnNewCell<VERTEX>(e) ;
copyCell<VERTEX>(e, d) ;
}
......@@ -91,7 +91,7 @@ Dart EmbeddedGMap2::cutEdge(Dart d)
unsigned int eEmb = getEmbedding<EDGE>(d) ;
setDartEmbedding<EDGE>(phi2(d), eEmb) ;
setDartEmbedding<EDGE>(beta0(d), eEmb) ;
setOrbitEmbeddingNewCell<EDGE>(nd) ;
setOrbitEmbeddingOnNewCell<EDGE>(nd) ;
copyCell<EDGE>(nd, d) ;
}
......@@ -264,7 +264,7 @@ bool EmbeddedGMap2::flipBackEdge(Dart d)
// {
// if(!sameFace(d,e))
// {
// setOrbitEmbeddingNewCell<FACE>(e);
// setOrbitEmbeddingOnNewCell<FACE>(e);
// copyCell<FACE>(e, d) ;
// }
// else
......@@ -282,7 +282,7 @@ bool EmbeddedGMap2::flipBackEdge(Dart d)
//
// if (isOrbitEmbedded<VERTEX>())
// {
// setOrbitEmbeddingNewCell<VERTEX>(d);
// setOrbitEmbeddingOnNewCell<VERTEX>(d);
// copyCell<VERTEX>(d, dPrev);
// }
//
......@@ -290,7 +290,7 @@ bool EmbeddedGMap2::flipBackEdge(Dart d)
// {
// if(!sameFace(d, dPrev))
// {
// setOrbitEmbeddingNewCell<FACE>(d);
// setOrbitEmbeddingOnNewCell<FACE>(d);
// copyCell<FACE>(d, dPrev) ;
// }
// else
......@@ -332,7 +332,7 @@ void EmbeddedGMap2::unsewFaces(Dart d)
{
if(!sameVertex(d,e))
{
setOrbitEmbeddingNewCell<VERTEX>(e);
setOrbitEmbeddingOnNewCell<VERTEX>(e);
copyCell<VERTEX>(e, d);
}
......@@ -341,14 +341,14 @@ void EmbeddedGMap2::unsewFaces(Dart d)
if(!sameVertex(d,e))
{
setOrbitEmbeddingNewCell<VERTEX>(e);
setOrbitEmbeddingOnNewCell<VERTEX>(e);
copyCell<VERTEX>(e, d);
}
}
if (isOrbitEmbedded<EDGE>())
{
setOrbitEmbeddingNewCell<EDGE>(e);
setOrbitEmbeddingOnNewCell<EDGE>(e);
copyCell<EDGE>(e, d);
}
}
......@@ -399,7 +399,7 @@ void EmbeddedGMap2::splitFace(Dart d, Dart e)
unsigned int fEmb = getEmbedding<FACE>(d) ;
setDartEmbedding<FACE>(phi_1(d), fEmb) ;
setDartEmbedding<FACE>(beta1(phi_1(d)), fEmb) ;
setOrbitEmbeddingNewCell<FACE>(e) ;
setOrbitEmbeddingOnNewCell<FACE>(e) ;
copyCell<FACE>(e, d) ;
}
}
......
......@@ -59,7 +59,7 @@ Dart EmbeddedGMap3::cutEdge(Dart d)
} while(e != d) ;
// embed a new cell for the new edge and copy the attributes' line (c) Lionel
setOrbitEmbeddingNewCell<EDGE>(phi1(d)) ;
setOrbitEmbeddingOnNewCell<EDGE>(phi1(d)) ;
copyCell<EDGE>(phi1(d), d) ;
}
......@@ -169,7 +169,7 @@ void EmbeddedGMap3::splitFace(Dart d, Dart e)
setDartEmbedding<FACE>(beta1(ee), fEmb) ;
setDartEmbedding<FACE>(beta0(beta1(ee)), fEmb) ;
setDartEmbedding<FACE>(beta1(beta0(beta1(ee))), fEmb) ;
setOrbitEmbeddingNewCell<FACE>(e);
setOrbitEmbeddingOnNewCell<FACE>(e);
copyCell<FACE>(e, d);
}
......@@ -248,7 +248,7 @@ void EmbeddedGMap3::unsewVolumes(Dart d)
if(!sameVertex(dit, dd))
{
setOrbitEmbedding<VERTEX>(dit, getEmbedding<VERTEX>(dit)) ;
setOrbitEmbeddingNewCell<VERTEX>(dd);
setOrbitEmbeddingOnNewCell<VERTEX>(dd);
copyCell<VERTEX>(dd, dit);
}
else
......@@ -265,7 +265,7 @@ void EmbeddedGMap3::unsewVolumes(Dart d)
if(!sameEdge(dit, dd))
{
setOrbitEmbedding<EDGE>(dit, getEmbedding<EDGE>(dit)) ;
setOrbitEmbeddingNewCell<EDGE>(dd);
setOrbitEmbeddingOnNewCell<EDGE>(dd);
copyCell<EDGE>(dd, dit);
}
else
......@@ -286,7 +286,7 @@ void EmbeddedGMap3::unsewVolumes(Dart d)
// embed the unsewn face with the face embedding
if (isOrbitEmbedded<FACE>())
{
setOrbitEmbeddingNewCell<FACE>(dd);
setOrbitEmbeddingOnNewCell<FACE>(dd);
copyCell<FACE>(dd, d);
}
}
......@@ -348,7 +348,7 @@ void EmbeddedGMap3::splitVolume(std::vector<Dart>& vd)
{
Dart v = vd.front() ;
Dart v23 = alpha2(v) ;
setOrbitEmbeddingNewCell<VOLUME>(v23) ;
setOrbitEmbeddingOnNewCell<VOLUME>(v23) ;
copyCell<VOLUME>(v23, v) ;
}
}
......
......@@ -39,9 +39,8 @@ void EmbeddedMap2::splitVertex(Dart d, Dart e)
if (isOrbitEmbedded<VERTEX>())
{
copyDartEmbedding<VERTEX>(phi1(dd), d) ;
copyDartEmbedding<VERTEX>(phi1(ee), e) ;
setOrbitEmbeddingNewCell<VERTEX>(e) ;
initDartEmbedding<VERTEX>(phi1(dd), getEmbedding<VERTEX>(d)) ;
setOrbitEmbeddingOnNewCell<VERTEX>(e) ;
copyCell<VERTEX>(e, d) ;
}
......@@ -52,8 +51,8 @@ void EmbeddedMap2::splitVertex(Dart d, Dart e)
if(isOrbitEmbedded<FACE>())
{
copyDartEmbedding<FACE>(phi1(dd), dd) ;
copyDartEmbedding<FACE>(phi1(ee), ee) ;
initDartEmbedding<FACE>(phi1(dd), getEmbedding<FACE>(dd)) ;
initDartEmbedding<FACE>(phi1(ee), getEmbedding<FACE>(ee)) ;
}
}
......@@ -81,16 +80,16 @@ Dart EmbeddedMap2::cutEdge(Dart d)
if (isOrbitEmbedded<EDGE>())
{
copyDartEmbedding<EDGE>(phi2(d), d) ;
setOrbitEmbeddingNewCell<EDGE>(nd) ;
initDartEmbedding<EDGE>(phi2(d), getEmbedding<EDGE>(d)) ;
setOrbitEmbeddingOnNewCell<EDGE>(nd) ;
copyCell<EDGE>(nd, d) ;
}
if(isOrbitEmbedded<FACE>())
{
copyDartEmbedding<FACE>(nd, d) ;
initDartEmbedding<FACE>(nd, getEmbedding<FACE>(d)) ;
Dart e = phi2(nd) ;
copyDartEmbedding<FACE>(phi1(e), e) ;
initDartEmbedding<FACE>(phi1(e), getEmbedding<FACE>(e)) ;
}
return nd;
......@@ -187,11 +186,13 @@ bool EmbeddedMap2::flipEdge(Dart d)
copyDartEmbedding<VERTEX>(d, phi1(e)) ;
copyDartEmbedding<VERTEX>(e, phi1(d)) ;
}
if (isOrbitEmbedded<FACE>())
{
copyDartEmbedding<FACE>(phi_1(d), d) ;
copyDartEmbedding<FACE>(phi_1(e), e) ;
}
return true ;
}
return false ;
......@@ -208,11 +209,13 @@ bool EmbeddedMap2::flipBackEdge(Dart d)
copyDartEmbedding<VERTEX>(d, phi1(e)) ;
copyDartEmbedding<VERTEX>(e, phi1(d)) ;
}
if (isOrbitEmbedded<FACE>())
{
copyDartEmbedding<FACE>(phi1(d), d) ;
copyDartEmbedding<FACE>(phi1(e), e) ;
}
return true ;
}
return false ;
......@@ -238,7 +241,7 @@ void EmbeddedMap2::swapEdges(Dart d, Dart e)
}
if(isOrbitEmbedded<VOLUME>())
setOrbitEmbeddingNewCell<VOLUME>(d);
setOrbitEmbeddingOnNewCell<VOLUME>(d);
}
//void EmbeddedMap2::insertEdgeInVertex(Dart d, Dart e)
......@@ -254,7 +257,7 @@ void EmbeddedMap2::swapEdges(Dart d, Dart e)
// {
// if(!sameFace(d,e))
// {
// setOrbitEmbeddingNewCell<FACE>(e);
// setOrbitEmbeddingOnNewCell<FACE>(e);
// copyCell<FACE>(e, d) ;
// }
// else
......@@ -272,7 +275,7 @@ void EmbeddedMap2::swapEdges(Dart d, Dart e)
//
// if (isOrbitEmbedded<VERTEX>())
// {
// setOrbitEmbeddingNewCell<VERTEX>(d);
// setOrbitEmbeddingOnNewCell<VERTEX>(d);
// copyCell<VERTEX>(d, dPrev);
// }
//
......@@ -280,7 +283,7 @@ void EmbeddedMap2::swapEdges(Dart d, Dart e)
// {
// if(!sameFace(d, dPrev))
// {
// setOrbitEmbeddingNewCell<FACE>(d);
// setOrbitEmbeddingOnNewCell<FACE>(d);
// copyCell<FACE>(d, dPrev) ;
// }
// else
......@@ -322,21 +325,21 @@ void EmbeddedMap2::unsewFaces(Dart d)
Dart ee = phi1(e) ;
if(!sameVertex(d, ee))
{
setOrbitEmbeddingNewCell<VERTEX>(ee);
setOrbitEmbeddingOnNewCell<VERTEX>(ee);
copyCell<VERTEX>(ee, d);
}
Dart dd = phi1(d) ;
if(!sameVertex(e, dd))
{
setOrbitEmbeddingNewCell<VERTEX>(dd);
setOrbitEmbeddingOnNewCell<VERTEX>(dd);
copyCell<VERTEX>(dd, e);
}
}
if (isOrbitEmbedded<EDGE>())
{
setOrbitEmbeddingNewCell<EDGE>(e);
setOrbitEmbeddingOnNewCell<EDGE>(e);
copyCell<EDGE>(e, d);
}
}
......@@ -365,8 +368,8 @@ void EmbeddedMap2::splitFace(Dart d, Dart e)
if (isOrbitEmbedded<VERTEX>())
{
copyDartEmbedding<VERTEX>(phi_1(e), d) ;
copyDartEmbedding<VERTEX>(phi_1(d), e) ;
initDartEmbedding<VERTEX>(phi_1(e), getEmbedding<VERTEX>(d)) ;
initDartEmbedding<VERTEX>(phi_1(d), getEmbedding<VERTEX>(e)) ;
}
if(isOrbitEmbedded<EDGE>())
......@@ -376,8 +379,8 @@ void EmbeddedMap2::splitFace(Dart d, Dart e)
if (isOrbitEmbedded<FACE>())
{
copyDartEmbedding<FACE>(phi_1(d), d) ;
setOrbitEmbeddingNewCell<FACE>(e) ;
initDartEmbedding<FACE>(phi_1(d), getEmbedding<FACE>(d)) ;
setOrbitEmbeddingOnNewCell<FACE>(e) ;
copyCell<FACE>(e, d) ;
}
}
......@@ -465,23 +468,23 @@ void EmbeddedMap2::splitSurface(std::vector<Dart>& vd, bool firstSideClosed, boo
// embed the vertex embedded from the origin volume to the new darts
if(isOrbitEmbedded<VERTEX>())
{
copyDartEmbedding<VERTEX>(phi2(dit), phi1(dit));
copyDartEmbedding<VERTEX>(phi2(dit2), phi1(dit2));
initDartEmbedding<VERTEX>(phi2(dit), getEmbedding<VERTEX>(phi1(dit)));
initDartEmbedding<VERTEX>(phi2(dit2), getEmbedding<VERTEX>(phi1(dit2)));
}
// embed the edge embedded from the origin volume to the new darts
if(isOrbitEmbedded<EDGE>())
{
unsigned int eEmb = getEmbedding<EDGE>(dit) ;
setDartEmbedding<EDGE>(phi2(dit), eEmb);
setDartEmbedding<EDGE>(phi2(dit2), eEmb);
initDartEmbedding<EDGE>(phi2(dit), getEmbedding<EDGE>(dit));
setOrbitEmbeddingOnNewCell<EDGE>(phi2(dit2));
copyCell<EDGE>(dit2, dit);
}
// embed the volume embedded from the origin volume to the new darts
if(isOrbitEmbedded<VOLUME>())
{
copyDartEmbedding<VOLUME>(phi2(dit), dit);
copyDartEmbedding<VOLUME>(phi2(dit2), dit2);
initDartEmbedding<VOLUME>(phi2(dit), getEmbedding<VOLUME>(dit));
initDartEmbedding<VOLUME>(phi2(dit2), getEmbedding<VOLUME>(dit2));
}
}
}
......@@ -495,13 +498,14 @@ unsigned int EmbeddedMap2::closeHole(Dart d, bool forboundary)
{
if (isOrbitEmbedded<VERTEX>())
{
copyDartEmbedding<VERTEX>(f, phi2(phi_1(f