-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.cpp
42 lines (29 loc) · 1009 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <QCoreApplication>
#include <QCommandLineParser>
#include <iostream>
#include <chrono>
#include "poisson.h"
using namespace std;
using namespace std::chrono;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
////////////////////////////////////////////////////////////////////////////////
QCommandLineParser parser;
parser.addHelpOption();
parser.addPositionalArgument("infile", "Input .ply file path");
parser.addPositionalArgument("outfile", "Output .obj file path");
parser.process(a);
const QStringList args = parser.positionalArguments();
if(args.size() < 2) {
cerr << "Error: Wrong number of arguments" << endl;
a.exit(1);
return 1;
}
QString infile = args[0];
QString outfile = args[1];
Poisson reconstructor;
reconstructor.reconstruct(infile.toStdString(), outfile.toStdString());
////////////////////////////////////////////////////////////////////////////////
a.exit();
}