Go to the documentation of this file.
49 buf <<
'(' << q.
w() <<
',' << q.
v() <<
')';
74 const scalar magV =
mag(q.
v());
81 const scalar expW =
exp(q.
w());
86 expW*
sin(magV)*q.
v()/magV
93 const scalar magQ =
mag(q);
94 const scalar magV =
mag(q.
v());
98 if (magV != 0 && magQ != 0)
101 powq *= power*
acos(q.
w()/magQ);
104 return pow(magQ, power)*
exp(powq);
110 const scalar magQ =
mag(q);
111 const scalar magV =
mag(q.
v());
115 if (magV != 0 && magQ != 0)
118 powq *= power*
acos(q.
w()/magQ);
121 return pow(magQ, power)*
exp(powq);
132 is >> q.
w() >> q.
v();
138 is.
check(
"operator>>(Istream&, quaternion&)");
Istream & readEnd(const char *funcName)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
A class for handling words, derived from string.
quaternion slerp(const quaternion &qa, const quaternion &qb, const scalar t)
Spherical linear interpolation of quaternions.
dimensionedScalar sin(const dimensionedScalar &ds)
static const char *const typeName
static const quaternion I
dimensionedScalar exp(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
dimensionedScalar sign(const dimensionedScalar &ds)
string str() const
Return the string.
Quaternion class used to perform rotations in 3D space.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & operator<<(Ostream &, const edgeMesh &)
virtual bool check(const char *operation) const
Check IOstream status for given operation.
quaternion()
Construct null.
scalar w() const
Scalar part of the quaternion ( = cos(theta/2) for rotation)
Vector< scalar > vector
A scalar version of the templated Vector.
Output to memory buffer stream.
dimensionedScalar acos(const dimensionedScalar &ds)
Istream & operator>>(Istream &, edgeMesh &)
const vector & v() const
Vector part of the quaternion ( = axis of rotation)
static const quaternion zero
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Istream & readBegin(const char *funcName)
word name(const complex &)
Return a string representation of a complex.
dimensionedScalar cos(const dimensionedScalar &ds)