24 result =
V3D(1, 0, 0);
25 }
else if (direction ==
Y) {
26 result =
V3D(0, 1, 0);
28 result =
V3D(0, 0, 1);
38std::string directionToString(
const PointingAlong &direction) {
42 }
else if (direction ==
Y) {
75 : m_up(up), m_alongBeam(alongBeam), m_thetaSign(thetaSign), m_handedness(handedness), m_origin(
std::move(origin)) {
76 if (up == alongBeam) {
77 throw std::invalid_argument(
"Cannot have up direction the same as the beam direction");
79 if (thetaSign == alongBeam) {
80 throw std::invalid_argument(
"Scattering angle sign axis cannot be the same as the beam direction");
127 }
else if (
m_up ==
Y) {
ReferenceFrame : Holds reference frame information from the geometry description file.
std::string origin() const
Gets the origin.
std::string pointingHorizontalAxis() const
Pointing horizontal to beam as a string.
PointingAlong m_up
Pointing up axis.
std::string m_origin
Origin.
Mantid::Kernel::V3D vecPointingUp() const
Convert up axis into a 3D direction.
PointingAlong pointingUp() const
Gets the pointing up direction.
Mantid::Kernel::V3D vecPointingHorizontal() const
Convert along horizontal axis into a 3D direction.
Mantid::Kernel::V3D vecThetaSign() const
Convert along the axis defining the 2theta sign.
Handedness m_handedness
Handedness.
PointingAlong pointingHorizontal() const
Gets the pointing horizontal direction, i.e perpendicular to up & along beam.
Mantid::Kernel::V3D m_vecPointingAlongBeam
Vector pointing along the beam.
Handedness getHandedness() const
Gets the handedness.
PointingAlong pointingAlongBeam() const
Gets the beam pointing along direction.
PointingAlong m_alongBeam
Beam pointing along axis.
Mantid::Kernel::V3D m_vecPointingUp
Vector pointing up instrument.
std::string pointingAlongBeamAxis() const
Pointing along beam axis as a string.
PointingAlong m_thetaSign
Axis defining the 2theta sign.
Mantid::Kernel::V3D m_vecThetaSign
Vector denoting the direction defining the 2theta sign.
Mantid::Kernel::V3D vecPointingAlongBeam() const
Convert along beam axis into a 3D direction.
std::string pointingUpAxis() const
Pointing up axis as a string.
ReferenceFrame()
Default constructor.
bool isVectorPointingAlongBeam(const Mantid::Kernel::V3D &v) const
Test whether or not a vector is in the beam direction.
constexpr double scalar_prod(const V3D &v) const noexcept
Calculates the cross product.
Handedness
Type to distingusih between l and r handedness.
PointingAlong
Type to describe pointing along options.
MANTID_KERNEL_DLL V3D normalize(V3D v)
Normalizes a V3D.