Improved robustness of FF adj from texture coords adjacency.
Now faces with degenerated tex coords are more correctly managed.
This commit is contained in:
parent
4971b69b13
commit
7473170272
|
@ -324,14 +324,18 @@ static void FaceFaceFromTexCoord(MeshType &m)
|
|||
if( ! (*pf).IsD() )
|
||||
for(int j=0;j<3;++j)
|
||||
{
|
||||
(*p).Set(&(*pf),j);
|
||||
++p;
|
||||
if( (*pf).WT(j) != (*pf).WT((j+1)%3) )
|
||||
{
|
||||
(*p).Set(&(*pf),j);
|
||||
++p;
|
||||
}
|
||||
}
|
||||
|
||||
e.resize(p-e.begin()); // remove from the end of the edge vector the unitiailized ones
|
||||
assert(p==e.end());
|
||||
sort(e.begin(), e.end()); // Lo ordino per vertici
|
||||
|
||||
int ne = 0; // Numero di edge reali
|
||||
sort(e.begin(), e.end());
|
||||
|
||||
int ne = 0; // number of real edges
|
||||
typename std::vector<PEdgeTex>::iterator pe,ps;
|
||||
ps = e.begin();pe=e.begin();
|
||||
//for(ps = e.begin(),pe=e.begin();pe<=e.end();++pe) // Scansione vettore ausiliario
|
||||
|
|
Loading…
Reference in New Issue