added the possibility of preserving corners of the triangle mesh during

the quadrangulation
This commit is contained in:
nico 2017-05-04 03:13:08 +02:00
parent db17401d67
commit aada1502e4
1 changed files with 5 additions and 1 deletions

View File

@ -671,7 +671,8 @@ public:
void Quadrangulate(TriMesh &Tmesh,
PolyMesh &Pmesh,
std::vector< std::vector< short int> > &UV)
std::vector< std::vector< short int> > &UV,
bool preserve_border_corner=true)
{
UV.clear();
Pmesh.Clear();
@ -714,6 +715,9 @@ public:
for (int i=0;i<Tmesh.face.size();i++)
Tmesh.face[i].C()=vcg::Color4b(255,255,255,255);
if (preserve_border_corner)
vcg::tri::UpdateSelection<TriMesh>::VertexCornerBorder(Tmesh,math::ToRad(150.0),true);
std::vector<std::vector<TriVertexType *> > polygons;
FindPolygons(Tmesh,polygons,UV);