cml::et::BinaryQuaternionOp< LeftT, RightT, OpT > Class Template Reference

A binary quaternion expression. More...

#include <quaternion_expr.h>

Collaboration diagram for cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >:

List of all members.

Public Types

enum  { array_size = 4 }
 Record result size as an enum. More...
enum  { W = order_type::W, X = order_type::X, Y = order_type::Y, Z = order_type::Z }
 Localize the ordering as an enum. More...
typedef cml::et::not_assignable_tag assignable_tag
typedef GetCheckedSize< LeftT,
RightT, size_tag
checked_size
typedef binary_expression expr_ary
typedef expr_type expr_const_reference
typedef BinaryQuaternionOp
< LeftT, RightT, OpT > 
expr_type
typedef vector_type::subvector_type imaginary_type
typedef
left_traits::const_reference 
left_reference
typedef left_traits::result_type left_result
typedef ExprTraits< LeftT > left_traits
typedef result_type::order_type order_type
typedef quaternion_result_tag result_tag
typedef QuaternionPromote
< left_result, right_result >
::type 
result_type
typedef
right_traits::const_reference 
right_reference
typedef right_traits::result_type right_result
typedef ExprTraits< RightT > right_traits
typedef result_type::size_tag size_tag
typedef result_type::temporary_type temporary_type
typedef OpT::value_type value_type
typedef result_type::vector_type vector_type

Public Member Functions

 BinaryQuaternionOp (const expr_type &e)
 Copy constructor.
 BinaryQuaternionOp (left_reference left, right_reference right)
 Construct from the two subexpressions.
temporary_type exp (value_type tolerance=epsilon< value_type >::placeholder()) const
 Return the result of the exponential function as applied to this expression.
imaginary_type imaginary () const
 Return the vector part of the expression.
left_reference left_expression () const
 Return reference to left expression.
value_type length () const
 Return the quaternion length.
value_type length_squared () const
 Return square of the quaternion length.
temporary_type log (value_type tolerance=epsilon< value_type >::placeholder()) const
 Return the log of this expression.
value_type norm () const
 Return the Cayley norm of the expression.
temporary_type normalize () const
 Return the result as a normalized quaternion.
value_type operator[] (size_t i) const
 Compute value at index i of the result quaternion.
value_type real () const
 Return the real part of the expression.
right_reference right_expression () const
 Return reference to right expression.
size_t size () const
 Return the size of the quaternion result.

Protected Attributes

left_reference m_left
right_reference m_right

Private Member Functions

expr_typeoperator= (const expr_type &)

Private Attributes

checked_size::check_type _dummy


Detailed Description

template<class LeftT, class RightT, class OpT>
class cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >

A binary quaternion expression.

The operator's operator() method must take exactly two arguments.

Definition at line 379 of file quaternion_expr.h.


Member Typedef Documentation

template<class LeftT , class RightT , class OpT >
typedef cml::et::not_assignable_tag cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::assignable_tag

Definition at line 410 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef GetCheckedSize<LeftT,RightT,size_tag> cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::checked_size

Definition at line 425 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef binary_expression cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::expr_ary

Definition at line 386 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef expr_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::expr_const_reference

Definition at line 389 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef BinaryQuaternionOp<LeftT,RightT,OpT> cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::expr_type

Definition at line 383 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef vector_type::subvector_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::imaginary_type

Definition at line 419 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef left_traits::const_reference cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::left_reference

Definition at line 399 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef left_traits::result_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::left_result

Definition at line 403 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef ExprTraits<LeftT> cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::left_traits

Definition at line 395 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef result_type::order_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::order_type

Definition at line 422 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef quaternion_result_tag cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::result_tag

Definition at line 392 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef QuaternionPromote<left_result,right_result>::type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::result_type

Definition at line 406 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef right_traits::const_reference cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::right_reference

Definition at line 400 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef right_traits::result_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::right_result

Definition at line 404 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef ExprTraits<RightT> cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::right_traits

Definition at line 396 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef result_type::size_tag cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::size_tag

Definition at line 407 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef result_type::temporary_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::temporary_type

Definition at line 413 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef OpT::value_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::value_type

