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;
207 while ( curFace.f != &f);
219 template <
class FaceType>
222 assert(FFCorrectness<FaceType>(f,e));
223 assert(!IsBorder<FaceType>(f,e));
224 FaceType *ffp = f.FFp(e);
238 assert(FFCorrectness<FaceType>(f,e));
239 assert(FFCorrectness<FaceType>(*ffp,ffi));
249 template <
class FaceType>
252 assert(FFCorrectness<FaceType>(f,e));
253 assert(!IsBorder<FaceType>(f,e));
256 assert(complexity>0);
257 vcg::face::Pos<FaceType> FirstFace(&f,e);
258 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());
277 assert(LastFace.f->FFp(LastFace.z)==&f);
278 assert(f.FFp(e)== FirstFace.f);
281 LastFace.f->FFp(LastFace.z) = FirstFace.f;
282 LastFace.f->FFi(LastFace.z) = FirstFace.z;
283 assert(
ComplexSize(*LastFace.f,LastFace.z)==complexity-1);
290 assert(FFCorrectness<FaceType>(*LastFace.f,LastFace.z));
291 assert(FFCorrectness<FaceType>(f,e));
304 template <
class FaceType>
305 void FFAttach(FaceType &f,
int z1, FaceType &f2,
int z2)
307 vcg::face::Pos< FaceType > EPB(&f2,z2);
308 vcg::face::Pos< FaceType > TEPB = EPB;;
317 FaceType *f1prec = f.FFp(z1);
318 int z1prec = f.FFi(z1);
320 assert(f1prec == &f);
321 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);
325 TEPB.f->FFp(TEPB.z) = f1prec;
326 TEPB.f->FFi(TEPB.z) = z1prec;
327 assert(FFCorrectness<FaceType>(f,z1));
328 assert(FFCorrectness<FaceType>(*TEPB.f, TEPB.z));
338 template <
class FaceType>
341 assert(IsBorder<FaceType>(*f1,z1) || f1->FFp(z1)==0);
342 assert(IsBorder<FaceType>(*f2,z2) || f2->FFp(z2)==0);
343 assert(f1->V0(z1) == f2->V0(z2) || f1->V0(z1) == f2->V1(z2));
344 assert(f1->V1(z1) == f2->V0(z2) || f1->V1(z1) == f2->V1(z2));
352 template <
class FaceType>
353 void FFSetBorder(FaceType * f1,
int z1)
355 assert(f1->FFp(z1)==0 ||
IsBorder(*f1,z1));
361 template <
class FaceType>
362 void AssertAdj(FaceType & f)
365 assert(f.FFp(0)->FFp(f.FFi(0))==&f);
366 assert(f.FFp(1)->FFp(f.FFi(1))==&f);
367 assert(f.FFp(2)->FFp(f.FFi(2))==&f);
369 assert(f.FFp(0)->FFi(f.FFi(0))==0);
370 assert(f.FFp(1)->FFi(f.FFi(1))==1);
371 assert(f.FFp(2)->FFi(f.FFi(2))==2);
379 template <
class FaceType>
386 FaceType *g = f.FFp(z);
388 if (f.V0(z) == g->V1(gi))
401 template <
class FaceType>
402 void SwapEdge(FaceType &f,
const int z) { SwapEdge<FaceType,true>(f,z); }
404 template <
class FaceType,
bool UpdateTopology>
405 void SwapEdge(FaceType &f,
const int z)
408 std::swap(f.V0(z), f.V1(z));
411 bool Faux1 = f.IsF((z+1)%3);
412 bool Faux2 = f.IsF((z+2)%3);
413 if(Faux1) f.SetF((z+2)%3);
else f.ClearF((z+2)%3);
414 if(Faux2) f.SetF((z+1)%3);
else f.ClearF((z+1)%3);
416 if(f.HasFFAdjacency() && UpdateTopology)
421 FaceType *g1p = f.FFp(z1);
422 FaceType *g2p = f.FFp(z2);
459 template <
class FaceType>
462 typedef typename FaceType::VertexType VertexType;
463 typedef typename vcg::face::Pos< FaceType > PosType;
465 VertexType *v0=f.V0(z);
466 VertexType *v1=f.V1(z);
470 std::vector<VertexType *>v0Vec;
471 std::vector<VertexType *>v1Vec;
474 std::set<VertexType *> v0set;
475 v0set.insert(v0Vec.begin(),v0Vec.end());
476 assert(v0set.size() == v0Vec.size());
478 for(
size_t i=0;i<v1Vec.size();++i)
479 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));
841 template <
class FaceType>
842 void TriSplit(FaceType *fToSplit, FaceType *newf0, FaceType *newf1,
typename FaceType::VertexType *newVert)
844 typedef typename FaceType::VertexType VertexType;
846 VertexType *vp0 = fToSplit->V(0);
847 VertexType *vp1 = fToSplit->V(1);
848 VertexType *vp2 = fToSplit->V(2);
850 fToSplit->V(0) = vp0; fToSplit->V(1) = vp1; fToSplit->V(2) = newVert;
851 newf0->V(0) = vp1; newf0->V(1) = vp2; newf0->V(2) = newVert;
852 newf1->V(0) = vp2; newf1->V(1) = vp0; newf1->V(2) = newVert;
861 template <
class FaceType>
875 template <
class FaceType>
878 if(f.V(z)->VFp()==&f )
880 int fz = f.V(z)->VFi();
881 f.V(z)->VFp() = f.VFp(fz);
882 f.V(z)->VFi() = f.VFi(fz);
886 VFIterator<FaceType> x(f.V(z)->VFp(),f.V(z)->VFi());
887 VFIterator<FaceType> y;
896 y.f->VFp(y.z) = f.VFp(z);
897 y.f->VFi(y.z) = f.VFi(z);
905 template <
class FaceType>
908 typename FaceType::VertexType *v = f->V(z);
911 FaceType *f0=v->VFp();
929 template <
class FaceType>
930 void VVStarVF(
typename FaceType::VertexType* vp, std::vector<typename FaceType::VertexType *> &starVec)
932 typedef typename FaceType::VertexType* VertexPointer;
935 face::VFIterator<FaceType> vfi(vp);
938 const int vn = vfi.F()->VN();
939 starVec.push_back(vfi.F()->V1(vfi.I()));
940 starVec.push_back(vfi.F()->V((vfi.I()+vn-1)%vn));
944 std::sort(starVec.begin(),starVec.end());
945 typename std::vector<VertexPointer>::iterator new_end = std::unique(starVec.begin(),starVec.end());
946 starVec.resize(new_end-starVec.begin());
957 template <
class FaceType>
960 std::vector<typename FaceType::VertexType *> &vertVec)
962 typedef typename FaceType::VertexType VertexType;
965 vcg::face::VVStarVF<FaceType>(vp,vertVec);
968 for (
int step=0;step<num_step-1;step++)
970 std::vector<VertexType *> toAdd;
971 for (
unsigned int i=0;i<vertVec.size();i++)
973 std::vector<VertexType *> Vtemp;
974 vcg::face::VVStarVF<FaceType>(vertVec[i],Vtemp);
975 toAdd.insert(toAdd.end(),Vtemp.begin(),Vtemp.end());
977 vertVec.insert(vertVec.end(),toAdd.begin(),toAdd.end());
978 std::sort(vertVec.begin(),vertVec.end());
979 typename std::vector<typename FaceType::VertexType *>::iterator new_end=std::unique(vertVec.begin(),vertVec.end());
980 int dist=distance(vertVec.begin(),new_end);
981 vertVec.resize(dist);
992 template <
class FaceType>
994 std::vector<FaceType *> &faceVec,
995 std::vector<int> &indexes)
1000 indexes.reserve(16);
1001 face::VFIterator<FaceType> vfi(vp);
1004 faceVec.push_back(vfi.F());
1005 indexes.push_back(vfi.I());
1019 template <
class FaceType>
1021 std::vector<FaceType *> &faceVec,
1022 std::vector<int> &indVed)
1024 assert(fp->FFp(ei)!=0);
1031 faceVec.push_back(fpit);
1032 indVed.push_back(eit);
1033 FaceType *new_fpit = fpit->FFp(eit);
1034 int new_eit = fpit->FFi(eit);
1037 }
while(fpit != fp);
1047 template <
class FaceType>
1048 static void FFExtendedStarFF(FaceType *fp,
1050 std::vector<FaceType*> &faceVec)
1053 faceVec.push_back(fp);
1056 for (
int step=0;step<num_step;step++)
1058 std::vector<FaceType*> toAdd;
1059 for (
unsigned int i=0;i<faceVec.size();i++)
1061 FaceType *f=faceVec[i];
1062 for (
int k=0;k<3;k++)
1064 FaceType *f1=f->FFp(k);
1066 toAdd.push_back(f1);
1069 faceVec.insert(faceVec.end(),toAdd.begin(),toAdd.end());
1070 std::sort(faceVec.begin(),faceVec.end());
1071 typename std::vector<FaceType*>::iterator new_end=std::unique(faceVec.begin(),faceVec.end());
1072 int dist=distance(faceVec.begin(),new_end);
1073 faceVec.resize(dist);
1085 template <
class FaceType>
1088 std::vector<FaceType*> &faceVec)
1092 std::vector<int> indexes;
1093 vcg::face::VFStarVF<FaceType>(vp,faceVec,indexes);
1096 for (
int step=0;step<num_step;step++)
1098 std::vector<FaceType*> toAdd;
1099 for (
unsigned int i=0;i<faceVec.size();i++)
1101 FaceType *f=faceVec[i];
1102 for (
int k=0;k<3;k++)
1104 FaceType *f1=f->FFp(k);
1106 toAdd.push_back(f1);
1109 faceVec.insert(faceVec.end(),toAdd.begin(),toAdd.end());
1110 std::sort(faceVec.begin(),faceVec.end());
1111 typename std::vector<FaceType*>::iterator new_end=std::unique(faceVec.begin(),faceVec.end());
1112 int dist=distance(faceVec.begin(),new_end);
1113 faceVec.resize(dist);
1124 template <
class FaceType>
1126 std::vector<typename FaceType::VertexType *> &vertexVec)
1129 vertexVec.reserve(16);
1130 std::vector<Pos<FaceType> > posVec;
1132 for(
size_t i=0;i<posVec.size();++i)
1133 vertexVec.push_back(posVec[i].VFlip());
1144 template <
class FaceType>
1146 std::vector<typename FaceType::VertexType *> &vertexVec,
1150 vertexVec.reserve(16);
1151 std::vector<Pos<FaceType> > posVec;
1153 for(
size_t i=0;i<posVec.size();++i)
1154 vertexVec.push_back(posVec[i].VFlip());
1164 template <
class FaceType>
1166 std::vector<Pos<FaceType> > &posVec)
1170 bool foundBorder=
false;
1171 size_t firstBorderInd;
1172 Pos<FaceType> curPos=startPos;
1175 assert(curPos.IsManifold());
1176 if(curPos.IsBorder() && !foundBorder) {
1178 firstBorderInd = posVec.size();
1180 posVec.push_back(curPos);
1183 }
while(curPos!=startPos);
1188 size_t halfSize=posVec.size()/2;
1189 assert((posVec.size()%2)==0);
1190 posVec.erase(posVec.begin()+firstBorderInd+1+halfSize, posVec.end());
1191 posVec.erase(posVec.begin(),posVec.begin()+firstBorderInd+1);
1192 assert(posVec.size()==halfSize);
1204 template <
class FaceType>
1206 std::vector<Pos<FaceType> > &posVec,
1210 const auto & pos = posVec[0];
1212 if ((ccw) == (pos.V()!=pos.F()->V(pos.E())))
1214 std::reverse(posVec.begin(), posVec.end());
1227 template <
class FaceType>
1229 std::vector<FaceType*> &faceVec,
1230 std::vector<int> &edgeVec)
1232 std::vector<Pos<FaceType> > posVec;
1236 faceVec.reserve(16);
1237 edgeVec.reserve(16);
1238 for(
size_t i=0;i<posVec.size();++i)
1240 faceVec.push_back(posVec[i].F());
1241 edgeVec.push_back(posVec[i].E());
1251 template <
class FaceType>
1254 assert((!f0->IsD())&&(!f1->IsD()));
1255 for (
int i=0;i<3;i++)
1258 if((i0!=0) && (i1!=0)) {
1272 template <
class FaceType>
1276 for (
int i=0;i<3;i++)
1277 for (
int j=0;j<3;j++)
1278 if (f0->V(i)==f1->V(j)) {
1290 template <
class FaceType>
1295 if (f0->V(i)==f1->V(j))
return true;
1307 template <
class FaceType>
1312 if( ( f0->V0(i)==f1->V0(j) || f0->V0(i)==f1->V1(j) ) &&
1313 ( f0->V1(i)==f1->V0(j) || f0->V1(i)==f1->V1(j) ) )
1325 template <
class FaceType>
1327 typename FaceType::VertexType *v1,
1333 std::vector<FaceType*> faces0;
1334 std::vector<FaceType*> faces1;
1335 std::vector<int> index0;
1336 std::vector<int> index1;
1337 VFStarVF<FaceType>(v0,faces0,index0);
1338 VFStarVF<FaceType>(v1,faces1,index1);
1340 std::sort(faces0.begin(),faces0.end());
1341 std::sort(faces1.begin(),faces1.end());
1342 std::vector<FaceType*> Intersection;
1343 std::set_intersection(faces0.begin(),faces0.end(),faces1.begin(),faces1.end(),std::back_inserter(Intersection));
1344 if (Intersection.size()<2)
return false;
1345 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
void TriSplit(FaceType *fToSplit, FaceType *newf0, FaceType *newf1, typename FaceType::VertexType *newVert)
Definition: topology.h:842
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:339
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:1086
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:1020
int CountSharedVertex(FaceType *f0, FaceType *f1)
Definition: topology.h:1273
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 adjacency.
Definition: topology.h:1125
bool CheckOrientation(FaceType &f, int z)
Definition: topology.h:380
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:930
void VFDetach(FaceType &f)
Definition: topology.h:862
void FFDetachManifold(FaceType &f, const int e)
Definition: topology.h:220
void SwapEdge(FaceType &f, const int z)
Definition: topology.h:402
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:1326
bool ShareEdgeFF(FaceType *f0, FaceType *f1, int *i0=0, int *i1=0)
Definition: topology.h:1252
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:906
bool FindSharedEdge(FaceType *f0, FaceType *f1, int &i, int &j)
Definition: topology.h:1308
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:958
bool FindSharedVertex(FaceType *f0, FaceType *f1, int &i, int &j)
Definition: topology.h:1291
void FFEdgeCollapse(MeshType &m, typename MeshType::FaceType &f, const int z)
a simple edge collapse using only FF adjacency
Definition: topology.h:506
void FFDetach(FaceType &f, const int e)
Definition: topology.h:250
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:993
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 adjacency.
Definition: topology.h:1165
void FFAttach(FaceType &f, int z1, FaceType &f2, int z2)
Definition: topology.h:305
bool FFLinkCondition(FaceType &f, const int z)
Definition: topology.h:460
Definition: namespaces.dox:6