Go to the documentation of this file.
38 quaternion(0,
vector(0, 0, 0))
43 quaternion(1,
vector(0, 0, 0))
59 buf <<
'(' <<
s.t() <<
',' <<
s.r() <<
')';
83 for (
label i=1; i<ss.size(); i++)
85 sa.
t() += w[i]*ss[i].t();
88 if ((sa.
r() & ss[i].r()) > 0)
90 sa.
r() += w[i]*ss[i].r();
94 sa.
r() -= w[i]*ss[i].r();
110 is >>
s.t() >>
s.r();
void normalize()
Normalize the quaternion by its magnitude.
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 Foam::string.
Septernion class used to perform translations and rotations in 3D space.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
quaternion slerp(const quaternion &qa, const quaternion &qb, const scalar t)
Spherical linear interpolation of quaternions.
static const septernion zero
Input/output from string buffers.
Istream & operator>>(Istream &, directionInfo &)
bool readEnd(const char *funcName)
End read of data chunk, ends with ')'.
bool readBegin(const char *funcName)
Begin read of data chunk, starts with '('.
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)....
word name(const complex &c)
Return string representation of complex.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Vector< scalar > vector
A scalar version of the templated Vector.
Foam::string str() const
Get the string - as Foam::string rather than std::string.
septernion()
Construct null.
Output to string buffer, using a OSstream.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static const septernion I
const quaternion & r() const
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static const char *const typeName
Begin list [isseparator].
Ostream & operator<<(Ostream &, const boundaryPatch &)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)