Adding hash-based mesh loading (better big-O)

This commit is contained in:
Matt Keeter 2014-03-22 12:54:06 -04:00
parent 3cd76f9306
commit 51e25316e8
3 changed files with 62 additions and 0 deletions

View file

@ -8,6 +8,14 @@ Loader::Loader(QObject* parent, const QString& filename)
void Loader::run()
{
QTime timer;
timer.start();
emit got_mesh(Mesh::load_stl(filename));
qDebug() << "Sorted:" << timer.elapsed();
timer.start();
emit got_mesh(Mesh::load_stl_hash(filename));
qDebug() << "Hash:" << timer.elapsed();
emit loaded_file(filename);
}