Mantid
Loading...
Searching...
No Matches
PositionAndRotationAccumulator.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2026 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include "MantidGeometry/DllConfig.h"
10#include "MantidKernel/Quat.h"
11#include "MantidKernel/V3D.h"
12
13#include <cstddef>
14#include <map>
15#include <string>
16
17namespace Mantid {
18namespace Geometry {
19
43class MANTID_GEOMETRY_DLL PositionAndRotationAccumulator {
44public:
47 void setCoordinate(const size_t componentIndex, const std::string &axis, const double value,
48 const Kernel::V3D &currentPosition);
49
51 void setPosition(const size_t componentIndex, const Kernel::V3D &position);
52
55 bool setRotationAngle(const size_t componentIndex, const std::string &axis, const double degrees);
56
58 std::map<size_t, Kernel::V3D> positions() const;
59
61 std::map<size_t, Kernel::Quat> rotations() const;
62
63private:
64 struct Position {
66 bool seeded{false};
67 };
68 struct Rotation {
69 double x{0.0};
70 double y{0.0};
71 double z{0.0};
72 };
73 std::map<size_t, Position> m_positions;
74 std::map<size_t, Rotation> m_rotations;
75};
76
77} // namespace Geometry
78} // namespace Mantid
double value
The value of the point.
Definition FitMW.cpp:51
double position
Definition GetAllEi.cpp:154
void(ComponentInfo::* setPosition)(const size_t, const Mantid::Kernel::V3D &)
Collects the position and rotation an instrument definition specifies piecemeal, so that each can be ...
Class for 3D vectors.
Definition V3D.h:34
Helper class which provides the Collimation Length for SANS instruments.