This repository has been archived by the owner on Jul 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
winslam.cpp
71 lines (56 loc) · 1.62 KB
/
winslam.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
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
69
70
71
#include "winslam.h"
Winslam::Winslam(MainWindow *mw)
: mainWindow(mw)
{
tetrahedron = new Tetrahedron;
QVBoxLayout *mainLayout = new QVBoxLayout;
QHBoxLayout *container = new QHBoxLayout;
container->addWidget(tetrahedron);
QWidget *w = new QWidget;
w->setLayout(container);
mainLayout->addWidget(w);
setLayout(mainLayout);
setWindowTitle(tr("SLAMTestBed"));
}
QSlider *Winslam::createSlider()
{
QSlider *slider = new QSlider(Qt::Vertical);
slider->setRange(0, 360 * 16);
slider->setSingleStep(16);
slider->setPageStep(15 * 16);
slider->setTickInterval(15 * 16);
slider->setTickPosition(QSlider::TicksRight);
return slider;
}
void Winslam::keyPressEvent(QKeyEvent *e)
{
if (e->key() == Qt::Key_Escape)
close();
else
QWidget::keyPressEvent(e);
}
void Winslam::setDataView(Eigen::MatrixXd dataModel){
tetrahedron->setDataView(dataModel);
}
void Winslam::setContaminatedDataView(Eigen::MatrixXd dataModelContaminated){
tetrahedron->setContaminatedDataView(dataModelContaminated);
}
void Winslam::setEstimatedDataView(Eigen::MatrixXd dataModelEstimated){
tetrahedron->setEstimatedDataView(dataModelEstimated);
}
void Winslam::setScala(double X, double Y, double Z){
std::cout<< "WinSlam.setScala" <<std::endl;
tetrahedron->setScala(X,Y,Z);
}
void Winslam::setTrasla(double X, double Y, double Z){
tetrahedron->setTrasla(X,Y,Z);
}
void Winslam::setDots(){
tetrahedron->setDots();
}
void Winslam::setLines(){
tetrahedron->setLines();
}
void Winslam::setViewJustEstimated(){
tetrahedron->setViewJustEstimated();
}