80 if (!unitQuaternion())
83 <<
"Attempt to get the quaternion for a non-spherical joint"
97 if (!unitQuaternion())
100 <<
"Attempt to set quaternion for a non-spherical joint"
104 q[qIndex_] = quat.
v().
x();
105 q[qIndex_+1] = quat.
v().
y();
106 q[qIndex_+2] = quat.
v().
z();
VSForm block(const label start) const
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Abstract base-class for all rigid-body joints.
joint(const rigidBodyModel &model, const label nDoF)
Construct joint setting the size of the motion sub-space.
List< spatialVector > S_
Joint motion sub-space.
virtual void write(Ostream &) const
Write.
label qIndex_
Index of this joints data in the rigidBodyModel state.
label nDoF() const
Return the number of degrees of freedom in this joint.
const List< spatialVector > & S() const
Return the joint motion sub-space.
virtual bool unitQuaternion() const
Return true if this joint describes rotation using a quaternion.
label index_
Index of this joint in the rigidBodyModel.
void operator=(const joint &j)
Assignment.
Basic rigid-body model representing a system of rigid-bodies connected by 1-6 DoF joints.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Quaternion class used to perform rotations in 3D space.
const vector & v() const
Vector part of the quaternion ( = axis of rotation)
static quaternion unit(const vector &v)
Return the unit quaternion (versor) from the given vector.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & operator<<(Ostream &, const rigidBody &)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
Ostream & incrIndent(Ostream &os)
Increment the indent level.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Ostream & indent(Ostream &os)
Indent stream.