added useful he functions

This commit is contained in:
Paolo Cignoni 2010-12-15 22:38:36 +00:00
parent b89a689a15
commit 6ca76c16b1
2 changed files with 36 additions and 0 deletions

View File

@ -1669,6 +1669,31 @@ namespace vcg
}
static vector<FacePointer> get_adjacent_faces(FacePointer fp)
{
assert(fp);
assert(!fp->IsD());
vector<FacePointer> ret;
Pos<MeshType> p( fp->FHp() );
assert(p.F() == fp);
do
{
p.FlipF();
ret.push_back( p.F() );
p.FlipF();
p.FlipV();
p.FlipE();
} while(p.HE() != fp->FHp());
return ret;
}
/*!
* Gets all hedges incident to a vertex
*

View File

@ -100,6 +100,17 @@ namespace vcg
return he->HOp()->HVp();
}
/*!
* Gets opposite vertex
*/
VertexPointer Vo()
{
if(!direction)
return he->HVp();
else
return he->HOp()->HVp();
}
/*!
* Gets pointed hedge
*/