summaryrefslogtreecommitdiff
path: root/thirdparty
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-17 23:36:10 +0200
committerGitHub <noreply@github.com>2022-05-17 23:36:10 +0200
commitfa0c9c951fc1a6b79d169519262f7034f9c29bbf (patch)
tree4fabe562611f6f7645bd0a5e4613f8ec4bd328b0 /thirdparty
parente2d0aa37796d342f7e205726ab865cc3d8aeec09 (diff)
parent10c99d7b41b9c039e4dd5249b8e3f56bda042157 (diff)
Merge pull request #61136 from akien-mga/xatlas-20220318
xatlas: Sync with upstream 16ace528a
Diffstat (limited to 'thirdparty')
-rw-r--r--thirdparty/README.md2
-rw-r--r--thirdparty/xatlas/xatlas.cpp5
2 files changed, 1 insertions, 6 deletions
diff --git a/thirdparty/README.md b/thirdparty/README.md
index b7bba97b4b..4634998bc2 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -718,7 +718,7 @@ File extracted from upstream release tarball:
## xatlas
- Upstream: https://github.com/jpcy/xatlas
-- Version: git (ec707faeac3b95e6b416076a9509718cce105b6a, 2021)
+- Version: git (16ace528acd2cf1f16a7c0dde99c42c486488dbe, 2022)
- License: MIT
Files extracted from upstream source:
diff --git a/thirdparty/xatlas/xatlas.cpp b/thirdparty/xatlas/xatlas.cpp
index d92ef1a83a..5c5c57ecab 100644
--- a/thirdparty/xatlas/xatlas.cpp
+++ b/thirdparty/xatlas/xatlas.cpp
@@ -4753,13 +4753,10 @@ public:
Vector2 *v = m_vertexBuffers[m_activeVertexBuffer];
v[m_numVertices] = v[0];
m_area = 0;
- float centroidx = 0, centroidy = 0;
for (uint32_t k = 0; k < m_numVertices; k++) {
// http://local.wasp.uwa.edu.au/~pbourke/geometry/polyarea/
float f = v[k].x * v[k + 1].y - v[k + 1].x * v[k].y;
m_area += f;
- centroidx += f * (v[k].x + v[k + 1].x);
- centroidy += f * (v[k].y + v[k + 1].y);
}
m_area = 0.5f * fabsf(m_area);
}
@@ -9089,7 +9086,6 @@ AddMeshError AddMesh(Atlas *atlas, const MeshDecl &meshDecl, uint32_t meshCountH
const uint32_t kMaxWarnings = 50;
uint32_t warningCount = 0;
internal::Array<uint32_t> triIndices;
- uint32_t firstFaceIndex = 0;
internal::Triangulator triangulator;
for (uint32_t face = 0; face < faceCount; face++) {
// Decode face indices.
@@ -9199,7 +9195,6 @@ AddMeshError AddMesh(Atlas *atlas, const MeshDecl &meshDecl, uint32_t meshCountH
for (uint32_t i = 0; i < triIndices.size(); i++)
meshPolygonMapping->triangleToPolygonIndicesMap.push_back(triIndices[i]);
}
- firstFaceIndex += faceVertexCount;
}
if (warningCount > kMaxWarnings)
XA_PRINT(" %u additional warnings truncated\n", warningCount - kMaxWarnings);