9#include "MantidKernel/DllConfig.h"
16template <
class T>
class Matrix;
38class MANTID_KERNEL_DLL
Quat {
43 Quat(
const double _w,
const double _a,
const double _b,
const double _c);
50 Quat(
const double _deg,
const V3D &_axis);
53 void operator()(
const Quat &);
54 void operator()(
const double ww,
const double aa,
const double bb,
const double cc);
55 void operator()(
const double angle,
const V3D &);
56 void operator()(
const V3D &rX,
const V3D &rY,
const V3D &rZ);
58 void set(
const double ww,
const double aa,
const double bb,
const double cc);
59 void setAngleAxis(
const double _deg,
const V3D &_axis);
60 void getAngleAxis(
double &_deg,
double &_ax0,
double &_ax1,
double &ax2)
const;
61 std::vector<double> getEulerAngles(
const std::string &convention)
const;
77 bool isNull(
const double tolerance = 0.001)
const;
81 void GLMatrix(
double *mat)
const;
86 std::vector<double> getRotation(
bool check_normalisation =
false,
bool throw_on_errors =
false)
const;
88 void setQuat(
const double mat[16]);
93 void rotate(
V3D &)
const;
100 void rotateBB(
double &xmin,
double &ymin,
double &zmin,
double &xmax,
double &ymax,
double &zmax)
const;
110 double operator[](
int)
const;
111 double &operator[](
int);
116 inline double real()
const {
return w; }
118 inline double imagI()
const {
return a; }
120 inline double imagJ()
const {
return b; }
122 inline double imagK()
const {
return c; }
125 void printSelf(std::ostream &)
const;
126 void readPrinted(std::istream &);
128 void fromString(
const std::string &str);
141MANTID_KERNEL_DLL std::ostream &
operator<<(std::ostream &,
const Quat &);
142MANTID_KERNEL_DLL std::istream &
operator>>(std::istream &,
Quat &q);
void(ComponentInfo::* setRotation)(const size_t, const Mantid::Kernel::Quat &)
std::vector< double > getAngleAxis(Quat &self)
Extracts the angle of rotation and axis.
double imagJ() const
Access the coefficient of j.
double real() const
Access the real part.
double imagI() const
Access the coefficient of i.
double imagK() const
Access the coefficient of k.
MatrixWorkspace_sptr MANTID_API_DLL operator+=(const MatrixWorkspace_sptr &lhs, const MatrixWorkspace_sptr &rhs)
Adds two workspaces.
MatrixWorkspace_sptr MANTID_API_DLL operator-=(const MatrixWorkspace_sptr &lhs, const MatrixWorkspace_sptr &rhs)
Subtracts two workspaces.
MatrixWorkspace_sptr MANTID_API_DLL operator*=(const MatrixWorkspace_sptr &lhs, const MatrixWorkspace_sptr &rhs)
Multiply two workspaces.
MANTID_KERNEL_DLL std::ostream & operator<<(std::ostream &, CPUTimer &)
Convenience function to provide for easier debug printing.
MANTID_KERNEL_DLL std::istream & operator>>(std::istream &, Interpolation &)
Reads in parameter value.
std::string toString(const T &value)
Convert values to strings.
MANTID_KERNEL_DLL V3D normalize(V3D v)
Normalizes a V3D.
Helper class which provides the Collimation Length for SANS instruments.
constexpr wide_integer< Bits, Signed > operator-(const wide_integer< Bits, Signed > &lhs) noexcept(is_same< Signed, unsigned >::value)
constexpr bool operator==(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)
constexpr bool operator!=(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)
std::common_type_t< wide_integer< Bits, Signed >, wide_integer< Bits2, Signed2 > > constexpr operator*(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)
constexpr wide_integer< Bits, Signed > operator+(const wide_integer< Bits, Signed > &lhs) noexcept(is_same< Signed, unsigned >::value)