From b004edfdb6877e4718bf8d8cf4e708f55430a8d8 Mon Sep 17 00:00:00 2001 From: James Beilsten-Edmands <30625594+jbeilstenedmands@users.noreply.github.com> Date: Fri, 13 Nov 2026 11:21:21 +0000 Subject: [PATCH] Add non const detector panels() method --- dx2/detector.cxx | 2 ++ include/dx2/detector.hpp | 1 + 2 files changed, 3 insertions(+) diff --git a/dx2/detector.cxx b/dx2/detector.cxx index ade33b5..a8d8fe1 100644 --- a/dx2/detector.cxx +++ b/dx2/detector.cxx @@ -344,6 +344,8 @@ json Detector::to_json() const { const std::vector &Detector::panels() const { return _panels; } +std::vector &Detector::panels() { return _panels; } + void Detector::update(Matrix3d d) { _panels[0].update(d); } std::optional diff --git a/include/dx2/detector.hpp b/include/dx2/detector.hpp index 401fd43..851512d 100644 --- a/include/dx2/detector.hpp +++ b/include/dx2/detector.hpp @@ -114,6 +114,7 @@ class Detector { Detector(std::vector panels); json to_json() const; const std::vector &panels() const; + std::vector &panels(); std::optional get_ray_intersection(const Vector3d &s1) const; void update(Matrix3d d);