corrected errors in AddFaces ( must be updated pointers to chain of faces of VFTopology)

This commit is contained in:
Nico Pietroni 2004-08-07 16:16:32 +00:00
parent 76fcb79845
commit 6bb92793a6
1 changed files with 27 additions and 6 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.9 2004/08/05 16:44:06 pietroni
added addafaces funtion with local values
Revision 1.8 2004/07/15 11:40:34 ganovelli Revision 1.8 2004/07/15 11:40:34 ganovelli
VFb to VFp VFb to VFp
@ -211,6 +214,12 @@ static FaceIterator AddFaces(MeshType &m, int n, PointerUpdater<FacePointer> &pu
pu.Update((*fi).FFp(0)); pu.Update((*fi).FFp(0));
pu.Update((*fi).FFp(1)); pu.Update((*fi).FFp(1));
pu.Update((*fi).FFp(2)); pu.Update((*fi).FFp(2));
}
if(FaceType::HasVFAdjacency())
{
pu.Update((*fi).VFp(0));
pu.Update((*fi).VFp(1));
pu.Update((*fi).VFp(2));
} }
} }
VertexIterator vi; VertexIterator vi;
@ -276,6 +285,17 @@ static FaceIterator AddFaces(MeshType &m, int n, PointerUpdater<FacePointer> &pu
pu.Update((*fi).FFp(0)); pu.Update((*fi).FFp(0));
pu.Update((*fi).FFp(1)); pu.Update((*fi).FFp(1));
pu.Update((*fi).FFp(2)); pu.Update((*fi).FFp(2));
}
if(FaceType::HasVFAdjacency())
{
//update pointers to chain of face incident in a vertex
//update them only if they are different from zero
if ((*fi).VFp(0)!=0)
pu.Update((*fi).VFp(0));
if ((*fi).VFp(1)!=0)
pu.Update((*fi).VFp(1));
if ((*fi).VFp(2)!=0)
pu.Update((*fi).VFp(2));
} }
} }
VertexIterator vi; VertexIterator vi;
@ -283,6 +303,7 @@ static FaceIterator AddFaces(MeshType &m, int n, PointerUpdater<FacePointer> &pu
if(!(*vi).IsD()) if(!(*vi).IsD())
{ {
if(VertexType::HasVFAdjacency()) if(VertexType::HasVFAdjacency())
if ((*vi).VFp()!=0)
pu.Update((*vi).VFp()); pu.Update((*vi).VFp());
} }
// e poiche' lo spazio e' cambiato si ricalcola anche last da zero // e poiche' lo spazio e' cambiato si ricalcola anche last da zero