|
waLBerla 7.2
|
Header file for the implementation of a quaternion.
#include "core/math/MathTrait.h"#include "core/math/Utility.h"#include "core/debug/Debug.h"#include "core/debug/CheckFunctions.h"#include "core/DataTypes.h"#include "core/mpi/SendBuffer.h"#include "core/mpi/RecvBuffer.h"#include <core/logging/Logging.h>#include <type_traits>#include <cmath>#include <istream>#include <ostream>#include <limits>Classes | |
| class | walberla::math::Quaternion< Type > |
| Efficient implementation of a quaternion. More... | |
| struct | walberla::mpi::BufferSizeTrait< walberla::math::Quaternion< VT > > |
| struct | walberla::VectorTrait< Quaternion< T > > |
Namespaces | |
| namespace | walberla |
| Storage for detected contacts which can be used to perform actions for all contacts, e.g. | |
| namespace | walberla::math |
| namespace | walberla::mpi |
| namespace | walberla::debug |
| namespace | walberla::debug::check_functions_detail |
Functions | |
| template<typename T , typename G , typename VT > | |
| mpi::GenericSendBuffer< T, G > & | walberla::mpi::operator<< (mpi::GenericSendBuffer< T, G > &buf, const math::Quaternion< VT > &quat) |
| template<typename T , typename VT > | |
| mpi::GenericRecvBuffer< T > & | walberla::mpi::operator>> (mpi::GenericRecvBuffer< T > &buf, math::Quaternion< VT > &quat) |
| template<> | |
| bool | walberla::debug::check_functions_detail::check_float_equal (const math::Quaternion< real_t > &lhs, const math::Quaternion< real_t > &rhs) |
| template<> | |
| bool | walberla::debug::check_functions_detail::check_float_equal_eps (const math::Quaternion< real_t > &lhs, const math::Quaternion< real_t > &rhs, const real_t epsilon) |
Quaternion operators | |
| template<typename T1 , typename T2 > | |
| bool | walberla::math::operator== (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs) |
| Equality operator for the comparison of two quaternions. | |
| template<typename T1 , typename T2 > | |
| bool | walberla::math::operator!= (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs) |
| Inequality operator for the comparison of two quaternions. | |
| template<typename Type > | |
| std::ostream & | walberla::math::operator<< (std::ostream &os, const Quaternion< Type > &q) |
| Global output operator for quaternions. | |
| template<typename Type > | |
| std::istream & | walberla::math::operator>> (std::istream &is, Quaternion< Type > &q) |
| Global input operator for quaternions. | |
| template<typename Type > | |
| bool | walberla::math::isnan (const Quaternion< Type > &q) |
| Checks the given quaternion for not-a-number elements. | |
| template<typename Type > | |
| void | walberla::math::reset (Quaternion< Type > &q) |
| Resetting the given quaternion. | |
| template<typename Type > | |
| void | walberla::math::clear (Quaternion< Type > &q) |
| Clearing the given quaternion. | |
| template<typename Type > | |
| bool | walberla::math::isDefault (const Quaternion< Type > &q) |
| Returns whether the given quaternion is in default state. | |
| template<typename Type > | |
| const Quaternion< Type > | walberla::math::inv (const Quaternion< Type > &q) |
| Inverting the given quaternion. | |
| template<typename Type > | |
| const Quaternion< Type > | walberla::math::sq (const Quaternion< Type > &q) |
| Squaring the given quaternion. | |
| template<typename Type > | |
| void | walberla::math::swap (Quaternion< Type > &a, Quaternion< Type > &b) |
| Swapping the contents of two quaternions. | |
Quaternion arithmetic operators | |
These operators support operations between quaternions of different element types. They work for all element types supported by the MathTrait class template. | |
| template<typename T1 , typename T2 > | |
| const Quaternion< typename MathTrait< T1, T2 >::MultType > | walberla::math::operator* (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs) |
| Multiplication operator for the multiplication of two quaternions ( \( \hat{q}=\hat{p}*\hat{r} \)). | |