removed the return type from the ++ operator of the vfi iterator
This commit is contained in:
parent
46dc55fb3c
commit
344de42c2e
|
@ -88,9 +88,9 @@ public:
|
|||
if (f->V(i) == v) { z = f->Prev(i); break;}
|
||||
}
|
||||
|
||||
// Official Access functions functions
|
||||
// Official Access functions functions
|
||||
VertexType *& V(){ return v; }
|
||||
int & E(){ return z; }
|
||||
int & E(){ return z; }
|
||||
FaceType *& F(){ return f; }
|
||||
|
||||
VertexType * V() const { return v; }
|
||||
|
@ -101,11 +101,11 @@ public:
|
|||
// Note that this is DIFFERENT from using the z member that denotes the edge index inside the face.
|
||||
// It should holds that Vind != (z+1)%3 && Vind == z || Vind = z+2%3
|
||||
int VInd()
|
||||
{
|
||||
for(int i = 0; i < f->VN(); ++i) if(v==f->V(i)) return i;
|
||||
assert(0);
|
||||
return -1;
|
||||
}
|
||||
{
|
||||
for(int i = 0; i < f->VN(); ++i) if(v==f->V(i)) return i;
|
||||
assert(0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/// Operator to compare two half-edge
|
||||
|
@ -119,7 +119,7 @@ public:
|
|||
}
|
||||
/// Operator to order half-edge; it's compare at the first the face pointers, then the index of the edge and finally the vertex pointers
|
||||
inline bool operator <= ( PosType const & p) const {
|
||||
return (f!=p.f)?(f<p.f):
|
||||
return (f!=p.f)?(f<p.f):
|
||||
(z!=p.z)?(z<p.z):
|
||||
(v<=p.v);
|
||||
}
|
||||
|
@ -213,19 +213,19 @@ public:
|
|||
|
||||
/// return the vertex that it should have if we make FlipV;
|
||||
VertexType *VFlip() const
|
||||
{
|
||||
assert(f->cV(f->Prev(z))!=v && (f->cV(f->Next(z))==v || f->cV(z)==v));
|
||||
if(f->cV(f->Next(z))==v) return f->cV(z);
|
||||
else return f->cV(f->Next(z));
|
||||
}
|
||||
{
|
||||
assert(f->cV(f->Prev(z))!=v && (f->cV(f->Next(z))==v || f->cV(z)==v));
|
||||
if(f->cV(f->Next(z))==v) return f->cV(z);
|
||||
else return f->cV(f->Next(z));
|
||||
}
|
||||
|
||||
/// return the face that it should have if we make FlipF;
|
||||
FaceType *FFlip() const
|
||||
{
|
||||
assert( f->FFp(z)->FFp(f->FFi(z))==f );
|
||||
assert(f->V(f->Prev(z))!=v && (f->V(f->Next(z))==v || f->V((z+0)%f->VN())==v));
|
||||
FaceType *nf=f->FFp(z);
|
||||
return nf;
|
||||
{
|
||||
assert( f->FFp(z)->FFp(f->FFi(z))==f );
|
||||
assert(f->V(f->Prev(z))!=v && (f->V(f->Next(z))==v || f->V((z+0)%f->VN())==v));
|
||||
FaceType *nf=f->FFp(z);
|
||||
return nf;
|
||||
}
|
||||
|
||||
|
||||
|
@ -250,7 +250,7 @@ public:
|
|||
//finche' non si trova una faccia di bordo.
|
||||
do
|
||||
NextE();
|
||||
while(!IsBorder());
|
||||
while(!IsBorder());
|
||||
|
||||
// L'edge j e' di bordo e deve contenere v
|
||||
assert(IsBorder() &&( f->V(z)==v || f->V(f->Next(z))==v ));
|
||||
|
@ -263,13 +263,13 @@ public:
|
|||
/// Checks if the half-edge is of border
|
||||
bool IsBorder()
|
||||
{
|
||||
return face::IsBorder(*f,z);
|
||||
return face::IsBorder(*f,z);
|
||||
}
|
||||
|
||||
bool IsManifold()
|
||||
{
|
||||
{
|
||||
return face::IsManifold(*f,z);
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Returns the number of vertices incident on the vertex pos is currently pointing to.
|
||||
|
@ -313,16 +313,16 @@ public:
|
|||
while (ht!=*this);
|
||||
return count;
|
||||
}
|
||||
/** Function to inizialize an half-edge.
|
||||
@param fp Puntatore alla faccia
|
||||
@param zp Indice dell'edge
|
||||
@param vp Puntatore al vertice
|
||||
*/
|
||||
void Set(FaceType * const fp, int const zp, VertexType * const vp)
|
||||
{
|
||||
f=fp;z=zp;v=vp;
|
||||
assert(f->V(f->Prev(z))!=v && (f->V(f->Next(z))==v || f->V(z)==v));
|
||||
}
|
||||
/** Function to inizialize an half-edge.
|
||||
@param fp Puntatore alla faccia
|
||||
@param zp Indice dell'edge
|
||||
@param vp Puntatore al vertice
|
||||
*/
|
||||
void Set(FaceType * const fp, int const zp, VertexType * const vp)
|
||||
{
|
||||
f=fp;z=zp;v=vp;
|
||||
assert(f->V(f->Prev(z))!=v && (f->V(f->Next(z))==v || f->V(z)==v));
|
||||
}
|
||||
|
||||
void Set(FaceType * const pFace, VertexType * const pVertex)
|
||||
{
|
||||
|
@ -366,7 +366,7 @@ public:
|
|||
};
|
||||
|
||||
/** Class VFIterator.
|
||||
This class is used as an iterator over the VF adjacency.
|
||||
This class is used as an iterator over the VF adjacency.
|
||||
It allow to easily traverse all the faces around a given vertex v;
|
||||
The faces are traversed in no particular order. No Manifoldness requirement.
|
||||
|
||||
|
@ -375,11 +375,11 @@ public:
|
|||
VertexPointer v;
|
||||
vcg::face::VFIterator<FaceType> vfi(v);
|
||||
for (;!vfi.End();++vfi)
|
||||
vfi.F()->ClearV();
|
||||
vfi.F()->ClearV();
|
||||
|
||||
// Alternative
|
||||
// Alternative
|
||||
|
||||
vcg::face::VFIterator<FaceType> vfi(f, 1);
|
||||
vcg::face::VFIterator<FaceType> vfi(f, 1);
|
||||
while (!vfi.End()){
|
||||
vfi.F()->ClearV();
|
||||
++vfi;
|
||||
|
@ -430,11 +430,10 @@ public:
|
|||
inline VertexType * const & V2() const { return f->V2(z);}
|
||||
|
||||
bool End() const {return f==0;}
|
||||
VFIFaceType *operator++() {
|
||||
void operator++() {
|
||||
FaceType* t = f;
|
||||
f = f->VFp(z);
|
||||
z = t->VFi(z);
|
||||
return f;
|
||||
f = t->VFp(z);
|
||||
z = t->VFi(z);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue