24 #ifndef _VCG_FACE_TOPOLOGY
25 #define _VCG_FACE_TOPOLOGY
29 #include <vcg/complex/allocate.h>
40 template <
class FaceType>
41 inline bool IsManifold( FaceType
const & f,
const int j )
43 assert(f.cFFp(j) != 0);
44 if(FaceType::HasFFAdjacency())
45 return ( f.cFFp(j) == &f || &f == f.cFFp(j)->cFFp(f.cFFi(j)) );
54 template <
class FaceType>
55 inline bool IsBorder(FaceType
const & f,
const int j )
57 if(FaceType::HasFFAdjacency())
83 template <
class FaceType>
86 typedef typename FaceType::ScalarType ScalarType;
87 typedef typename FaceType::CoordType CoordType;
88 typedef typename FaceType::VertexType VertexType;
91 FaceType *f1 = f.FFp(i);
94 VertexType *vf0 = f0->V2(i0);
95 VertexType *vf1 = f1->V2(i1);
97 CoordType n0 = TriangleNormal(*f0).Normalize();
98 CoordType n1 = TriangleNormal(*f1).Normalize();
99 ScalarType off0 = n0*vf0->P();
100 ScalarType off1 = n1*vf1->P();
102 ScalarType dist01 = off0 - n0*vf1->P();
103 ScalarType dist10 = off1 - n1*vf0->P();
107 if(fabs(dist01) > fabs(dist10)) sign = dist01;
110 ScalarType angleRad=AngleN(n0,n1);
112 if(sign > 0 )
return angleRad;
113 else return -angleRad;
117 template <
class FaceType>
118 inline typename FaceType::ScalarType
WedgeAngleRad(FaceType & f,
const int i )
121 auto &P1=f.P(f.Next(i));
122 auto &P2=f.P(f.Prev(i));
123 return vcg::Angle(P2 - P0,P1 - P0);
127 template <
class FaceType>
130 if(FaceType::HasFFAdjacency())
143 template <
class FaceType>
146 if(FaceType::HasFFAdjacency())
148 if(face::IsBorder<FaceType>(f,e))
return 1;
149 if(face::IsManifold<FaceType>(f,e))
return 2;
152 Pos< FaceType > fpos(&f,e);
157 assert(!fpos.IsBorder());
158 assert(!fpos.IsManifold());
176 template <
class FaceType>
179 if(f.FFp(e)==0)
return false;
183 if(f.FFi(e)==e)
return true;
187 if(f.FFp(e)->FFp(f.FFi(e))==&f)
189 if(f.FFp(e)->FFi(f.FFi(e))==e)
return true;
196 Pos< FaceType > curFace(&f,e);
200 if(curFace.IsManifold())
return false;
201 if(curFace.IsBorder())
return false;
206 while ( curFace.f != &f);
218 template <
class FaceType>
221 assert(FFCorrectness<FaceType>(f,e));
222 assert(!IsBorder<FaceType>(f,e));
223 FaceType *ffp = f.FFp(e);
237 assert(FFCorrectness<FaceType>(f,e));
238 assert(FFCorrectness<FaceType>(*ffp,ffi));
248 template <
class FaceType>
251 assert(FFCorrectness<FaceType>(f,e));
252 assert(!IsBorder<FaceType>(f,e));
255 assert(complexity>0);
256 vcg::face::Pos<FaceType> FirstFace(&f,e);
257 vcg::face::Pos<FaceType> LastFace(&f,e);
266 while ( LastFace.f->FFp(LastFace.z) != &f)
268 assert(
ComplexSize(*LastFace.f,LastFace.z)==complexity);
269 assert(!LastFace.IsManifold());
270 assert(!LastFace.IsBorder());
276 assert(LastFace.f->FFp(LastFace.z)==&f);
277 assert(f.FFp(e)== FirstFace.f);
280 LastFace.f->FFp(LastFace.z) = FirstFace.f;
281 LastFace.f->FFi(LastFace.z) = FirstFace.z;
282 assert(
ComplexSize(*LastFace.f,LastFace.z)==complexity-1);
289 assert(FFCorrectness<FaceType>(*LastFace.f,LastFace.z));
290 assert(FFCorrectness<FaceType>(f,e));
301 template <
class FaceType>
302 void FFAttach(FaceType * f,
int z1, FaceType * f2,
int z2)
305 vcg::face::Pos< FaceType > EPB(f2,z2);
306 vcg::face::Pos< FaceType > TEPB;
315 FaceType *f1prec = f->FFp(z1);
316 int z1prec = f->FFi(z1);
320 assert(TEPB.f->FFp(TEPB.z) == f2);
322 f->FFp(z1) = TEPB.f->FFp(TEPB.z);
323 f->FFi(z1) = TEPB.f->FFi(TEPB.z);
326 TEPB.f->FFp(TEPB.z) = f1prec;
327 TEPB.f->FFi(TEPB.z) = z1prec;
329 assert(FFCorrectness<FaceType>(*f,z1));
330 assert(FFCorrectness<FaceType>(*TEPB.f, TEPB.z));
341 template <
class FaceType>
344 assert(IsBorder<FaceType>(*f1,z1) || f1->FFp(z1)==0);
345 assert(IsBorder<FaceType>(*f2,z2) || f2->FFp(z2)==0);
346 assert(f1->V0(z1) == f2->V0(z2) || f1->V0(z1) == f2->V1(z2));
347 assert(f1->V1(z1) == f2->V0(z2) || f1->V1(z1) == f2->V1(z2));
355 template <
class FaceType>
356 void FFSetBorder(FaceType * f1,
int z1)
358 assert(f1->FFp(z1)==0 ||
IsBorder(*f1,z1));
364 template <
class FaceType>
365 void AssertAdj(FaceType & f)
368 assert(f.FFp(0)->FFp(f.FFi(0))==&f);
369 assert(f.FFp(1)->FFp(f.FFi(1))==&f);
370 assert(f.FFp(2)->FFp(f.FFi(2))==&f);
372 assert(f.FFp(0)->FFi(f.FFi(0))==0);
373 assert(f.FFp(1)->FFi(f.FFi(1))==1);
374 assert(f.FFp(2)->FFi(f.FFi(2))==2);
382 template <
class FaceType>
389 FaceType *g = f.FFp(z);
391 if (f.V0(z) == g->V1(gi))
403 template <
class FaceType>
404 void SwapEdge(FaceType &f,
const int z) { SwapEdge<FaceType,true>(f,z); }
406 template <
class FaceType,
bool UpdateTopology>
407 void SwapEdge(FaceType &f,
const int z)
410 std::swap(f.V0(z), f.V1(z));
413 bool Faux1 = f.IsF((z+1)%3);
414 bool Faux2 = f.IsF((z+2)%3);
415 if(Faux1) f.SetF((z+2)%3);
else f.ClearF((z+2)%3);
416 if(Faux2) f.SetF((z+1)%3);
else f.ClearF((z+1)%3);
418 if(f.HasFFAdjacency() && UpdateTopology)
423 FaceType *g1p = f.FFp(z1);
424 FaceType *g2p = f.FFp(z2);
460 template <
class FaceType>
463 typedef typename FaceType::VertexType VertexType;
464 typedef typename vcg::face::Pos< FaceType > PosType;
466 VertexType *v0=f.V0(z);
467 VertexType *v1=f.V1(z);
471 std::vector<VertexType *>v0Vec;
472 std::vector<VertexType *>v1Vec;
475 std::set<VertexType *> v0set;
476 v0set.insert(v0Vec.begin(),v0Vec.end());
477 assert(v0set.size() == v0Vec.size());
479 for(
size_t i=0;i<v1Vec.size();++i)
480 if(v0set.find(v1Vec[i]) != v0set.end())
505 template <
class MeshType>
508 typedef typename MeshType::FaceType FaceType;
509 typedef typename MeshType::VertexType VertexType;
510 typedef typename vcg::face::Pos< FaceType > PosType;
513 FaceType *f1 = f.FFp(z);
516 VertexType *delV=f.V0(z);
517 VertexType *surV=f.V1(z);
520 PosType delPos(f0,delV);
521 std::vector<PosType> faceToBeChanged;
525 FaceType *f01= 0,*f02= 0,*f11= 0,*f12= 0;
526 int i01=-1, i02=-1, i11=-1, i12=-1;
528 bool f0Faux = f0->IsF((z0+1)%3) && f0->IsF((z0+2)%3);
529 bool f1Faux = f1->IsF((z1+1)%3) && f1->IsF((z1+2)%3);
537 for(
size_t i=0;i<faceToBeChanged.size();++i) {
538 assert(faceToBeChanged[i].V() == delV);
539 faceToBeChanged[i].F()->V(faceToBeChanged[i].VInd()) =surV;
545 if(f0Faux) {f01->SetF(i01); f02->SetF(i02);}
549 if(f1Faux) {f11->SetF(i11); f12->SetF(i12);}
575 template <
class FaceType>
578 typedef typename FaceType::VertexType VertexType;
579 typedef typename VertexType::CoordType CoordType;
581 VertexType *OldDiag0 = f.V0(z);
582 VertexType *OldDiag1 = f.V1(z);
584 VertexType *NewDiag0 = f.V2(z);
585 VertexType *NewDiag1 = f.FFp(z)->V2(f.FFi(z));
587 assert((NewDiag1 != NewDiag0) && (NewDiag1 != OldDiag0) && (NewDiag1 != OldDiag1));
589 CoordType oldN0 = Normal( NewDiag0->cP(),OldDiag0->cP(),OldDiag1->cP()).Normalize();
590 CoordType oldN1 = Normal( NewDiag1->cP(),OldDiag1->cP(),OldDiag0->cP()).Normalize();
591 CoordType newN0 = Normal( OldDiag0->cP(),NewDiag1->cP(),NewDiag0->cP()).Normalize();
592 CoordType newN1 = Normal( OldDiag1->cP(),NewDiag0->cP(),NewDiag1->cP()).Normalize();
593 if(AngleN(oldN0,newN0) > angleRad)
return false;
594 if(AngleN(oldN0,newN1) > angleRad)
return false;
595 if(AngleN(oldN1,newN0) > angleRad)
return false;
596 if(AngleN(oldN1,newN1) > angleRad)
return false;
607 template <
class FaceType>
610 typedef typename FaceType::VertexType VertexType;
611 typedef typename vcg::face::Pos< FaceType > PosType;
613 if (z<0 || z>2)
return false;
618 FaceType *g = f.FFp(z);
623 if (g->V(w)!=f.V1(z) || g->V1(w)!=f.V(z) )
628 VertexType *f_v2 = f.V2(z);
629 VertexType *g_v2 = g->V2(w);
632 if (f_v2 == g_v2)
return false;
637 PosType pos(&f, (z+2)%3, f_v2);
638 PosType startPos=pos;
642 if (g_v2 == pos.VFlip())
645 while (pos != startPos);
650 template <
class FaceType>
651 bool checkFlipEdgeNotManifold (FaceType &f,
const int z)
653 typedef typename FaceType::VertexType VertexType;
654 typedef typename vcg::face::Pos< FaceType > PosType;
655 if (z<0 || z>2)
return false;
660 FaceType *g = f.FFp(z);
665 if (g->V(w)!=f.V1(z) || g->V1(w)!=f.V(z) )
670 VertexType *f_v2 = f.V2(z);
671 VertexType *g_v2 = g->V2(w);
673 PosType pos(&f, (z+2)%3, f_v2);
674 PosType startPos=pos;
680 if (g_v2 == pos.VFlip())
683 while (pos != startPos);
713 template <
class FaceType>
719 assert( face::IsManifold<FaceType>(f, z));
721 FaceType *g = f.FFp(z);
724 assert( g->V0(w) == f.V1(z) );
725 assert( g->V1(w) == f.V0(z) );
726 assert( g->V2(w) != f.V0(z) );
727 assert( g->V2(w) != f.V1(z) );
728 assert( g->V2(w) != f.V2(z) );
736 f.FFp(z) = g->FFp((w+1)%3);
737 f.FFi(z) = g->FFi((w+1)%3);
738 g->FFp(w) = f.FFp((z+1)%3);
739 g->FFi(w) = f.FFi((z+1)%3);
742 f.FFi((z+1)%3) = (w+1)%3;
743 g->FFp((w+1)%3) = &f;
744 g->FFi((w+1)%3) = (z+1)%3;
753 f.FFp(z)->FFp( f.FFi(z) ) = &f;
754 f.FFp(z)->FFi( f.FFi(z) ) = z;
763 g->FFp(w)->FFp( g->FFi(w) ) = g;
764 g->FFp(w)->FFi( g->FFi(w) ) = w;
792 template <
class FaceType>
798 assert( face::IsManifold<FaceType>(f, z));
800 FaceType *g = f.FFp(z);
803 assert( g->V0(w) == f.V1(z) );
804 assert( g->V1(w) == f.V0(z) );
805 assert( g->V2(w) != f.V0(z) );
806 assert( g->V2(w) != f.V1(z) );
807 assert( g->V2(w) != f.V2(z) );
809 int fi1 = f.FFi(f.Next(z));
810 FaceType* fp1 = f.FFp(f.Next(z));
812 int gi1 = g->FFi(g->Next(w));
813 FaceType* gp1 = g->FFp(g->Next(w));
836 template <
class FaceType>
837 void TriSplit(FaceType *fToSplit, FaceType *newf0, FaceType *newf1,
typename FaceType::VertexType *newVert)
839 typedef typename FaceType::VertexType VertexType;
841 VertexType *vp0 = fToSplit->V(0);
842 VertexType *vp1 = fToSplit->V(1);
843 VertexType *vp2 = fToSplit->V(2);
845 fToSplit->V(0) = vp0; fToSplit->V(1) = vp1; fToSplit->V(2) = newVert;
846 newf0->V(0) = vp1; newf0->V(1) = vp2; newf0->V(2) = newVert;
847 newf1->V(0) = vp2; newf1->V(1) = vp0; newf1->V(2) = newVert;
852 template <
class FaceType>
853 void VFDetach(FaceType & f)
863 template <
class FaceType>
864 void VFDetach(FaceType & f,
int z)
866 if(f.V(z)->VFp()==&f )
868 int fz = f.V(z)->VFi();
869 f.V(z)->VFp() = f.VFp(fz);
870 f.V(z)->VFi() = f.VFi(fz);
874 VFIterator<FaceType> x(f.V(z)->VFp(),f.V(z)->VFi());
875 VFIterator<FaceType> y;
884 y.f->VFp(y.z) = f.VFp(z);
885 y.f->VFi(y.z) = f.VFi(z);
893 template <
class FaceType>
896 typename FaceType::VertexType *v = f->V(z);
899 FaceType *f0=v->VFp();
917 template <
class FaceType>
918 void VVStarVF(
typename FaceType::VertexType* vp, std::vector<typename FaceType::VertexType *> &starVec)
920 typedef typename FaceType::VertexType* VertexPointer;
923 face::VFIterator<FaceType> vfi(vp);
926 const int vn = vfi.F()->VN();
927 starVec.push_back(vfi.F()->V1(vfi.I()));
928 starVec.push_back(vfi.F()->V((vfi.I()+vn-1)%vn));
932 std::sort(starVec.begin(),starVec.end());
933 typename std::vector<VertexPointer>::iterator new_end = std::unique(starVec.begin(),starVec.end());
934 starVec.resize(new_end-starVec.begin());
945 template <
class FaceType>
948 std::vector<typename FaceType::VertexType *> &vertVec)
950 typedef typename FaceType::VertexType VertexType;
953 vcg::face::VVStarVF<FaceType>(vp,vertVec);
956 for (
int step=0;step<num_step-1;step++)
958 std::vector<VertexType *> toAdd;
959 for (
unsigned int i=0;i<vertVec.size();i++)
961 std::vector<VertexType *> Vtemp;
962 vcg::face::VVStarVF<FaceType>(vertVec[i],Vtemp);
963 toAdd.insert(toAdd.end(),Vtemp.begin(),Vtemp.end());
965 vertVec.insert(vertVec.end(),toAdd.begin(),toAdd.end());
966 std::sort(vertVec.begin(),vertVec.end());
967 typename std::vector<typename FaceType::VertexType *>::iterator new_end=std::unique(vertVec.begin(),vertVec.end());
968 int dist=distance(vertVec.begin(),new_end);
969 vertVec.resize(dist);
980 template <
class FaceType>
982 std::vector<FaceType *> &faceVec,
983 std::vector<int> &indexes)
989 face::VFIterator<FaceType> vfi(vp);
992 faceVec.push_back(vfi.F());
993 indexes.push_back(vfi.I());
1007 template <
class FaceType>
1009 std::vector<FaceType *> &faceVec,
1010 std::vector<int> &indVed)
1012 assert(fp->FFp(ei)!=0);
1019 faceVec.push_back(fpit);
1020 indVed.push_back(eit);
1021 FaceType *new_fpit = fpit->FFp(eit);
1022 int new_eit = fpit->FFi(eit);
1025 }
while(fpit != fp);
1035 template <
class FaceType>
1036 static void FFExtendedStarFF(FaceType *fp,
1038 std::vector<FaceType*> &faceVec)
1041 faceVec.push_back(fp);
1044 for (
int step=0;step<num_step;step++)
1046 std::vector<FaceType*> toAdd;
1047 for (
unsigned int i=0;i<faceVec.size();i++)
1049 FaceType *f=faceVec[i];
1050 for (
int k=0;k<3;k++)
1052 FaceType *f1=f->FFp(k);
1054 toAdd.push_back(f1);
1057 faceVec.insert(faceVec.end(),toAdd.begin(),toAdd.end());
1058 std::sort(faceVec.begin(),faceVec.end());
1059 typename std::vector<FaceType*>::iterator new_end=std::unique(faceVec.begin(),faceVec.end());
1060 int dist=distance(faceVec.begin(),new_end);
1061 faceVec.resize(dist);
1073 template <
class FaceType>
1076 std::vector<FaceType*> &faceVec)
1080 std::vector<int> indexes;
1081 vcg::face::VFStarVF<FaceType>(vp,faceVec,indexes);
1084 for (
int step=0;step<num_step;step++)
1086 std::vector<FaceType*> toAdd;
1087 for (
unsigned int i=0;i<faceVec.size();i++)
1089 FaceType *f=faceVec[i];
1090 for (
int k=0;k<3;k++)
1092 FaceType *f1=f->FFp(k);
1094 toAdd.push_back(f1);
1097 faceVec.insert(faceVec.end(),toAdd.begin(),toAdd.end());
1098 std::sort(faceVec.begin(),faceVec.end());
1099 typename std::vector<FaceType*>::iterator new_end=std::unique(faceVec.begin(),faceVec.end());
1100 int dist=distance(faceVec.begin(),new_end);
1101 faceVec.resize(dist);
1112 template <
class FaceType>
1114 std::vector<typename FaceType::VertexType *> &vertexVec)
1117 vertexVec.reserve(16);
1118 std::vector<Pos<FaceType> > posVec;
1120 for(
size_t i=0;i<posVec.size();++i)
1121 vertexVec.push_back(posVec[i].VFlip());
1132 template <
class FaceType>
1134 std::vector<typename FaceType::VertexType *> &vertexVec,
1138 vertexVec.reserve(16);
1139 std::vector<Pos<FaceType> > posVec;
1141 for(
size_t i=0;i<posVec.size();++i)
1142 vertexVec.push_back(posVec[i].VFlip());
1152 template <
class FaceType>
1154 std::vector<Pos<FaceType> > &posVec)
1158 bool foundBorder=
false;
1159 size_t firstBorderInd;
1160 Pos<FaceType> curPos=startPos;
1163 assert(curPos.IsManifold());
1164 if(curPos.IsBorder() && !foundBorder) {
1166 firstBorderInd = posVec.size();
1168 posVec.push_back(curPos);
1171 }
while(curPos!=startPos);
1176 size_t halfSize=posVec.size()/2;
1177 assert((posVec.size()%2)==0);
1178 posVec.erase(posVec.begin()+firstBorderInd+1+halfSize, posVec.end());
1179 posVec.erase(posVec.begin(),posVec.begin()+firstBorderInd+1);
1180 assert(posVec.size()==halfSize);
1192 template <
class FaceType>
1194 std::vector<Pos<FaceType> > &posVec,
1198 const auto & pos = posVec[0];
1200 if ((ccw) == (pos.V()!=pos.F()->V(pos.E())))
1202 std::reverse(posVec.begin(), posVec.end());
1215 template <
class FaceType>
1217 std::vector<FaceType*> &faceVec,
1218 std::vector<int> &edgeVec)
1220 std::vector<Pos<FaceType> > posVec;
1224 faceVec.reserve(16);
1225 edgeVec.reserve(16);
1226 for(
size_t i=0;i<posVec.size();++i)
1228 faceVec.push_back(posVec[i].F());
1229 edgeVec.push_back(posVec[i].E());
1239 template <
class FaceType>
1242 assert((!f0->IsD())&&(!f1->IsD()));
1243 for (
int i=0;i<3;i++)
1246 if((i0!=0) && (i1!=0)) {
1260 template <
class FaceType>
1264 for (
int i=0;i<3;i++)
1265 for (
int j=0;j<3;j++)
1266 if (f0->V(i)==f1->V(j)) {
1278 template <
class FaceType>
1283 if (f0->V(i)==f1->V(j))
return true;
1295 template <
class FaceType>
1300 if( ( f0->V0(i)==f1->V0(j) || f0->V0(i)==f1->V1(j) ) &&
1301 ( f0->V1(i)==f1->V0(j) || f0->V1(i)==f1->V1(j) ) )
1313 template <
class FaceType>
1315 typename FaceType::VertexType *v1,
1321 std::vector<FaceType*> faces0;
1322 std::vector<FaceType*> faces1;
1323 std::vector<int> index0;
1324 std::vector<int> index1;
1325 VFStarVF<FaceType>(v0,faces0,index0);
1326 VFStarVF<FaceType>(v1,faces1,index1);
1328 std::sort(faces0.begin(),faces0.end());
1329 std::sort(faces1.begin(),faces1.end());
1330 std::vector<FaceType*> Intersection;
1331 std::set_intersection(faces0.begin(),faces0.end(),faces1.begin(),faces1.end(),std::back_inserter(Intersection));
1332 if (Intersection.size()<2)
return false;
1333 assert(Intersection.size()==2);
static void DeleteFace(MeshType &m, FaceType &f)
Definition: allocate.h:923
static void DeleteVertex(MeshType &m, VertexType &v)
Definition: allocate.h:935
int ComplexSize(FaceType &f, const int e)
Counts the number of incident faces in a complex edge.
Definition: topology.h:144
void FlipEdgeNotManifold(FaceType &f, const int z)
Definition: topology.h:793
FaceType::ScalarType WedgeAngleRad(FaceType &f, const int i)
Return the internal angle (in radians) of the i-th wedge of the triangle.
Definition: topology.h:118
bool IsManifold(FaceType const &f, const int j)
Definition: topology.h:41
void FFAttachManifold(FaceType *f1, int z1, FaceType *f2, int z2)
Definition: topology.h:342
void VFExtendedStarVF(typename FaceType::VertexType *vp, const int num_step, std::vector< FaceType * > &faceVec)
Compute the set of faces adjacent to a given vertex using VF adjacency.
Definition: topology.h:1074
void EFStarFF(FaceType *fp, int ei, std::vector< FaceType * > &faceVec, std::vector< int > &indVed)
Compute the set of faces incident onto a given edge using FF adjacency.
Definition: topology.h:1008
int CountSharedVertex(FaceType *f0, FaceType *f1)
Definition: topology.h:1261
bool IsBorder(FaceType const &f, const int j)
Definition: topology.h:55
FaceType::ScalarType DihedralAngleRad(FaceType &f, const int i)
Compute the signed dihedral angle between the normals of two adjacent faces.
Definition: topology.h:84
void VVOrderedStarFF(const Pos< FaceType > &startPos, std::vector< typename FaceType::VertexType * > &vertexVec)
Compute the ordered set of vertices adjacent to a given vertex using FF adiacency.
Definition: topology.h:1113
bool CheckOrientation(FaceType &f, int z)
Definition: topology.h:383
void VVStarVF(typename FaceType::VertexType *vp, std::vector< typename FaceType::VertexType * > &starVec)
Compute the set of vertices adjacent to a given vertex using VF adjacency.
Definition: topology.h:918
void FFDetachManifold(FaceType &f, const int e)
Definition: topology.h:219
void SwapEdge(FaceType &f, const int z)
Definition: topology.h:404
bool CheckFlipEdge(FaceType &f, int z)
Definition: topology.h:608
bool FFCorrectness(FaceType &f, const int e)
Definition: topology.h:177
bool FindSharedFaces(typename FaceType::VertexType *v0, typename FaceType::VertexType *v1, FaceType *&f0, FaceType *&f1, int &e0, int &e1)
Definition: topology.h:1314
bool ShareEdgeFF(FaceType *f0, FaceType *f1, int *i0=0, int *i1=0)
Definition: topology.h:1240
void FlipEdge(FaceType &f, const int z)
Definition: topology.h:714
void VFAppend(FaceType *f, int z)
Append a face in VF list of vertex f->V(z)
Definition: topology.h:894
bool FindSharedEdge(FaceType *f0, FaceType *f1, int &i, int &j)
Definition: topology.h:1296
void VVExtendedStarVF(typename FaceType::VertexType *vp, const int num_step, std::vector< typename FaceType::VertexType * > &vertVec)
Compute the set of vertices adjacent to a given vertex using VF adjacency.
Definition: topology.h:946
bool FindSharedVertex(FaceType *f0, FaceType *f1, int &i, int &j)
Definition: topology.h:1279
void FFEdgeCollapse(MeshType &m, typename MeshType::FaceType &f, const int z)
Definition: topology.h:506
void FFDetach(FaceType &f, const int e)
Definition: topology.h:249
bool CheckFlipEdgeNormal(FaceType &f, const int z, const float angleRad)
Definition: topology.h:576
void VFStarVF(typename FaceType::VertexType *vp, std::vector< FaceType * > &faceVec, std::vector< int > &indexes)
Compute the set of faces adjacent to a given vertex using VF adjacency.
Definition: topology.h:981
void FFAttach(FaceType *f, int z1, FaceType *f2, int z2)
Definition: topology.h:302
int BorderCount(FaceType const &f)
Count border edges of the face.
Definition: topology.h:128
void VFOrderedStarFF(const Pos< FaceType > &startPos, std::vector< Pos< FaceType > > &posVec)
Compute the ordered set of faces adjacent to a given vertex using FF adiacency.
Definition: topology.h:1153
bool FFLinkCondition(FaceType &f, const int z)
Definition: topology.h:461
Definition: namespaces.dox:6