added the possibility of preserving corners of the triangle mesh during
the quadrangulation
This commit is contained in:
parent
db17401d67
commit
aada1502e4
|
|
@ -671,7 +671,8 @@ public:
|
||||||
|
|
||||||
void Quadrangulate(TriMesh &Tmesh,
|
void Quadrangulate(TriMesh &Tmesh,
|
||||||
PolyMesh &Pmesh,
|
PolyMesh &Pmesh,
|
||||||
std::vector< std::vector< short int> > &UV)
|
std::vector< std::vector< short int> > &UV,
|
||||||
|
bool preserve_border_corner=true)
|
||||||
{
|
{
|
||||||
UV.clear();
|
UV.clear();
|
||||||
Pmesh.Clear();
|
Pmesh.Clear();
|
||||||
|
|
@ -714,6 +715,9 @@ public:
|
||||||
for (int i=0;i<Tmesh.face.size();i++)
|
for (int i=0;i<Tmesh.face.size();i++)
|
||||||
Tmesh.face[i].C()=vcg::Color4b(255,255,255,255);
|
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;
|
std::vector<std::vector<TriVertexType *> > polygons;
|
||||||
FindPolygons(Tmesh,polygons,UV);
|
FindPolygons(Tmesh,polygons,UV);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue