quaternion.h File Reference

#include <cml/mathlib/epsilon.h>
#include <cml/quaternion/quaternion_expr.h>
#include <cml/quaternion/quaternion_dot.h>
#include <cml/util.h>

Include dependency graph for quaternion.h:

This graph shows which files directly or indirectly include this file:

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.


Detailed Description

Todo:
Return a VectorXpr adaptor from the imaginary() method of quaternion and the expression node types.
Todo:
swap multiplication order based upon template param
Todo:
change element order based upon template param

Definition in file quaternion.h.


Define Documentation

#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;                                                   \
    }
In-place op from a quaternion.

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;                                                   \
    }
In-place op from a QuaternionXpr.

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;                                             \
    }
In-place op from a scalar type.

This assumes that _op_ is defined for the quaternion's scalar type.

Definition at line 393 of file quaternion.h.


Generated on Sat Jul 18 19:35:36 2009 for CML 1.0 by  doxygen 1.5.9