Skip to content

Commit

Permalink
Fix incombinable result
Browse files Browse the repository at this point in the history
  • Loading branch information
huxingyi committed Dec 10, 2022
1 parent d23113e commit 69ad532
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dust3d/mesh/mesh_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,13 @@ void MeshGenerator::collectIncombinableMesh(const MeshState* mesh, const Generat
updateVertexIndices(uncombinedFaces);
updateVertexIndices(uncombinedTriangleAndQuads);

for (const auto& it : componentCache.partTriangleUvs)
m_object->partTriangleUvs.insert({ it.first, it.second });
for (const auto& it : componentCache.positionToNodeIdMap)
m_object->positionToNodeIdMap.emplace(it);
for (const auto& it : componentCache.nodeMap)
m_object->nodeMap.emplace(it);

m_object->vertices.insert(m_object->vertices.end(), uncombinedVertices.begin(), uncombinedVertices.end());
m_object->triangles.insert(m_object->triangles.end(), uncombinedFaces.begin(), uncombinedFaces.end());
m_object->triangleAndQuads.insert(m_object->triangleAndQuads.end(), uncombinedTriangleAndQuads.begin(), uncombinedTriangleAndQuads.end());
Expand Down

0 comments on commit 69ad532

Please sign in to comment.