15 #ifndef BORNAGAIN_SAMPLE_SCATTERING_ROTATIONS_H
16 #define BORNAGAIN_SAMPLE_SCATTERING_ROTATIONS_H
20 #include <heinz/Vectors3D.h>
33 IRotation(
const std::vector<double>& PValues);
63 std::string
className() const final {
return "IdentityRotation"; }
80 std::string
className() const final {
return "RotationX"; }
82 std::vector<ParaMeta>
parDefs() const final
84 return {{
"Angle",
"rad",
"Angle around x axis", -
INF, +
INF, 0}};
104 std::string
className() const final {
return "RotationY"; }
108 return {{
"Angle",
"rad",
"Angle around y axis", -
INF, +
INF, 0}};
128 std::string
className() const final {
return "RotationZ"; }
132 return {{
"Angle",
"rad",
"Angle around z axis", -
INF, +
INF, 0}};
152 std::string
className() const final {
return "RotationEuler"; }
156 return {{
"Alpha",
"rad",
"First Euler angle, rotation around z axis", -
INF, +
INF, 0},
157 {
"Beta",
"rad",
"Second Euler angle, rotation around x' axis", -
INF, +
INF, 0},
158 {
"Gamma",
"rad",
"Third Euler angle, rotation around z'' axis", -
INF, +
INF, 0}};
Defines and implements the standard mix-in ICloneable.
IRotation * createProduct(const IRotation &left, const IRotation &right)
Returns concatenated rotation (first right, then left).
Interface for polymorphic classes that should not be copied, except by explicit cloning.
Base class for tree-like structures containing parameterized objects.
Abstract base class for rotations.
IRotation * clone() const override=0
IRotation(const std::vector< double > &PValues)
virtual RotMatrix rotMatrix() const =0
Returns transformation.
virtual IRotation * createInverse() const =0
Returns a new IRotation object that is the current object's inverse.
R3 transformed(const R3 &v) const
virtual bool isIdentity() const
Returns true if rotation matrix is identity matrix (no rotations)
static IRotation * createRotation(const RotMatrix &transform)
The identity rotation, which leaves everything in place.
IdentityRotation * clone() const override
RotMatrix rotMatrix() const override
Returns transformation.
IdentityRotation * createInverse() const override
Returns a new IRotation object that is the current object's inverse.
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
bool isIdentity() const override
Returns true if rotation matrix is identity matrix (no rotations)
Rotation matrix in three dimensions. Represents group SO(3). Internal parameterization based on quate...
A sequence of rotations about the z-x'-z'' axes.
RotationEuler(std::vector< double > P)
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
RotationEuler * clone() const override
IRotation * createInverse() const override
Returns a new IRotation object that is the current object's inverse.
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
RotMatrix rotMatrix() const override
Returns transformation.
A rotation about the x axis.
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
RotationX(std::vector< double > P)
Constructor of rotation around x-axis.
RotMatrix rotMatrix() const override
Returns transformation.
RotationX * clone() const override
RotationX * createInverse() const override
Returns a new IRotation object that is the current object's inverse.
A rotation about the y axis.
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
RotationY(std::vector< double > P)
Constructor of rotation around y-axis.
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
RotationY * clone() const override
RotMatrix rotMatrix() const override
Returns transformation.
RotationY * createInverse() const override
Returns a new IRotation object that is the current object's inverse.
A rotation about the z axis.
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
RotationZ(std::vector< double > P)
Constructor of rotation around z-axis.
RotMatrix rotMatrix() const override
Returns transformation.
RotationZ * createInverse() const override
Returns a new IRotation object that is the current object's inverse.
RotationZ * clone() const override