Improved comment/documentation. Changed throws in require
This commit is contained in:
parent
9e45730d93
commit
6950be4594
|
|
@ -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.
|
/// \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)
|
static void FaceFace(MeshType &m)
|
||||||
{
|
{
|
||||||
if(!HasFFAdjacency(m)) throw vcg::MissingComponentException("FFAdjacency");
|
RequireFFAdjacency(m);
|
||||||
if( m.fn == 0 ) return;
|
if( m.fn == 0 ) return;
|
||||||
|
|
||||||
std::vector<PEdge> e;
|
std::vector<PEdge> e;
|
||||||
|
|
@ -258,22 +258,22 @@ static void FaceFace(MeshType &m)
|
||||||
/// \brief Update the Vertex-Face topological relation.
|
/// \brief Update the Vertex-Face topological relation.
|
||||||
/**
|
/**
|
||||||
The function allows to retrieve for each vertex the list of faces sharing this vertex.
|
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)
|
static void VertexFace(MeshType &m)
|
||||||
{
|
{
|
||||||
if(!HasVFAdjacency(m)) throw vcg::MissingComponentException("VFAdjacency");
|
RequireVFAdjacency(m);
|
||||||
|
|
||||||
VertexIterator vi;
|
for(VertexIterator vi=m.vert.begin();vi!=m.vert.end();++vi)
|
||||||
FaceIterator fi;
|
|
||||||
|
|
||||||
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
|
|
||||||
{
|
{
|
||||||
(*vi).VFp() = 0;
|
(*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() )
|
if( ! (*fi).IsD() )
|
||||||
{
|
{
|
||||||
for(int j=0;j<(*fi).VN();++j)
|
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)
|
static void FaceFaceFromTexCoord(MeshType &m)
|
||||||
{
|
{
|
||||||
if(!HasPerWedgeTexCoord(m)) throw vcg::MissingComponentException("PerWedgeTexCoord");
|
RequireFFAdjacency(m);
|
||||||
if(!HasFFAdjacency(m)) throw vcg::MissingComponentException("FFAdjacency");
|
RequirePerFaceWedgeTexCoord(m);
|
||||||
|
|
||||||
std::vector<PEdgeTex> e;
|
std::vector<PEdgeTex> e;
|
||||||
FaceIterator pf;
|
FaceIterator pf;
|
||||||
|
|
@ -521,7 +521,7 @@ inline bool operator != ( const PVertexEdge & pe ) const { return ( v!=pe.v );
|
||||||
|
|
||||||
static void EdgeEdge(MeshType &m)
|
static void EdgeEdge(MeshType &m)
|
||||||
{
|
{
|
||||||
if(!HasEEAdjacency(m)) throw vcg::MissingComponentException("EEAdjacency");
|
RequireEEAdjacency(m);
|
||||||
std::vector<PVertexEdge> v;
|
std::vector<PVertexEdge> v;
|
||||||
if( m.en == 0 ) return;
|
if( m.en == 0 ) return;
|
||||||
|
|
||||||
|
|
@ -573,7 +573,7 @@ static void EdgeEdge(MeshType &m)
|
||||||
|
|
||||||
static void VertexEdge(MeshType &m)
|
static void VertexEdge(MeshType &m)
|
||||||
{
|
{
|
||||||
if(!HasVEAdjacency(m)) throw vcg::MissingComponentException("VEAdjacency");
|
RequireVEAdjacency(m);
|
||||||
|
|
||||||
VertexIterator vi;
|
VertexIterator vi;
|
||||||
EdgeIterator ei;
|
EdgeIterator ei;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue