added NextNotFaux function

This commit is contained in:
Nico Pietroni 2014-09-11 20:43:41 +00:00
parent 4fe40ecef5
commit c3beef6091
1 changed files with 321 additions and 294 deletions

View File

@ -263,12 +263,39 @@ public:
assert(f->FFp(z)==f); // f is border along j
}
/// Finds the next half-edge border
void NextNotFaux( )
{
assert(f->V(f->Prev(z))!=v && (f->V(f->Next(z))==v || f->V(z)==v));
//assert(f->FFp(z)==f); // f is border along j
// Si deve cambiare faccia intorno allo stesso vertice v
//finche' non si trova una faccia di bordo.
do
{
FlipE();
if (IsFaux()) FlipF();
}
while(IsFaux());
// L'edge j e' di bordo e deve contenere v
assert((!IsFaux()) &&( f->V(z)==v || f->V(f->Next(z))==v ));
FlipV();
assert(f->V(f->Prev(z))!=v && (f->V(f->Next(z))==v || f->V(z)==v));
//assert(f->FFp(z)==f); // f is border along j
}
/// Checks if the half-edge is of border
bool IsBorder()
{
return face::IsBorder(*f,z);
}
bool IsFaux()
{
return (f->IsF(z));
}
bool IsManifold()
{
return face::IsManifold(*f,z);