summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/wizard.cpp
blob: e432ddf50d50573d601addb7c5771a350120bea9 (plain)
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
#include "wizard.h"

Wizard::Wizard() : QWizard(nullptr)
{
    ui.setupUi(this);
    connect(this, SIGNAL(accepted()), this, SLOT(set_data()));
}

static constexpr double tz[][2] = {
    { 16.5327205657959, 13.0232553482056 },
    { 55.4535026550293, 100 },
    { 56.8312301635742, 100 },
    { -1, -1 },
};

static constexpr double yaw[][2] = {
    { 10.7462686567164, 20.9302325581395 },
    { 41.9517784118652, 180 },
    { -1, -1 },
};

static constexpr double pitch[][2] = {
    { 10.1262916188289, 27.6279069767442 },
    { 32.4454649827784, 180 },
    { -1, -1 },
};

static constexpr double roll[][2] = {
    { 12.3995409011841, 25.9534893035889 },
    { 54.3513221740723, 180 },
    { -1, -1 },
};

static void set_mapping(Mapping& m, double* spline[2])
{
    m.opts.altp = false;
    m.curve.removeAllPoints();
    for (int i = 0; spline[i][0] >= 0; i++)
        m.curve.addPoint(QPointF(spline[i][0], spline[i][1]));
}

void Wizard::set_data()
{
    Model m;

    if (ui.clip_model->isChecked())
        m = ClipRight;
    else if (ui.clip_model_left->isChecked())
        m = ClipLeft;
    else // ui.cap_model
        m = Cap;

    auto camera_mode = static_cast<CameraMode>(ui.resolution_select->currentIndex());

    settings_pt pt;
    main_settings s;

    pt.threshold = 31;

    qDebug() << "wizard done" << "model" << m << "camera-mode" << camera_mode;
}