2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:47:42 +00:00

Lots of bug fixes (Windows still needs some fixes)

This commit is contained in:
Jack Andersen
2017-10-21 20:11:22 -10:00
parent 5e88b99769
commit 15d60493f2
53 changed files with 620 additions and 313 deletions

View File

@@ -144,14 +144,10 @@ static void MakeLeaf(const ColMesh& mesh, const std::vector<int>& index, Node& n
n.right.reset();
n.isLeaf = true;
n.leafData = std::make_unique<typename Node::LeafData>();
n.leafData->edgeIndexCount = atUint32(index.size() * 3);
n.leafData->edgeIndices.reserve(n.leafData->edgeIndexCount);
n.leafData->triangleIndexCount = atUint32(index.size());
n.leafData->triangleIndices.reserve(n.leafData->triangleIndexCount);
for (int i : index)
{
const ColMesh::Triangle& T = mesh.trianges[i];
for (int j = 0; j < 3; ++j)
n.leafData->edgeIndices.push_back(T.edges[j]);
}
n.leafData->triangleIndices.push_back(i);
}
template <typename Node>