Improved comment/documentation. Changed throws in require

This commit is contained in:
Paolo Cignoni 2013-03-13 14:00:29 +00:00
parent 9e45730d93
commit 6950be4594
1 changed files with 41 additions and 41 deletions
vcg/complex/algorithms/update

View File

@ -215,7 +215,7 @@ static void AllocateEdge(MeshType &m)
/// \brief Update the Face-Face topological relation by allowing to retrieve for each face what other faces shares their edges.
static void FaceFace(MeshType &m)
{
if(!HasFFAdjacency(m)) throw vcg::MissingComponentException("FFAdjacency");
RequireFFAdjacency(m);
if( m.fn == 0 ) return;
std::vector<PEdge> e;
@ -258,22 +258,22 @@ static void FaceFace(MeshType &m)
/// \brief Update the Vertex-Face topological relation.
/**
The function allows to retrieve for each vertex the list of faces sharing this vertex.
After this call all the VF component are initialized. Isolated vertices have a null list of faces.
\sa vcg::vertex::VFAdj
\sa vcg::face::VFAdj
*/
static void VertexFace(MeshType &m)
{
if(!HasVFAdjacency(m)) throw vcg::MissingComponentException("VFAdjacency");
RequireVFAdjacency(m);
VertexIterator vi;
FaceIterator fi;
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
for(VertexIterator vi=m.vert.begin();vi!=m.vert.end();++vi)
{
(*vi).VFp() = 0;
(*vi).VFi() = 0;
(*vi).VFi() = 0; // note that (0,-1) means uninitiazlied while 0,0 is the valid initialized values for isolated vertices.
}
for(fi=m.face.begin();fi!=m.face.end();++fi)
for(FaceIterator fi=m.face.begin();fi!=m.face.end();++fi)
if( ! (*fi).IsD() )
{
for(int j=0;j<(*fi).VN();++j)
@ -346,8 +346,8 @@ In other words F1->FFp(i) == F2 iff F1 and F2 have the same tex coords along edg
static void FaceFaceFromTexCoord(MeshType &m)
{
if(!HasPerWedgeTexCoord(m)) throw vcg::MissingComponentException("PerWedgeTexCoord");
if(!HasFFAdjacency(m)) throw vcg::MissingComponentException("FFAdjacency");
RequireFFAdjacency(m);
RequirePerFaceWedgeTexCoord(m);
std::vector<PEdgeTex> e;
FaceIterator pf;
@ -521,7 +521,7 @@ inline bool operator != ( const PVertexEdge & pe ) const { return ( v!=pe.v );
static void EdgeEdge(MeshType &m)
{
if(!HasEEAdjacency(m)) throw vcg::MissingComponentException("EEAdjacency");
RequireEEAdjacency(m);
std::vector<PVertexEdge> v;
if( m.en == 0 ) return;
@ -573,7 +573,7 @@ static void EdgeEdge(MeshType &m)
static void VertexEdge(MeshType &m)
{
if(!HasVEAdjacency(m)) throw vcg::MissingComponentException("VEAdjacency");
RequireVEAdjacency(m);
VertexIterator vi;
EdgeIterator ei;