16 #include "Base/Const/Units.h"
17 #include "Base/Vector/RotMatrix.h"
19 #include "Sample/Scattering/Rotations.h"
21 using namespace Units;
29 auto p = createRotation();
30 return (p !=
nullptr) ? p->rotMatrix() : RotMatrix();
37 m_angle.init(
"Angle",
"Rotation angle around x-axis", 0.0,
Unit::degree,
"angle");
48 return std::make_unique<RotationX>(deg2rad(angle()));
60 m_angle.init(
"Angle",
"Rotation angle around y-axis", 0.0,
Unit::degree,
"angle");
71 return std::make_unique<RotationY>(deg2rad(angle()));
83 m_angle.init(
"Angle",
"Rotation angle around z-axis", 0.0,
Unit::degree,
"angle");
94 return std::make_unique<RotationZ>(deg2rad(angle()));
106 m_alpha.init(
"Alpha",
"First Euler angle in z-x'-z' sequence", 0.0,
Unit::degree,
"alpha");
107 m_beta.init(
"Beta",
"Second Euler angle in z-x'-z' sequence", 0.0,
Unit::degree,
"beta");
108 m_gamma.init(
"Gamma",
"Third Euler angle in z-x'-z' sequence", 0.0,
Unit::degree,
"gamma");
121 return std::make_unique<RotationEuler>(deg2rad(alpha()), deg2rad(beta()), deg2rad(gamma()));
Defines class RotationItems.
Describes properties of a double value which are necessary to allow GUI representation,...
unique_ptr< IRotation > createRotation() const override
DoubleDescriptor alpha() const
void serialize(Streamer &s) override
DoubleDescriptor gamma() const
DoubleDescriptor beta() const
RotMatrix rotation() const
Supports serialization to or deserialization from QXmlStream.
void assertVersion(unsigned expectedVersion) const
As reader, throws DeserializationException unless the expected version is read. As writer,...
unique_ptr< IRotation > createRotation() const override
void serialize(Streamer &s) override
DoubleDescriptor angle() const
DoubleDescriptor angle() const
void serialize(Streamer &s) override
unique_ptr< IRotation > createRotation() const override
DoubleDescriptor angle() const
unique_ptr< IRotation > createRotation() const override
void serialize(Streamer &s) override
void rwProperty(Streamer &s, DoubleProperty &d)