mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-28 12:40:06 +00:00
Use empty off mesh connections in benchmark
To get proper comparison with the next change removing it from the cache key.
This commit is contained in:
parent
cd9fb2adad
commit
6128fcfc82
@ -88,17 +88,6 @@ namespace
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename OutputIterator, typename Random>
|
|
||||||
void generateOffMeshConnection(OutputIterator out, std::size_t count, Random& random)
|
|
||||||
{
|
|
||||||
std::uniform_real_distribution<btScalar> distribution(0.0, 1.0);
|
|
||||||
std::generate_n(out, count, [&] {
|
|
||||||
const osg::Vec3f start(distribution(random), distribution(random), distribution(random));
|
|
||||||
const osg::Vec3f end(distribution(random), distribution(random), distribution(random));
|
|
||||||
return OffMeshConnection {start, end, generateAreaType(random)};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Random>
|
template <class Random>
|
||||||
Key generateKey(std::size_t triangles, Random& random)
|
Key generateKey(std::size_t triangles, Random& random)
|
||||||
{
|
{
|
||||||
@ -117,7 +106,6 @@ namespace
|
|||||||
RecastMesh recastMesh(generation, revision, std::move(indices), std::move(vertices),
|
RecastMesh recastMesh(generation, revision, std::move(indices), std::move(vertices),
|
||||||
std::move(areaTypes), std::move(water));
|
std::move(areaTypes), std::move(water));
|
||||||
std::vector<OffMeshConnection> offMeshConnections;
|
std::vector<OffMeshConnection> offMeshConnections;
|
||||||
generateOffMeshConnection(std::back_inserter(offMeshConnections), 300, random);
|
|
||||||
return Key {agentHalfExtents, tilePosition, std::move(recastMesh), std::move(offMeshConnections)};
|
return Key {agentHalfExtents, tilePosition, std::move(recastMesh), std::move(offMeshConnections)};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user