mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
limit vertex deduplication search to 1000 vertices, it was too slow
This commit is contained in:
@@ -202,7 +202,7 @@ void calculate_indices( index_array &Indices, vertex_array &Vertices, float tole
|
||||
// if found, remap these to use our current vertex instead
|
||||
auto vertex { Vertices[ idx ] };
|
||||
auto matchiter { std::cbegin( Vertices ) + idx };
|
||||
for( auto matchidx = idx + 1; matchidx < Indices.size(); ++matchidx ) {
|
||||
for( auto matchidx = idx + 1; matchidx < Indices.size() && matchidx < idx + 1000; ++matchidx ) {
|
||||
++matchiter;
|
||||
if( ( glm::all( glm::epsilonEqual( vertex.position, matchiter->position, matchtolerance ) ) )
|
||||
&& ( glm::all( glm::epsilonEqual( vertex.normal, matchiter->normal, matchtolerance ) ) )
|
||||
|
||||
Reference in New Issue
Block a user