Go to the documentation of this file.
38 namespace coordinateRotations
53 void Foam::coordinateRotations::axisAngle::checkSpec()
55 if (
mag(angle_) < VSMALL ||
mag(axis_) < SMALL)
71 if (
mag(angle) < VSMALL ||
mag(axis) < SMALL)
96 degrees_(crot.degrees_)
105 axis_(std::move(crot.axis_)),
106 angle_(std::move(crot.angle_)),
107 degrees_(crot.degrees_)
150 dict.get<scalar>(
"angle"),
151 dict.getOrDefault(
"degrees", true)
167 return rotation(axis_, angle_, degrees_);
173 os <<
"rotation axis: " << axis_
174 <<
" angle(" << (degrees_ ?
"deg" :
"rad") <<
"): " << angle_;
A class for handling words, derived from Foam::string.
static constexpr const zero Zero
Global zero (0)
virtual void writeEntry(const word &keyword, Ostream &os) const
Write dictionary entry.
addToRunTimeSelectionTable(coordinateRotation, axisAngle, dictionary)
A coordinateRotation specified by a rotation axis and a rotation angle about that axis.
Unit conversion functions.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
components
Component labeling enumeration.
Quaternion class used to perform rotations in 3D space.
static tensor rotation(const vector &axis, const scalar angle, bool degrees=false)
The rotation tensor for given axis/angle.
axisAngle()
Construct null.
User specification of a coordinate rotation.
virtual Ostream & endBlock()
Write end block group.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual void write(Ostream &os) const
Write information.
Macros for easy insertion into run-time selection tables.
Vector< scalar > vector
A scalar version of the templated Vector.
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
tensor R() const
The rotation tensor corresponding to the quaternion.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static const SphericalTensor I
virtual void clear()
Reset specification.