Skip to content
Snippets Groups Projects
Commit 4ad1ebd4 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Add pose Y buttons

parent c0798b79
No related branches found
No related tags found
No related merge requests found
...@@ -92,7 +92,13 @@ PoseWindow::PoseWindow(nanogui::Widget *parent, ftl::ctrl::Master *ctrl, const s ...@@ -92,7 +92,13 @@ PoseWindow::PoseWindow(nanogui::Widget *parent, ftl::ctrl::Master *ctrl, const s
tools->setFixedWidth(150); tools->setFixedWidth(150);
new Widget(tools); button = new Button(tools, "Up");
button->setCallback([this]() {
Eigen::Affine3d transform(Eigen::Translation3d(0.0,-pose_precision_,0.0));
Eigen::Matrix4d matrix = transform.matrix();
pose_ *= matrix;
ctrl_->setPose(src_, pose_);
});
button = new Button(tools, "", ENTYPO_ICON_CHEVRON_UP); button = new Button(tools, "", ENTYPO_ICON_CHEVRON_UP);
button->setCallback([this]() { button->setCallback([this]() {
Eigen::Affine3d transform(Eigen::Translation3d(0.0,0.0,-pose_precision_)); Eigen::Affine3d transform(Eigen::Translation3d(0.0,0.0,-pose_precision_));
...@@ -100,7 +106,13 @@ PoseWindow::PoseWindow(nanogui::Widget *parent, ftl::ctrl::Master *ctrl, const s ...@@ -100,7 +106,13 @@ PoseWindow::PoseWindow(nanogui::Widget *parent, ftl::ctrl::Master *ctrl, const s
pose_ *= matrix; pose_ *= matrix;
ctrl_->setPose(src_, pose_); ctrl_->setPose(src_, pose_);
}); });
new Widget(tools); button = new Button(tools, "Down");
button->setCallback([this]() {
Eigen::Affine3d transform(Eigen::Translation3d(0.0,pose_precision_,0.0));
Eigen::Matrix4d matrix = transform.matrix();
pose_ *= matrix;
ctrl_->setPose(src_, pose_);
});
button = new Button(tools, "", ENTYPO_ICON_CHEVRON_LEFT); button = new Button(tools, "", ENTYPO_ICON_CHEVRON_LEFT);
button->setCallback([this]() { button->setCallback([this]() {
......
...@@ -125,7 +125,8 @@ SourceWindow::SourceWindow(nanogui::Widget *parent, ftl::ctrl::Master *ctrl) ...@@ -125,7 +125,8 @@ SourceWindow::SourceWindow(nanogui::Widget *parent, ftl::ctrl::Master *ctrl)
auto button_pose = new Button(this, "Adjust Pose", ENTYPO_ICON_COMPASS); auto button_pose = new Button(this, "Adjust Pose", ENTYPO_ICON_COMPASS);
button_pose->setCallback([this]() { button_pose->setCallback([this]() {
new PoseWindow(screen(), ctrl_, src_->getURI()); auto posewin = new PoseWindow(screen(), ctrl_, src_->getURI());
posewin->setTheme(theme());
}); });
#ifdef HAVE_LIBARCHIVE #ifdef HAVE_LIBARCHIVE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment