Commit 4797d495 authored by Sylvain Thery's avatar Sylvain Thery

replace alpha1 by phi2_1 and alpha_1 by phi12 in 2D Algorithms

parent c6dfffb5
......@@ -103,7 +103,7 @@ void test_compact_map(const std::string& name)
do // mark all edges incident to vertex;
{
dm.markOrbit( EDGE, e);
e = myMap.alpha1(e);
e = myMap.phi2_1(e);
}while (e!=d);
}
i++;
......
......@@ -38,17 +38,17 @@ void mergeVertex(typename PFP::MAP& map, const typename PFP::TVEC3& positions, D
Dart dd;
do
{
dd = map.alpha1(d);
dd = map.phi2_1(d);
map.removeEdgeFromVertex(dd);
Dart ee = e;
do
{
if(Geom::testOrientation2D(positions[map.phi1(dd)],positions[ee],positions[map.phi1(ee)])!=Geom::RIGHT
&& Geom::testOrientation2D(positions[map.phi1(dd)],positions[ee],positions[map.phi1(map.alpha1(ee))])==Geom::RIGHT)
&& Geom::testOrientation2D(positions[map.phi1(dd)],positions[ee],positions[map.phi1(map.phi2_1(ee))])==Geom::RIGHT)
{
break;
}
ee = map.alpha1(ee);
ee = map.phi2_1(ee);
} while(ee != e);
map.insertEdgeInVertex(ee,dd);
} while(dd!=d);
......
......@@ -56,18 +56,18 @@ bool edgeCanCollapse(typename PFP::MAP& map, Dart d, AttributeHandler<unsigned i
unsigned int vu1[32]; // pas de vector mais un tableau (find a la main, mais pas d'allocation par reserve)
val_vd -= 3; // evite le -3 dans la boucle
val_vdd -= 3;
Dart vit1 = map.alpha1(map.alpha1(d));
Dart vit1 = map.phi2_1(map.phi2_1(d));
for (unsigned int i = 0; i< val_vd; ++i)
{
unsigned int ve = map.getEmbedding(map.phi2(vit1),VERTEX);
vu1[i] = ve;
vit1 = map.alpha1(vit1);
vit1 = map.phi2_1(vit1);
}
val_vd--; // pour le parcours avec while >=0
Dart vit2 = map.alpha1(map.alpha1(dd));
Dart vit2 = map.phi2_1(map.phi2_1(dd));
for (unsigned int i = 0; i< val_vdd; ++i)
{
unsigned int ve = map.getEmbedding(map.phi2(vit2),VERTEX);
......@@ -79,7 +79,7 @@ bool edgeCanCollapse(typename PFP::MAP& map, Dart d, AttributeHandler<unsigned i
return false;
--j;
}
vit2 = map.alpha1(vit2);
vit2 = map.phi2_1(vit2);
}
return true;
......@@ -96,16 +96,16 @@ bool edgeCanCollapse(typename PFP::MAP& map, Dart d)
int val_vd = 0 ;
Dart tmp = d ;
do { ++val_vd ; tmp = map.alpha1(tmp) ; } while(tmp != d) ;
do { ++val_vd ; tmp = map.phi2_1(tmp) ; } while(tmp != d) ;
int val_vdd = 0 ;
tmp = dd ;
do { ++val_vdd ; tmp = map.alpha1(tmp) ; } while(tmp != dd) ;
do { ++val_vdd ; tmp = map.phi2_1(tmp) ; } while(tmp != dd) ;
int val_vdp = 0 ;
tmp = dp ;
do { ++val_vdp ; tmp = map.alpha1(tmp) ; } while(tmp != dp) ;
do { ++val_vdp ; tmp = map.phi2_1(tmp) ; } while(tmp != dp) ;
int val_vddp = 0 ;
tmp = ddp ;
do { ++val_vddp ; tmp = map.alpha1(tmp) ; } while(tmp != ddp) ;
do { ++val_vddp ; tmp = map.phi2_1(tmp) ; } while(tmp != ddp) ;
if(val_vd + val_vdd < 8 || val_vd + val_vdd > 11 || val_vdp < 5 || val_vddp < 5)
return false;
......@@ -115,18 +115,18 @@ bool edgeCanCollapse(typename PFP::MAP& map, Dart d)
unsigned int vu1[32]; // pas de vector mais un tableau (find a la main, mais pas d'allocation par reserve)
val_vd -= 3; // evite le -3 dans la boucle
val_vdd -= 3;
Dart vit1 = map.alpha1(map.alpha1(d));
Dart vit1 = map.phi2_1(map.phi2_1(d));
for (int i = 0; i < val_vd; ++i)
{
unsigned int ve = map.getEmbedding(map.phi2(vit1),VERTEX);
vu1[i] = ve;
vit1 = map.alpha1(vit1);
vit1 = map.phi2_1(vit1);
}
val_vd--; // pour le parcours avec while >=0
Dart vit2 = map.alpha1(map.alpha1(dd));
Dart vit2 = map.phi2_1(map.phi2_1(dd));
for (int i = 0; i < val_vdd; ++i)
{
unsigned int ve = map.getEmbedding(map.phi2(vit2),VERTEX);
......@@ -138,7 +138,7 @@ bool edgeCanCollapse(typename PFP::MAP& map, Dart d)
return false;
--j;
}
vit2 = map.alpha1(vit2);
vit2 = map.phi2_1(vit2);
}
return true;
......
......@@ -204,19 +204,19 @@ void EdgeSelector_Length<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
{
initEdgeInfo(vit) ; // various optimizations are applied here by
// treating differently :
Dart vit2 = m.alpha_1(m.phi1(vit)) ; // - edges for which the criteria must be recomputed
Dart vit2 = m.phi12(m.phi1(vit)) ; // - edges for which the criteria must be recomputed
Dart stop = m.phi2(vit) ; // - edges that must be re-embedded
do // - edges for which only the collapsibility must be re-tested
{
updateEdgeInfo(vit2, false) ;
updateEdgeInfo(m.phi1(vit2), false) ;
vit2 = m.alpha_1(vit2) ;
vit2 = m.phi12(vit2) ;
} while(vit2 != stop) ;
}
else
updateEdgeInfo(vit, true) ;
vit = m.alpha1(vit) ;
vit = m.phi2_1(vit) ;
} while(vit != d2) ;
cur = edges.begin() ; // set the current edge to the first one
......@@ -399,19 +399,19 @@ void EdgeSelector_QEM<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
{
initEdgeInfo(vit) ; // various optimizations are applied here by
// treating differently :
Dart vit2 = m.alpha_1(m.phi1(vit)) ; // - edges for which the criteria must be recomputed
Dart vit2 = m.phi12(m.phi1(vit)) ; // - edges for which the criteria must be recomputed
Dart stop = m.phi2(vit) ; // - edges that must be re-embedded
do // - edges for which only the collapsibility must be re-tested
{
updateEdgeInfo(vit2, false) ;
updateEdgeInfo(m.phi1(vit2), false) ;
vit2 = m.alpha_1(vit2) ;
vit2 = m.phi12(vit2) ;
} while(vit2 != stop) ;
}
else
updateEdgeInfo(vit, true) ;
vit = m.alpha1(vit) ;
vit = m.phi2_1(vit) ;
} while(vit != d2) ;
cur = edges.begin() ; // set the current edge to the first one
......@@ -604,7 +604,7 @@ void EdgeSelector_QEMml<PFP>::recomputeQuadric(const Dart d, const bool recomput
do {
// Make step
dBack = this->m_map.phi2(dFront) ;
dFront = this->m_map.alpha1(dFront) ;
dFront = this->m_map.phi2_1(dFront) ;
if (dBack != dFront) { // if dFront is no border
quadric[d] += Quadric<REAL>(this->m_position[d],this->m_position[this->m_map.phi2(dFront)],this->m_position[dBack]) ;
......@@ -633,16 +633,16 @@ void EdgeSelector_QEMml<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
else // treating differently :
updateEdgeInfo(vit, true) ;
Dart vit2 = m.alpha_1(m.phi1(vit)) ; // - edges for which the criteria must be recomputed
Dart vit2 = m.phi12(m.phi1(vit)) ; // - edges for which the criteria must be recomputed
Dart stop = m.phi2(vit) ; // - edges that must be re-embedded
do // - edges for which only the collapsibility must be re-tested
{
updateEdgeInfo(vit2, true) ;
updateEdgeInfo(m.phi1(vit2), false) ;
vit2 = m.alpha_1(vit2) ;
vit2 = m.phi12(vit2) ;
} while(vit2 != stop) ;
vit = m.alpha1(vit) ;
vit = m.phi2_1(vit) ;
} while(vit != d2) ;
cur = edges.begin() ; // set the current edge to the first one
......@@ -809,19 +809,19 @@ void EdgeSelector_Curvature<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
{
initEdgeInfo(vit) ; // various optimizations are applied here by
// treating differently :
Dart vit2 = m.alpha_1(m.phi1(vit)) ; // - edges for which the criteria must be recomputed
Dart vit2 = m.phi12(m.phi1(vit)) ; // - edges for which the criteria must be recomputed
Dart stop = m.phi2(vit) ; // - edges that must be re-embedded
do // - edges for which only the collapsibility must be re-tested
{
updateEdgeInfo(vit2, false) ;
updateEdgeInfo(m.phi1(vit2), false) ;
vit2 = m.alpha_1(vit2) ;
vit2 = m.phi12(vit2) ;
} while(vit2 != stop) ;
}
else
updateEdgeInfo(vit, true) ;
vit = m.alpha1(vit) ;
vit = m.phi2_1(vit) ;
} while(vit != d2) ;
cur = edges.begin() ; // set the current edge to the first one
......@@ -1013,19 +1013,19 @@ void EdgeSelector_MinDetail<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
{
initEdgeInfo(vit) ; // various optimizations are applied here by
// treating differently :
Dart vit2 = m.alpha_1(m.phi1(vit)) ; // - edges for which the criteria must be recomputed
Dart vit2 = m.phi12(m.phi1(vit)) ; // - edges for which the criteria must be recomputed
Dart stop = m.phi2(vit) ; // - edges that must be re-embedded
do // - edges for which only the collapsibility must be re-tested
{
updateEdgeInfo(vit2, false) ;
updateEdgeInfo(m.phi1(vit2), false) ;
vit2 = m.alpha_1(vit2) ;
vit2 = m.phi12(vit2) ;
} while(vit2 != stop) ;
}
else
updateEdgeInfo(vit, true) ;
vit = m.alpha1(vit) ;
vit = m.phi2_1(vit) ;
} while(vit != d2) ;
cur = edges.begin() ; // set the current edge to the first one
......
......@@ -64,7 +64,7 @@ void Approximator_QEM<PFP>::approximate(Dart d)
{
Quadric<REAL> q(this->m_attrV[it], this->m_attrV[m.phi1(it)], this->m_attrV[m.phi_1(it)]) ;
q1 += q ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
} while(it != d) ;
// compute the error quadric associated to v2
......@@ -73,7 +73,7 @@ void Approximator_QEM<PFP>::approximate(Dart d)
{
Quadric<REAL> q(this->m_attrV[it], this->m_attrV[m.phi1(it)], this->m_attrV[m.phi_1(it)]) ;
q2 += q ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
} while(it != dd) ;
}
else // if the selector is QEM, use the error quadrics computed by the selector
......@@ -138,7 +138,7 @@ void Approximator_QEMhalfEdge<PFP>::approximate(Dart d)
{
Quadric<REAL> q(this->m_attrV[it], this->m_attrV[m.phi1(it)], this->m_attrV[m.phi_1(it)]) ;
q1 += q ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
} while(it != d) ;
// compute the error quadric associated to v2
......@@ -147,7 +147,7 @@ void Approximator_QEMhalfEdge<PFP>::approximate(Dart d)
{
Quadric<REAL> q(this->m_attrV[it], this->m_attrV[m.phi1(it)], this->m_attrV[m.phi_1(it)]) ;
q2 += q ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
} while(it != dd) ;
}
else // if the selector is QEM, use the error quadrics computed by the selector
......@@ -312,14 +312,14 @@ void Approximator_CornerCutting<PFP>::approximate(Dart d)
do
{
++k1 ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
} while(it != d) ;
REAL k2 = 0 ;
it = dd ;
do
{
++k2 ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
} while(it != dd) ;
REAL alpha = (k1-1) * (k2-1) / (k1*k2-1) ;
......@@ -330,7 +330,7 @@ void Approximator_CornerCutting<PFP>::approximate(Dart d)
do
{
m1 += this->m_attrV[m.phi1(it)] ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
++count ;
} while (it != d) ;
m1 /= REAL(count) ;
......@@ -342,7 +342,7 @@ void Approximator_CornerCutting<PFP>::approximate(Dart d)
do
{
m2 += this->m_attrV[m.phi1(it)] ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
++count ;
} while (it != dd) ;
m2 /= REAL(count) ;
......
......@@ -51,7 +51,7 @@ void Predictor_HalfCollapse<PFP>::predict(Dart d2, Dart dd2)
Dart it = dd2 ;
do {
s2_1 += this->m_attrV[m.phi1(it)] ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
++k2 ;
} while (m.phi2(it) != m.phi_1(d2)) ;
......@@ -84,12 +84,12 @@ typename PFP::REAL Predictor_CornerCutting<PFP>::autoAlpha(Dart d2, Dart dd2)
do
{
++k1 ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
} while(it != dd2) ;
do
{
++k2 ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
} while(it != d2) ;
return (k1-1) * (k2-1) / (k1*k2-1) ;
}
......@@ -116,7 +116,7 @@ void Predictor_CornerCutting<PFP>::predict(Dart d2, Dart dd2)
Dart it = d2 ;
do {
m1 += this->m_attrV[m.phi1(it)] ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
++count ;
} while (m.phi2(it) != m.phi_1(dd2)) ;
m1 /= REAL(count) ;
......@@ -130,7 +130,7 @@ void Predictor_CornerCutting<PFP>::predict(Dart d2, Dart dd2)
it = dd2 ;
do {
m2 += this->m_attrV[m.phi1(it)] ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
++count ;
} while (m.phi2(it) != m.phi_1(d2)) ;
m2 /= REAL(count) ;
......@@ -155,7 +155,7 @@ void Predictor_TangentPredict1<PFP>::predictedTangent(Dart d2, Dart dd2, VEC3& d
Dart it = d2 ;
do {
s1_1 += this->m_attrV[m.phi1(it)] ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
++k1 ;
} while (m.phi2(it) != m.phi_1(dd2)) ;
......@@ -163,7 +163,7 @@ void Predictor_TangentPredict1<PFP>::predictedTangent(Dart d2, Dart dd2, VEC3& d
it = dd2 ;
do {
s2_1 += this->m_attrV[m.phi1(it)] ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
++k2 ;
} while (m.phi2(it) != m.phi_1(d2)) ;
......@@ -210,7 +210,7 @@ void Predictor_TangentPredict2<PFP>::predictedTangent(Dart d2, Dart dd2, VEC3& d
Dart it = d2 ;
do {
s1_1 += this->m_attrV[m.phi1(it)] ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
++k1 ;
} while (m.phi2(it) != m.phi_1(dd2)) ;
......@@ -221,7 +221,7 @@ void Predictor_TangentPredict2<PFP>::predictedTangent(Dart d2, Dart dd2, VEC3& d
Dart p2 = m.phi2(p1) ;
if(p2 != p1)
s1_2 += this->m_attrV[m.phi_1(p2)] ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
} while (it != dd2) ;
s1_2 += this->m_attrV[m.phi_1(d1)] ;
s1_2 += this->m_attrV[m.phi_1(dd2)] ;
......@@ -230,7 +230,7 @@ void Predictor_TangentPredict2<PFP>::predictedTangent(Dart d2, Dart dd2, VEC3& d
it = dd2 ;
do {
s2_1 += this->m_attrV[m.phi2(it)] ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
++k2 ;
} while (m.phi2(it) != m.phi_1(d2)) ;
......@@ -241,7 +241,7 @@ void Predictor_TangentPredict2<PFP>::predictedTangent(Dart d2, Dart dd2, VEC3& d
Dart p2 = m.phi2(p1) ;
if(p2 != p1)
s2_2 += this->m_attrV[m.phi_1(p2)] ;
it = m.alpha1(it) ;
it = m.phi2_1(it) ;
} while (it != d2) ;
s2_2 += this->m_attrV[m.phi_1(dd1)] ;
s2_2 += this->m_attrV[m.phi_1(d2)] ;
......
......@@ -161,7 +161,7 @@ void HalfEdgeSelector_QEMml<PFP>::recomputeQuadric(const Dart d, const bool reco
do {
// Make step
dBack = this->m_map.phi1(dFront) ;
dFront = this->m_map.alpha1(dFront) ;
dFront = this->m_map.phi2_1(dFront) ;
if (this->m_map.phi2(dFront) != dFront) { // if dFront is no border
quadric[d] += Quadric<REAL>(this->m_position[d],this->m_position[dBack],this->m_position[this->m_map.phi1(dFront)]) ;
......@@ -195,7 +195,7 @@ void HalfEdgeSelector_QEMml<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
Dart stop = m.phi2(vit) ;
assert (stop != vit) ;
Dart vit2 = m.alpha_1(m.phi1(vit)) ;
Dart vit2 = m.phi12(m.phi1(vit)) ;
do {
updateHalfEdgeInfo(vit2, true) ;
d = m.phi2(vit2) ;
......@@ -207,9 +207,9 @@ void HalfEdgeSelector_QEMml<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
if (d != m.phi1(vit2)) ;
updateHalfEdgeInfo(d, false) ;
vit2 = m.alpha_1(vit2) ;
vit2 = m.phi12(vit2) ;
} while (stop != vit2) ;
vit = m.alpha1(vit) ;
vit = m.phi2_1(vit) ;
} while(vit != d2) ;
cur = halfEdges.begin() ; // set the current edge to the first one
......@@ -418,7 +418,7 @@ void HalfEdgeSelector_Lightfield<PFP>::recomputeQuadric(const Dart d, const bool
do {
// Make step
dBack = this->m_map.phi1(dFront) ;
dFront = this->m_map.alpha1(dFront) ;
dFront = this->m_map.phi2_1(dFront) ;
if (dBack != dFront) { // if dFront is no border
quadric[d] += Quadric<REAL>(this->m_position[d],this->m_position[this->m_map.phi1(dFront)],this->m_position[dBack]) ;
......@@ -451,7 +451,7 @@ void HalfEdgeSelector_Lightfield<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
Dart stop = m.phi2(vit) ;
assert (stop != vit) ;
Dart vit2 = m.alpha_1(m.phi1(vit)) ;
Dart vit2 = m.phi12(m.phi1(vit)) ;
do {
updateHalfEdgeInfo(vit2, true) ;
d = m.phi2(vit2) ;
......@@ -463,9 +463,9 @@ void HalfEdgeSelector_Lightfield<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
if (d != m.phi1(vit2)) ;
updateHalfEdgeInfo(d, false) ;
vit2 = m.alpha_1(vit2) ;
vit2 = m.phi12(vit2) ;
} while (stop != vit2) ;
vit = m.alpha1(vit) ;
vit = m.phi2_1(vit) ;
} while(vit != d2) ;
......@@ -694,19 +694,19 @@ void EdgeSelector_Lightfield<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
{
initEdgeInfo(vit) ; // various optimizations are applied here by
// treating differently :
Dart vit2 = m.alpha_1(m.phi1(vit)) ; // - edges for which the criteria must be recomputed
Dart vit2 = m.phi12(m.phi1(vit)) ; // - edges for which the criteria must be recomputed
Dart stop = m.phi2(vit) ; // - edges that must be re-embedded
do // - edges for which only the collapsibility must be re-tested
{
updateEdgeInfo(vit2, false) ;
updateEdgeInfo(m.phi1(vit2), false) ;
vit2 = m.alpha_1(vit2) ;
vit2 = m.phi12(vit2) ;
} while(vit2 != stop) ;
}
else
updateEdgeInfo(vit, true) ;
vit = m.alpha1(vit) ;
vit = m.phi2_1(vit) ;
} while(vit != d2) ;
cur = edges.begin() ; // set the current edge to the first one
......
......@@ -108,16 +108,16 @@ void Approximator_RGBfunctionsHalf<PFP>::approximate(Dart d)
// REAL gamma1 = ((j1 * i) > 0 ? 1 : -1) * acos( std::max(std::min(1.0f, i1 * i ), -1.0f)) ; // angle positif ssi
REAL gamma2 = ((j2 * i) > 0 ? 1 : -1) * acos( std::max(std::min(1.0f, i2 * i ), -1.0f)) ; // -PI/2 < angle(i,j1) < PI/2 ssi i*j1 > 0
// Rotation dans le sens trigo autour de l'axe i (n1->n)
// REAL alpha1 = ((n * j1pr) > 0 ? -1 : 1) * acos( std::max(std::min(1.0f, n * n1), -1.0f) ) ; // angle positif ssi
// REAL phi2_1 = ((n * j1pr) > 0 ? -1 : 1) * acos( std::max(std::min(1.0f, n * n1), -1.0f) ) ; // angle positif ssi
REAL alpha2 = ((n * j2pr) > 0 ? -1 : 1) * acos( std::max(std::min(1.0f, n * n2), -1.0f) ) ; // PI/2 < angle(j1',n) < -PI/2 ssi j1'*n < 0
// assert (-0.01 < gamma1 && gamma1 < 0.01) ;
// assert (-0.01 < alpha1 && alpha1 < 0.01) ;
// assert (-0.01 < phi2_1 && phi2_1 < 0.01) ;
REAL gamma1 = REAL(0) ;
REAL alpha1 = REAL(0) ;
REAL phi2_1 = REAL(0) ;
// Create and sum quadrics
m_quadricRGBfunctions[d] += QuadricRGBfunctions<REAL>(this->m_attrV[d], gamma1, alpha1) ;
m_quadricRGBfunctions[d] += QuadricRGBfunctions<REAL>(this->m_attrV[d], gamma1, phi2_1) ;
m_quadricRGBfunctions[d] += QuadricRGBfunctions<REAL>(this->m_attrV[dd], gamma2, alpha2) ;
}
......@@ -246,12 +246,12 @@ void Approximator_RGBfunctions<PFP>::approximate(Dart d)
REAL gamma1 = ((j1 * i) > 0 ? 1 : -1) * acos( std::max(std::min(1.0f, i1 * i ), -1.0f)) ; // angle positif ssi
REAL gamma2 = ((j2 * i) > 0 ? 1 : -1) * acos( std::max(std::min(1.0f, i2 * i ), -1.0f)) ; // -PI/2 < angle(i,j1) < PI/2 ssi i*j1 > 0
// Rotation dans le sens trigo autour de l'axe i (n1->n)
REAL alpha1 = ((n * j1pr) > 0 ? -1 : 1) * acos( std::max(std::min(1.0f, n * n1), -1.0f) ) ; // angle positif ssi
REAL phi2_1 = ((n * j1pr) > 0 ? -1 : 1) * acos( std::max(std::min(1.0f, n * n1), -1.0f) ) ; // angle positif ssi
REAL alpha2 = ((n * j2pr) > 0 ? -1 : 1) * acos( std::max(std::min(1.0f, n * n2), -1.0f) ) ; // PI/2 < angle(j1',n) < -PI/2 ssi j1'*n < 0
// assert (-3.15 < gamma1 && gamma1 <= 3.15) ;
// assert (-3.15 < gamma2 && gamma2 <= 3.15) ;
// assert (-3.15 < alpha1 && alpha1 <= 3.15) ;
// assert (-3.15 < phi2_1 && phi2_1 <= 3.15) ;
// assert (-3.15 < alpha2 && alpha2 <= 3.15) ;
// MATRIX36 &f1 = this->m_attrV[d] ;
......@@ -259,7 +259,7 @@ void Approximator_RGBfunctions<PFP>::approximate(Dart d)
// Create and sum quadrics
m_quadricRGBfunctions[d].zero() ;
m_quadricRGBfunctions[d] += QuadricRGBfunctions<REAL>(this->m_attrV[d], gamma1, alpha1) ;
m_quadricRGBfunctions[d] += QuadricRGBfunctions<REAL>(this->m_attrV[d], gamma1, phi2_1) ;
m_quadricRGBfunctions[d] += QuadricRGBfunctions<REAL>(this->m_attrV[dd], gamma2, alpha2) ;
// Compute new function
......
......@@ -181,7 +181,7 @@ void SimplifTrian<PFP>::updateCriterias(Dart d)
m_protectMarker.mark(em) ;
// next edge
d = m_map.alpha1(d);
d = m_map.phi2_1(d);
} while (d!=dd);
}
......@@ -212,15 +212,15 @@ Dart SimplifTrian<PFP>::edgeCollapse(Dart d, typename PFP::VEC3& newPos)
{
CRIT* cr = getCrit(xd);
cr->tagDirty();
xd = m_map.alpha1(xd);
xd = m_map.phi2_1(xd);
} while (xd != d);
xd = m_map.alpha1(dd); // alpha1 pour ne pas repasser sur l'arete d/dd
xd = m_map.phi2_1(dd); // phi2_1 pour ne pas repasser sur l'arete d/dd
do
{
CRIT* cr = getCrit(xd);
cr->tagDirty();
xd = m_map.alpha1(xd);
xd = m_map.phi2_1(xd);
} while (xd != dd);
// store old valences
......
......@@ -125,7 +125,7 @@ void statModele(typename PFP::MAP& map, const typename PFP::TVEC3& position)
// do
// {
// nbEdgePerVertex++ ;
// e = map.alpha1(e) ;
// e = map.phi2_1(e) ;
// }
// while (e != d) ;
// }
......
......@@ -518,7 +518,7 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, typename PFP
//if the valence of one of the vertex is equal to one
//cut the edge to insert the quadrangular face
if(map.alpha1(d1)==d1)
if(map.phi2_1(d1)==d1)
{
map.cutEdge(d2);
......@@ -530,7 +530,7 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, typename PFP
edgePlanes[map.phi_1(d1)] = Geom::Plane3D<typename PFP::REAL>(v,p1);
}
if(map.alpha1(d2)==d2)
if(map.phi2_1(d2)==d2)
{
map.cutEdge(d1);
brokenL.mark(map.phi1(d1));
......
......@@ -327,7 +327,7 @@ public:
REAL aij = edgeWeight[it] / vArea ;
aii += aij ;
solver->add_coefficient(indexTable[this->m_map.phi1(it)], aij) ;
it = this->m_map.alpha1(it) ;
it = this->m_map.phi2_1(it) ;
} while(it != d) ;
solver->add_coefficient(indexTable[d], -aii) ;
solver->normalize_row() ;
......
......@@ -287,7 +287,7 @@ Dart extrudeFace(typename PFP::MAP& the_map, typename PFP::TVEC3& positions, Dar
do
{
the_map.cutEdge(cc);
cc = the_map.alpha1(cc);
cc = the_map.phi2_1(cc);
}while (cc != c);
// cut faces
......@@ -296,7 +296,7 @@ Dart extrudeFace(typename PFP::MAP& the_map, typename PFP::TVEC3& positions, Dar
Dart d1 = the_map.phi1(cc);
Dart d2 = the_map.phi_1(cc);
the_map.splitFace(d1,d2);
cc = the_map.alpha1(cc);
cc = the_map.phi2_1(cc);
}while (cc != c);
// delete the central vertex
......
......@@ -73,7 +73,7 @@ void trianguleFaces(typename PFP::MAP& map, EMBV& attributs, const FunctorSelect
do
{
t.mark(fit);
fit = map.alpha1(fit);
fit = map.phi2_1(fit);
} while(fit != cd);
}
}
......@@ -102,7 +102,7 @@ void trianguleFaces(
do