#include <cml/mathlib/epsilon.h>
#include <cml/quaternion/quaternion_expr.h>
#include <cml/quaternion/quaternion_dot.h>
#include <cml/util.h>
Go to the source code of this file.
Classes | |
class | cml::quaternion< Element, ArrayType, Order, Cross > |
A configurable quaternion type. More... | |
Namespaces | |
namespace | cml |
Defines | |
#define | CML_QUAT_ASSIGN_FROM_QUAT(_op_) |
In-place op from a quaternion. | |
#define | CML_QUAT_ASSIGN_FROM_QUATXPR(_op_) |
In-place op from a QuaternionXpr. | |
#define | CML_QUAT_ASSIGN_FROM_SCALAR(_op_, _op_name_) |
In-place op from a scalar type. |
Definition in file quaternion.h.
#define CML_QUAT_ASSIGN_FROM_QUAT | ( | _op_ | ) |
Value:
template<typename E, class AT> const quaternion_type& \ operator _op_ (const quaternion<E,AT,order_type,cross_type>& q) { \ m_q[W] _op_ q[W]; \ m_q[X] _op_ q[X]; \ m_q[Y] _op_ q[Y]; \ m_q[Z] _op_ q[Z]; \ return *this; \ }
This assumes that _op_ is defined for both the quaternion's vector type and its scalar type.
Definition at line 364 of file quaternion.h.
#define CML_QUAT_ASSIGN_FROM_QUATXPR | ( | _op_ | ) |
Value:
template<typename XprT> quaternion_type& \ operator _op_ (QUATXPR_ARG_TYPE e) { \ typedef typename XprT::order_type arg_order; \ m_q[W] _op_ e[arg_order::W]; \ m_q[X] _op_ e[arg_order::X]; \ m_q[Y] _op_ e[arg_order::Y]; \ m_q[Z] _op_ e[arg_order::Z]; \ return *this; \ }
This assumes that _op_ is defined for the quaternion's scalar type.
Definition at line 378 of file quaternion.h.
#define CML_QUAT_ASSIGN_FROM_SCALAR | ( | _op_, | |||
_op_name_ | ) |
Value:
quaternion_type& operator _op_ (const value_type& s) { \ typedef _op_name_ <value_type,value_type> OpT; \ OpT().apply(m_q[W],s); \ OpT().apply(m_q[X],s); \ OpT().apply(m_q[Y],s); \ OpT().apply(m_q[Z],s); \ return *this; \ }
This assumes that _op_ is defined for the quaternion's scalar type.
Definition at line 393 of file quaternion.h.