From ad55b47a9b0700e7b427db6db287bb3a39aa31e7 Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Mon, 18 Nov 2024 13:56:46 +0100 Subject: [PATCH] fix missing vertex texcoord when importing from polymesh matrices --- src/common/utilities/eigen_mesh_conversions.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/utilities/eigen_mesh_conversions.cpp b/src/common/utilities/eigen_mesh_conversions.cpp index 57cb860d9..e022fe49a 100644 --- a/src/common/utilities/eigen_mesh_conversions.cpp +++ b/src/common/utilities/eigen_mesh_conversions.cpp @@ -41,7 +41,8 @@ class PVertex : vertex::Normal3f, vertex::Qualityf, vertex::Color4b, - vertex::BitFlags> + vertex::BitFlags, + vertex::TexCoord2f> { }; class PEdge : public Edge @@ -330,6 +331,7 @@ CMeshO meshlab::polyMeshFromMatrices( } m.vert.EnableTexCoord(); } + PolyMesh::VertexIterator vi = vcg::tri::Allocator::AddVertices(pm, vertices.rows()); for (unsigned int i = 0; i < vertices.rows(); ++i, ++vi) {