added NextCrease function to follows creases

This commit is contained in:
Nico Pietroni 2015-05-24 14:51:22 +00:00
parent 7aef00fb33
commit 2b8a829099
1 changed files with 30 additions and 2 deletions

View File

@ -285,13 +285,41 @@ public:
//assert(f->FFp(z)==f); // f is border along j
}
/// Finds the next Crease half-edge border
/// TODO change crease flag with something more generic (per edge)
void NextCrease( )
{
assert(f->V(f->Prev(z))!=v && (f->V(f->Next(z))==v || f->V(z)==v));
assert(IsCrease()); // 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 (!IsCrease()) FlipF();
}
while(!IsCrease());
// L'edge j e' di bordo e deve contenere v
assert(IsCrease() &&( 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));
}
/// Checks if the half-edge is of border
bool IsBorder()
bool IsBorder()const
{
return face::IsBorder(*f,z);
}
bool IsFaux()
/// Checks if the half-edge is of crease
bool IsCrease() const
{
return f->IsCrease(z);
}
bool IsFaux() const
{
return (f->IsF(z));
}