-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
68 lines (60 loc) · 1.69 KB
/
main.cpp
File metadata and controls
68 lines (60 loc) · 1.69 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QApplication>
#include <QLabel>
#include <QSurfaceFormat>
#ifndef QT_NO_OPENGL
#include "mainwidget.h"
#include "bvh_writer.h"
#endif
extern bool verbose = false;
extern std::string bvh_name ="ressources/xsens.bvh";
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
bool xsens = true;
// parse argument
if (app.arguments().size()>=2)
{
std::string arg = app.arguments().at(1).toStdString();
if ((arg == "-v")or(arg == "--verbose"))
{
verbose = true;
std::cout << "on set le verbose "<< std::endl;
if (app.arguments().size()>2)
{
arg = app.arguments().at(2).toStdString();
std::cout << arg << std::endl;
bvh_name = arg;
xsens = false;
}
std::cout << "on lenkfalenkf"<< std::endl;
}
else {
bvh_name = arg;
xsens = false;
}
}
if (xsens)
{
std::vector<std::string> files;
files.push_back("mouhcine-sia-xsens-data/MT_012005BA-000-000_00B47AB0.txt");
files.push_back("mouhcine-sia-xsens-data/MT_012005BA-000-000_00B47ACA.txt");
files.push_back("mouhcine-sia-xsens-data/MT_012005BA-000-000_00B47F0C.txt");
files.push_back("mouhcine-sia-xsens-data/MT_012005BA-000-000_00B48506.txt");
write_bvh( files, "ressources/xsens.bvh");
}
QSurfaceFormat format;
format.setDepthBufferSize(24);
QSurfaceFormat::setDefaultFormat(format);
app.setApplicationName("cube");
app.setApplicationVersion("0.1");
#ifndef QT_NO_OPENGL
MainWidget widget;
widget.show();
#else
QLabel note("OpenGL Support required");
note.show();
#endif
return app.exec();
}