mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 06:29:56 +00:00
Update navmeshtilescache benchmark generators
This commit is contained in:
parent
fdee9db20c
commit
28b2f769c2
1 changed files with 4 additions and 4 deletions
|
@ -94,8 +94,8 @@ namespace
|
||||||
std::vector<float> vertices;
|
std::vector<float> vertices;
|
||||||
std::vector<int> indices;
|
std::vector<int> indices;
|
||||||
std::vector<AreaType> areaTypes;
|
std::vector<AreaType> areaTypes;
|
||||||
generateVertices(std::back_inserter(vertices), triangles * 1.98, random);
|
generateVertices(std::back_inserter(vertices), triangles * 1.946, random);
|
||||||
generateIndices(std::back_inserter(indices), static_cast<int>(vertices.size() / 3) - 1, vertices.size() * 1.53, random);
|
generateIndices(std::back_inserter(indices), static_cast<int>(vertices.size() / 3) - 1, vertices.size() * 1.545, random);
|
||||||
generateAreaTypes(std::back_inserter(areaTypes), indices.size() / 3, random);
|
generateAreaTypes(std::back_inserter(areaTypes), indices.size() / 3, random);
|
||||||
return Mesh(std::move(indices), std::move(vertices), std::move(areaTypes));
|
return Mesh(std::move(indices), std::move(vertices), std::move(areaTypes));
|
||||||
}
|
}
|
||||||
|
@ -109,12 +109,12 @@ namespace
|
||||||
const std::size_t revision = std::uniform_int_distribution<std::size_t>(0, 10000)(random);
|
const std::size_t revision = std::uniform_int_distribution<std::size_t>(0, 10000)(random);
|
||||||
Mesh mesh = generateMesh(triangles, random);
|
Mesh mesh = generateMesh(triangles, random);
|
||||||
std::vector<Cell> water;
|
std::vector<Cell> water;
|
||||||
generateWater(std::back_inserter(water), 2, random);
|
generateWater(std::back_inserter(water), 1, random);
|
||||||
RecastMesh recastMesh(generation, revision, std::move(mesh), std::move(water));
|
RecastMesh recastMesh(generation, revision, std::move(mesh), std::move(water));
|
||||||
return Key {agentHalfExtents, tilePosition, std::move(recastMesh)};
|
return Key {agentHalfExtents, tilePosition, std::move(recastMesh)};
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr std::size_t trianglesPerTile = 310;
|
constexpr std::size_t trianglesPerTile = 438;
|
||||||
|
|
||||||
template <typename OutputIterator, typename Random>
|
template <typename OutputIterator, typename Random>
|
||||||
void generateKeys(OutputIterator out, std::size_t count, Random& random)
|
void generateKeys(OutputIterator out, std::size_t count, Random& random)
|
||||||
|
|
Loading…
Reference in a new issue