Definition at line 391 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
typedef result_type::vector_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::vector_type

Definition at line 416 of file quaternion_expr.h.


Member Enumeration Documentation

template<class LeftT , class RightT , class OpT >
anonymous enum

Record result size as an enum.

Enumerator:
array_size 

Definition at line 431 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
anonymous enum

Localize the ordering as an enum.

Enumerator:
W 
X 
Y 
Z 

Definition at line 434 of file quaternion_expr.h.


Constructor & Destructor Documentation

template<class LeftT , class RightT , class OpT >
cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::BinaryQuaternionOp ( left_reference  left,
right_reference  right 
) [inline, explicit]

Construct from the two subexpressions.

Definition at line 549 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::BinaryQuaternionOp ( const expr_type e  )  [inline]

Copy constructor.

Definition at line 553 of file quaternion_expr.h.


Member Function Documentation

template<class LeftT , class RightT , class OpT >
temporary_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::exp ( value_type  tolerance = epsilon<value_type>::placeholder()  )  const [inline]

Return the result of the exponential function as applied to this expression.

Definition at line 497 of file quaternion_expr.h.

References cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::imaginary(), and cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::length().

Here is the call graph for this function:

template<class LeftT , class RightT , class OpT >
imaginary_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::imaginary (  )  const [inline]

template<class LeftT , class RightT , class OpT >
left_reference cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::left_expression (  )  const [inline]

Return reference to left expression.

Definition at line 540 of file quaternion_expr.h.

References cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::m_left.

template<class LeftT , class RightT , class OpT >
value_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::length (  )  const [inline]

Return the quaternion length.

Definition at line 469 of file quaternion_expr.h.

References cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::length_squared().

Referenced by cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::exp().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class LeftT , class RightT , class OpT >
value_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::length_squared (  )  const [inline]

Return square of the quaternion length.

Definition at line 462 of file quaternion_expr.h.

References cml::dot().

Referenced by cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::length(), and cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::norm().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class LeftT , class RightT , class OpT >
temporary_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::log ( value_type  tolerance = epsilon<value_type>::placeholder()  )  const [inline]

Return the log of this expression.

Definition at line 480 of file quaternion_expr.h.

References cml::acos_safe(), cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::imaginary(), and cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::real().

Here is the call graph for this function:

template<class LeftT , class RightT , class OpT >
value_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::norm (  )  const [inline]

Return the Cayley norm of the expression.

Definition at line 457 of file quaternion_expr.h.

References cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::length_squared().

Here is the call graph for this function:

template<class LeftT , class RightT , class OpT >
temporary_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::normalize (  )  const [inline]

Return the result as a normalized quaternion.

Definition at line 474 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
expr_type& cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::operator= ( const expr_type  )  [private]

template<class LeftT , class RightT , class OpT >
value_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::operator[] ( size_t  i  )  const [inline]

template<class LeftT , class RightT , class OpT >
value_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::real (  )  const [inline]

Return the real part of the expression.

Definition at line 445 of file quaternion_expr.h.

References cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::W.

Referenced by cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::log().

Here is the caller graph for this function:

template<class LeftT , class RightT , class OpT >
right_reference cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::right_expression (  )  const [inline]

Return reference to right expression.

Definition at line 543 of file quaternion_expr.h.

References cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::m_right.

template<class LeftT , class RightT , class OpT >
size_t cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::size (  )  const [inline]

Return the size of the quaternion result.

Exceptions:
std::invalid_argument if the expressions do not have the same size.

Definition at line 529 of file quaternion_expr.h.

References cml::et::CheckedSize(), cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::m_left, and cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::m_right.

Referenced by cml::et::ExprTraits< BinaryQuaternionOp< LeftT, RightT, OpT > >::size().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

template<class LeftT , class RightT , class OpT >
checked_size::check_type cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::_dummy [private]

Definition at line 566 of file quaternion_expr.h.

template<class LeftT , class RightT , class OpT >
left_reference cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::m_left [protected]

template<class LeftT , class RightT , class OpT >
right_reference cml::et::BinaryQuaternionOp< LeftT, RightT, OpT >::m_right [protected]


The documentation for this class was generated from the following file:

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