Added Vertex-Face Topology

This commit is contained in:
Paolo Cignoni 2004-03-31 14:44:43 +00:00
parent a6269df8cd
commit 49691db569
1 changed files with 65 additions and 38 deletions

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.3 2004/03/12 15:22:19 cignoni
Written some documentation and added to the trimes doxygen module
Revision 1.2 2004/03/05 21:49:21 cignoni
First working version for face face
@ -126,7 +129,7 @@ inline bool operator != ( const PEdge & pe ) const
static void FaceFace(MeshType &m)
{
if(!m.HasFFTopology()) return;
{
vector<PEdge> e;
FaceIterator pf;
vector<PEdge>::iterator p;
@ -173,8 +176,32 @@ static void FaceFace(MeshType &m)
}
}
}
static void VertexFace(MeshType &m)
{
if(!m.HasVFTopology()) return;
VertexIterator vi;
FaceIterator fi;
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
{
(*vi).Fp() = 0;
(*vi).Zp() = 0;
}
for(fi=m.face.begin();fi!=m.face.end();++fi)
if( ! (*fi).IsD() )
{
for(int j=0;j<3;++j)
{
(*fi).Fv(j) = (*fi).V(j)->Fp();
(*fi).Zv(j) = (*fi).V(j)->Zp();
(*fi).V(j)->Fp() = &(*fi);
(*fi).V(j)->Zp() = j;
}
}
}
}; // end class