Fix build

master
Jeremy Hu 2018-10-20 21:58:20 +08:00
parent ec47c20919
commit 0320be1c15
2 changed files with 3 additions and 4 deletions

View File

@ -133,11 +133,10 @@ MeshLoader::MeshLoader(void *meshlite, int meshId, int triangulatedMeshId, QColo
triangulatedFace.color.setBlueF(useColorB);
QVector3D positions[3];
if (smoothNormal) {
inputTrianglesForSmoothAngle.push_back({
(size_t)triangleIndices[firstIndex + 0],
inputTrianglesForSmoothAngle.push_back(std::make_tuple((size_t)triangleIndices[firstIndex + 0],
(size_t)triangleIndices[firstIndex + 1],
(size_t)triangleIndices[firstIndex + 2]
});
));
inputNormalsForSmoothAngle.push_back(QVector3D(triangleNormals[firstIndex + 0],
triangleNormals[firstIndex + 1],
triangleNormals[firstIndex + 2]));

View File

@ -429,7 +429,7 @@ void MeshResultContext::interpolateTriangleVertexNormals(std::vector<QVector3D>
for (const auto &vertex: vertices)
inputVerticies.push_back(vertex.position);
for (const auto &triangle: triangles) {
inputTriangles.push_back({triangle.indicies[0], triangle.indicies[1], triangle.indicies[2]});
inputTriangles.push_back(std::make_tuple((size_t)triangle.indicies[0], (size_t)triangle.indicies[1], (size_t)triangle.indicies[2]));
inputNormals.push_back(triangle.normal);
}
angleSmooth(inputVerticies, inputTriangles, inputNormals, thresholdAngleDegrees, resultNormals);