]> git.sur5r.net Git - fstl/blob - src/loader.cpp
Adding hash-based mesh loading (better big-O)
[fstl] / src / loader.cpp
1 #include "loader.h"
2 #include "mesh.h"
3
4 Loader::Loader(QObject* parent, const QString& filename)
5     : QThread(parent), filename(filename)
6 {
7 }
8
9 void Loader::run()
10 {
11     QTime timer;
12     timer.start();
13     emit got_mesh(Mesh::load_stl(filename));
14     qDebug() << "Sorted:" << timer.elapsed();
15
16     timer.start();
17     emit got_mesh(Mesh::load_stl_hash(filename));
18     qDebug() << "Hash:" << timer.elapsed();
19
20     emit loaded_file(filename);
21 }