38 namespace coordinateRotations
55 void Foam::coordinateRotations::axisAngle::checkSpec()
57 if (
mag(angle_) < VSMALL ||
mag(axis_) < SMALL)
73 if (
mag(angle) < VSMALL ||
mag(axis) < SMALL)
112 degrees_(crot.degrees_)
156 dict.getOrDefault(
"degrees", true)
172 return rotation(axis_, angle_, degrees_);
178 os <<
"rotation axis: " << axis_
179 <<
" angle(" << (degrees_ ?
"deg" :
"rad") <<
"): " << angle_;
virtual void write(Ostream &os) const
Write information.
User specification of a coordinate rotation.
tensor R() const
The rotation tensor corresponding to the quaternion.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Unit conversion functions.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
static const SphericalTensor I
Macros for easy insertion into run-time selection tables.
virtual void clear()
Reset specification.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
addToRunTimeSelectionTable(coordinateRotation, axisAngle, dictionary)
constexpr T & get(FixedList< T, N > &list) noexcept
A class for handling words, derived from Foam::string.
virtual Ostream & endBlock()
Write end block group.
Quaternion class used to perform rotations in 3D space.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
axisAngle()
Default construct. Axis = Z, angle = 0.
static tensor rotation(const vector &axis, const scalar angle, bool degrees=false)
The rotation tensor for given axis/angle.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
components
Component labeling enumeration.
A coordinateRotation specified by a rotation axis and a rotation angle about that axis...
virtual void writeEntry(const word &keyword, Ostream &os) const
Write dictionary entry.
Tensor of scalars, i.e. Tensor<scalar>.
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
virtual tensor R() const
Calculate and return the rotation tensor calculated from axis and angle.
static constexpr const zero Zero
Global zero (0)