Mantid
Loading...
Searching...
No Matches
IObject.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 +
10
11#include <boost/python/class.hpp>
12#include <boost/python/register_ptr_to_python.hpp>
13
15using namespace Mantid::PythonInterface;
16using namespace boost::python;
17
19
21 register_ptr_to_python<std::shared_ptr<IObject>>();
22
23 // a copy, not a view: getLabFrameSampleShape hands back a new shape that Python may free first
24 using return_cloned_numpy = return_value_policy<Policies::MatrixRefToNumpy<Converters::Clone>>;
25
26 class_<IObject, boost::noncopyable>("IObject", no_init)
27 .def("getAppliedRotation", &IObject::getAppliedRotation, arg("self"), return_cloned_numpy(),
28 "Return the goniometer rotation baked into this shape.\n\n"
29 "This reports which frame the shape is in, not every rotation it has ever had. "
30 "Definition-frame rotations - the file-load orientation of :ref:`algm-LoadSampleShape`, "
31 "the sample environment spec, 'rotate-all' and per-primitive 'rotate' tags, and "
32 ":ref:`algm-RotateSampleShape` - re-express the shape within its own frame and are "
33 "excluded. The identity therefore means the shape is expressed in its own frame, however "
34 "much its definition has been rotated within that frame.");
35}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition GetPointer.h:17
void export_IObject()
Definition IObject.cpp:20
IObject : Interface for geometry objects.
Definition IObject.h:43
virtual const Kernel::Matrix< double > & getAppliedRotation() const
The goniometer rotation baked into this shape, i.e.
Definition IObject.h:59