added NextCrease function to follows creases
This commit is contained in:
parent
7aef00fb33
commit
2b8a829099
|
@ -285,13 +285,41 @@ 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()
|
bool IsBorder()const
|
||||||
{
|
{
|
||||||
return face::IsBorder(*f,z);
|
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));
|
return (f->IsF(z));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue