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_;
189 os.beginBlock(keyword);
191 os.writeEntry(
"type",
type());
192 os.writeEntry(
"axis", axis_);
193 os.writeEntry(
"angle", angle_);
196 os.writeEntry(
"degrees",
"false");
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
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.
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)
A class for handling words, derived from Foam::string.
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...
OBJstream os(runTime.globalPath()/outputName)
static const SphericalTensor I
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.
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)