Mantid
Loading...
Searching...
No Matches
ReferenceFrame.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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 +
9
10#include <boost/python/class.hpp>
11#include <boost/python/enum.hpp>
12#include <boost/python/register_ptr_to_python.hpp>
13#include <memory>
14
16using namespace boost::python;
17
19
21 using namespace Mantid::Geometry;
22
23 register_ptr_to_python<std::shared_ptr<ReferenceFrame>>();
24
25 enum_<PointingAlong>("PointingAlong").value("X", X).value("Y", Y).value("Z", Z).export_values();
26
27 class_<ReferenceFrame, boost::noncopyable>("ReferenceFrame", no_init)
28 .def("pointingAlongBeam", &ReferenceFrame::pointingAlongBeam, arg("self"))
29 .def("pointingUp", &ReferenceFrame::pointingUp, arg("self"))
30 .def("vecPointingUp", &ReferenceFrame::vecPointingUp, arg("self"))
31 .def("vecPointingAlongBeam", &ReferenceFrame::vecPointingAlongBeam, arg("self"))
32 .def("pointingAlongBeamAxis", &ReferenceFrame::pointingAlongBeamAxis, arg("self"))
33 .def("pointingUpAxis", &ReferenceFrame::pointingUpAxis, arg("self"))
34 .def("pointingHorizontalAxis", &ReferenceFrame::pointingHorizontalAxis, arg("self"));
35}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition: GetPointer.h:17
void export_ReferenceFrame()
ReferenceFrame : Holds reference frame information from the geometry description file.
std::string pointingHorizontalAxis() const
Pointing horizontal to beam as a string.
Mantid::Kernel::V3D vecPointingUp() const
Convert up axis into a 3D direction.
PointingAlong pointingUp() const
Gets the pointing up direction.
PointingAlong pointingAlongBeam() const
Gets the beam pointing along direction.
std::string pointingAlongBeamAxis() const
Pointing along beam axis as a string.
Mantid::Kernel::V3D vecPointingAlongBeam() const
Convert along beam axis into a 3D direction.
std::string pointingUpAxis() const
Pointing up axis as a string.