jfjoch_viewer: Pan with right click + center 000 button
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 11m5s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m34s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m10s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 9m18s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 12m35s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 13m30s
Build Packages / build:rpm (rocky8) (push) Successful in 12m25s
Build Packages / build:rpm (rocky9) (push) Successful in 11m31s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m24s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m20s
Build Packages / DIALS test (push) Successful in 11m13s
Build Packages / XDS test (durin plugin) (push) Successful in 7m58s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 8m5s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m56s
Build Packages / Generate python client (push) Successful in 24s
Build Packages / Build documentation (push) Successful in 41s
Build Packages / Create release (push) Skipped
Build Packages / Unit tests (push) Successful in 45m14s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 11m5s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m34s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m10s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 9m18s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 12m35s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 13m30s
Build Packages / build:rpm (rocky8) (push) Successful in 12m25s
Build Packages / build:rpm (rocky9) (push) Successful in 11m31s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m24s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m20s
Build Packages / DIALS test (push) Successful in 11m13s
Build Packages / XDS test (durin plugin) (push) Successful in 7m58s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 8m5s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m56s
Build Packages / Generate python client (push) Successful in 24s
Build Packages / Build documentation (push) Successful in 41s
Build Packages / Create release (push) Skipped
Build Packages / Unit tests (push) Successful in 45m14s
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <QPushButton>
|
||||
|
||||
// ============================================================================
|
||||
// Shaders
|
||||
@@ -194,6 +195,11 @@ void ReciprocalSpaceGLView::setLines(const std::vector<Vertex> &lines) {
|
||||
update();
|
||||
}
|
||||
|
||||
void ReciprocalSpaceGLView::resetTarget() {
|
||||
target_ = QVector3D(0.0f, 0.0f, 0.0f);
|
||||
update();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
void ReciprocalSpaceGLView::setupVAO(QOpenGLVertexArrayObject &vao,
|
||||
@@ -269,7 +275,7 @@ void ReciprocalSpaceGLView::mouseMoveEvent(QMouseEvent *e) {
|
||||
pitch_ += delta.y() * 0.5f;
|
||||
pitch_ = qBound(-89.0f, pitch_, 89.0f);
|
||||
update();
|
||||
} else if (e->buttons() & Qt::MiddleButton) {
|
||||
} else if (e->buttons() & Qt::RightButton) {
|
||||
const float panScale = zoom_ * 0.0015f;
|
||||
|
||||
QMatrix4x4 rot;
|
||||
@@ -366,10 +372,13 @@ JFJochViewerReciprocalSpaceWindow::JFJochViewerReciprocalSpaceWindow(QWidget *pa
|
||||
showPredictedCheck = new QCheckBox("Show predicted nodes", central);
|
||||
showPredictedCheck->setChecked(true);
|
||||
|
||||
auto *centerOriginButton = new QPushButton("Center 000", central);
|
||||
|
||||
controls->addWidget(crystalFrameCheck);
|
||||
controls->addWidget(showCellCheck);
|
||||
controls->addWidget(showPredictedCheck);
|
||||
controls->addStretch(1);
|
||||
controls->addWidget(centerOriginButton);
|
||||
|
||||
layout->addLayout(controls);
|
||||
setCentralWidget(central);
|
||||
@@ -380,6 +389,8 @@ JFJochViewerReciprocalSpaceWindow::JFJochViewerReciprocalSpaceWindow(QWidget *pa
|
||||
this, &JFJochViewerReciprocalSpaceWindow::rebuildGL);
|
||||
connect(showPredictedCheck, &QCheckBox::toggled,
|
||||
this, &JFJochViewerReciprocalSpaceWindow::rebuildGL);
|
||||
connect(centerOriginButton, &QPushButton::clicked,
|
||||
glView_, &ReciprocalSpaceGLView::resetTarget);
|
||||
|
||||
// Reuse the existing helper-window zoom signal. The main window should connect
|
||||
// this to JFJochDiffractionImage::centerOnSpot, like the spot/reflection lists.
|
||||
|
||||
@@ -42,6 +42,8 @@ public:
|
||||
float pickable = 0.0f;
|
||||
};
|
||||
|
||||
void resetTarget();
|
||||
|
||||
// Called by the outer window whenever data changes.
|
||||
void setSpots(const std::vector<Vertex> &spots);
|
||||
void setLines(const std::vector<Vertex> &lines); // axes + cell vectors
|
||||
|
||||
Reference in New Issue
Block a user