Updated the pos to do not use crease stuff and added selection helpers for pos

This commit is contained in:
Paolo Cignoni 2018-05-05 00:33:38 +02:00
parent 8bb8e59218
commit e78d9c252c
1 changed files with 4 additions and 28 deletions

View File

@ -289,40 +289,12 @@ public:
//assert(f->FFp(z)==f); // f is border along j //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 /// Checks if the half-edge is of border
bool IsBorder()const bool IsBorder()const
{ {
return face::IsBorder(*f,z); return face::IsBorder(*f,z);
} }
/// Checks if the half-edge is of crease
bool IsCrease() const
{
return f->IsCrease(z);
}
bool IsFaux() const bool IsFaux() const
{ {
return (f->IsF(z)); return (f->IsF(z));
@ -333,6 +305,10 @@ public:
return face::IsManifold(*f,z); return face::IsManifold(*f,z);
} }
bool IsFaceS() const { return f->IsS();}
bool IsEdgeS() const { return f->IsFaceEdgeS(z);}
bool IsVertS() const { return v->IsS();}
/*! /*!
* Returns the angle (in radiant) between the two edges incident on V. * Returns the angle (in radiant) between the two edges incident on V.
*/ */