mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-11 13:21:10 +01:00
Fix unused variables in my modified xatlas.
This commit is contained in:
parent
01b2d8eedf
commit
a9fb61fb08
@ -4186,13 +4186,13 @@ public:
|
|||||||
Vector2 *v = m_vertexBuffers[m_activeVertexBuffer];
|
Vector2 *v = m_vertexBuffers[m_activeVertexBuffer];
|
||||||
v[m_numVertices] = v[0];
|
v[m_numVertices] = v[0];
|
||||||
m_area = 0;
|
m_area = 0;
|
||||||
float centroidx = 0, centroidy = 0;
|
//float centroidx = 0, centroidy = 0;
|
||||||
for (uint32_t k = 0; k < m_numVertices; k++) {
|
for (uint32_t k = 0; k < m_numVertices; k++) {
|
||||||
// http://local.wasp.uwa.edu.au/~pbourke/geometry/polyarea/
|
// 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;
|
float f = v[k].x * v[k + 1].y - v[k + 1].x * v[k].y;
|
||||||
m_area += f;
|
m_area += f;
|
||||||
centroidx += f * (v[k].x + v[k + 1].x);
|
//centroidx += f * (v[k].x + v[k + 1].x);
|
||||||
centroidy += f * (v[k].y + v[k + 1].y);
|
//centroidy += f * (v[k].y + v[k + 1].y);
|
||||||
}
|
}
|
||||||
m_area = 0.5f * fabsf(m_area);
|
m_area = 0.5f * fabsf(m_area);
|
||||||
}
|
}
|
||||||
@ -7458,7 +7458,7 @@ AddMeshError AddMesh(Atlas *atlas, const MeshDecl &meshDecl, uint32_t meshCountH
|
|||||||
const uint32_t kMaxWarnings = 50;
|
const uint32_t kMaxWarnings = 50;
|
||||||
uint32_t warningCount = 0;
|
uint32_t warningCount = 0;
|
||||||
internal::Array<uint32_t> triIndices;
|
internal::Array<uint32_t> triIndices;
|
||||||
uint32_t firstFaceIndex = 0;
|
//uint32_t firstFaceIndex = 0;
|
||||||
internal::Triangulator triangulator;
|
internal::Triangulator triangulator;
|
||||||
for (uint32_t face = 0; face < faceCount; face++) {
|
for (uint32_t face = 0; face < faceCount; face++) {
|
||||||
// Decode face indices.
|
// Decode face indices.
|
||||||
@ -7568,7 +7568,7 @@ AddMeshError AddMesh(Atlas *atlas, const MeshDecl &meshDecl, uint32_t meshCountH
|
|||||||
for (uint32_t i = 0; i < triIndices.size(); i++)
|
for (uint32_t i = 0; i < triIndices.size(); i++)
|
||||||
meshPolygonMapping->triangleToPolygonIndicesMap.push_back(triIndices[i]);
|
meshPolygonMapping->triangleToPolygonIndicesMap.push_back(triIndices[i]);
|
||||||
}
|
}
|
||||||
firstFaceIndex += faceVertexCount;
|
//firstFaceIndex += faceVertexCount;
|
||||||
}
|
}
|
||||||
if (warningCount > kMaxWarnings)
|
if (warningCount > kMaxWarnings)
|
||||||
XA_PRINT(" %u additional warnings truncated\n", warningCount - kMaxWarnings);
|
XA_PRINT(" %u additional warnings truncated\n", warningCount - kMaxWarnings);
|
||||||
|
Loading…
Reference in New Issue
Block a user