All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs
RotationMatrix

Classes

class  blaze::RotationMatrix< Type >
 Efficient, generic implementation of a 3x3 rotation matrix.The RotationMatrix class is the representation of a 3x3 rotation matrix with a total of 9 statically allocated elements of arbitrary type. The naming convention of the elements is as following: More...
 

Typedefs

typedef RotationMatrix< real > blaze::Rot3
 Rotation matrix of real type.
 

RotationMatrix operators

template<typename T1 , typename T2 >
bool blaze::operator== (const RotationMatrix< T1 > &lhs, const RotationMatrix< T2 > &rhs)
 Equality operator for the comparison of two rotation matrices.
 
template<typename T1 , typename T2 >
bool blaze::operator!= (const RotationMatrix< T1 > &lhs, const RotationMatrix< T2 > &rhs)
 Inequality operator for the comparison of two rotation matrices.
 
template<typename Type >
std::ostream & blaze::operator<< (std::ostream &os, const RotationMatrix< Type > &m)
 Global output operator for 3x3 rotation matrices.
 
template<typename Type >
bool blaze::isnan (const RotationMatrix< Type > &m)
 Checks the given rotation matrix for not-a-number elements.
 
template<typename Type >
const StaticMatrix< Type, 3UL, 3UL, false > blaze::abs (const RotationMatrix< Type > &m)
 Returns a matrix containing the absolute values of each single element of m.
 
template<typename Type >
const StaticMatrix< Type, 3UL, 3UL, false > blaze::fabs (const RotationMatrix< Type > &m)
 Returns a matrix containing the absolute values of each single element of m.
 
template<typename Type >
void blaze::reset (RotationMatrix< Type > &m)
 Resetting the given rotation matrix.
 
template<typename Type >
void blaze::clear (RotationMatrix< Type > &m)
 Clearing the given rotation matrix.
 
template<typename Type >
bool blaze::isDefault (const RotationMatrix< Type > &m)
 Returns whether the given rotation matrix is in default state.
 
template<typename Type >
const RotationMatrix< Type > blaze::trans (const RotationMatrix< Type > &m)
 Calculation of the transpose of the rotation matrix.
 
template<typename Type >
const RotationMatrix< Type > blaze::inv (const RotationMatrix< Type > &m)
 Inverting the given rotation matrix.
 
template<typename Type >
const RotationMatrix< Type > blaze::sq (const RotationMatrix< Type > &m)
 Squaring the given rotation matrix.
 
template<typename Type >
void blaze::swap (RotationMatrix< Type > &a, RotationMatrix< Type > &b)
 Swapping the contents of two rotation matrices.
 

RotationMatrix arithmetic operators

template<typename T1 , typename T2 >
const StaticVector< typename
MultTrait< T1, T2 >::Type, 3UL, false > 
blaze::operator* (const RotationMatrix< T1 > &lhs, const StaticVector< T2, 3UL, false > &rhs)
 Multiplication operator for the multiplication of a rotation matrix and a vector ( $ \vec{a}=B*\vec{c} $).
 
template<typename T1 , typename T2 >
const StaticVector< typename
MultTrait< T1, T2 >::Type, 3UL, true > 
blaze::operator* (const StaticVector< T1, 3UL, true > &lhs, const RotationMatrix< T2 > &rhs)
 Multiplication operator for the multiplication of a vector and a rotation matrix ( $ \vec{a}=\vec{b}^T*B $).
 
template<typename T1 , typename T2 >
const StaticMatrix< typename
MultTrait< T1, T2 >::Type, 3UL, 3UL, false > 
blaze::operator* (const RotationMatrix< T1 > &lhs, const StaticMatrix< T2, 3UL, 3UL, false > &rhs)
 Multiplication operator for the multiplication of a rotation matrix and a standard matrix ( $ A=R*B $).
 
template<typename T1 , typename T2 >
const StaticMatrix< typename
MultTrait< T1, T2 >::Type, 3UL, 3UL, false > 
blaze::operator* (const StaticMatrix< T1, 3UL, 3UL, false > &lhs, const RotationMatrix< T2 > &rhs)
 Multiplication operator for the multiplication of a standard matrix and a rotation matrix ( $ A=B*R $).
 
template<typename T1 , typename T2 >
const RotationMatrix< typename
MultTrait< T1, T2 >::Type > 
blaze::operator* (const RotationMatrix< T1 > &lhs, const RotationMatrix< T2 > &rhs)
 Multiplication operator for the multiplication of two rotation matrices ( $ A=B*C $).
 

Detailed Description

Function Documentation

template<typename Type >
const StaticMatrix< Type, 3UL, 3UL, false > blaze::abs ( const RotationMatrix< Type > &  m)
inline

Returns a matrix containing the absolute values of each single element of m.

Parameters
mThe input rotation matrix.
Returns
The absolute value of each single element of m.

The abs function calculates the absolute value of each element of the input rotation matrix m.

template<typename Type >
void blaze::clear ( RotationMatrix< Type > &  m)
inline

Clearing the given rotation matrix.

Parameters
mThe rotation matrix to be cleared.
Returns
void

Clearing a rotation matrix is equivalent to resetting it via the reset() function.

template<typename Type >
const StaticMatrix< Type, 3UL, 3UL, false > blaze::fabs ( const RotationMatrix< Type > &  m)
inline

Returns a matrix containing the absolute values of each single element of m.

Parameters
mThe input rotation matrix.
Returns
The absolute value of each single element of m.

The fabs function calculates the absolute value of each element of the input rotation matrix m.

template<typename Type >
const RotationMatrix< Type > blaze::inv ( const RotationMatrix< Type > &  m)
inline

Inverting the given rotation matrix.

Parameters
mThe rotation matrix to be inverted.
Returns
The inverse rotation matrix.

This function returns the inverse of the given rotation matrix:

blaze::Rot3 R1, R2;
// ... Resizing and initialization
R1 = inv( R2 );

Note that this function has the same effect as the trans() function ( $ R^-1 = R^T $).

template<typename Type >
bool blaze::isDefault ( const RotationMatrix< Type > &  m)
inline

Returns whether the given rotation matrix is in default state.

Parameters
mThe rotation matrix to be tested for its default state.
Returns
true in case the given matrix is component-wise zero, false otherwise.
template<typename Type >
bool blaze::isnan ( const RotationMatrix< Type > &  m)
inline

Checks the given rotation matrix for not-a-number elements.

Parameters
mThe rotation matrix to be checked for not-a-number elements.
Returns
true if at least one element of the matrix is not-a-number, false otherwise.
template<typename T1 , typename T2 >
bool blaze::operator!= ( const RotationMatrix< T1 > &  lhs,
const RotationMatrix< T2 > &  rhs 
)
inline

Inequality operator for the comparison of two rotation matrices.

Parameters
lhsThe left-hand side rotation matrix for the comparison.
rhsThe right-hand side rotation matrix for the comparison.
Returns
true if the two rotation matrices are not equal, false if they are equal.
template<typename T1 , typename T2 >
const StaticVector< typename MultTrait< T1, T2 >::Type, 3UL, false > blaze::operator* ( const RotationMatrix< T1 > &  lhs,
const StaticVector< T2, 3UL, false > &  rhs 
)
inline

Multiplication operator for the multiplication of a rotation matrix and a vector ( $ \vec{a}=B*\vec{c} $).

Parameters
lhsThe left-hand side rotation matrix for the multiplication.
rhsThe right-hand side vector for the multiplication.
Returns
The resulting vector.

This operator is selected for multiplications between rotation matrices and vectors of two different data types T1 and T2, which are supported by the MultTrait class. The operator returns a vector of the higher-order data type of the two involved data types.

template<typename T1 , typename T2 >
const StaticVector< typename MultTrait< T1, T2 >::Type, 3UL, true > blaze::operator* ( const StaticVector< T1, 3UL, true > &  lhs,
const RotationMatrix< T2 > &  rhs 
)
inline

Multiplication operator for the multiplication of a vector and a rotation matrix ( $ \vec{a}=\vec{b}^T*B $).

Parameters
lhsThe left-hand side transpose vector for the multiplication.
rhsThe right-hand side rotation matrix for the multiplication.
Returns
The resulting vector.

This operator is selected for multiplications between rotation matrices and vectors of two different data types T1 and T2, which are supported by the MultTrait class. The operator returns a vector of the higher-order data type of the two involved data types.

template<typename T1 , typename T2 >
const StaticMatrix< typename MultTrait< T1, T2 >::Type, 3UL, 3UL, false > blaze::operator* ( const RotationMatrix< T1 > &  lhs,
const StaticMatrix< T2, 3UL, 3UL, false > &  rhs 
)
inline

Multiplication operator for the multiplication of a rotation matrix and a standard matrix ( $ A=R*B $).

Parameters
lhsThe left-hand side rotation matrix for the multiplication.
rhsThe right-hand side standard matrix for the multiplication.
Returns
The resulting matrix.

This operator is selected for multiplications between matrices of two different data types T1 and T2, which are supported by the MultTrait class. The operator returns a matrix of the higher-order data type of the two involved matrix data types.

template<typename T1 , typename T2 >
const StaticMatrix< typename MultTrait< T1, T2 >::Type, 3UL, 3UL, false > blaze::operator* ( const StaticMatrix< T1, 3UL, 3UL, false > &  lhs,
const RotationMatrix< T2 > &  rhs 
)
inline

Multiplication operator for the multiplication of a standard matrix and a rotation matrix ( $ A=B*R $).

Parameters
lhsThe left-hand side standard matrix for the multiplication.
rhsThe right-hand side rotation matrix for the multiplication.
Returns
The resulting matrix.

This operator is selected for multiplications between matrices of two different data types T1 and T2, which are supported by the MultTrait class. The operator returns a matrix of the higher-order data type of the two involved matrix data types.

template<typename T1 , typename T2 >
const RotationMatrix< typename MultTrait< T1, T2 >::Type > blaze::operator* ( const RotationMatrix< T1 > &  lhs,
const RotationMatrix< T2 > &  rhs 
)
inline

Multiplication operator for the multiplication of two rotation matrices ( $ A=B*C $).

Parameters
lhsThe left-hand side rotation matrix for the multiplication.
rhsThe right-hand side rotation matrix for the multiplication.
Returns
The resulting rotation matrix.

This operator is selected for multiplications between rotation matrices of two different data types T1 and T2, which are supported by the MultTrait class. The operator returns a matrix of the higher-order data type of the two involved matrix data types.

template<typename Type >
std::ostream & blaze::operator<< ( std::ostream &  os,
const RotationMatrix< Type > &  m 
)

Global output operator for 3x3 rotation matrices.

Parameters
osReference to the output stream.
mReference to a constant rotation matrix object.
Returns
Reference to the output stream.
template<typename T1 , typename T2 >
bool blaze::operator== ( const RotationMatrix< T1 > &  lhs,
const RotationMatrix< T2 > &  rhs 
)
inline

Equality operator for the comparison of two rotation matrices.

Parameters
lhsThe left-hand side rotation matrix for the comparison.
rhsThe right-hand side rotation matrix for the comparison.
Returns
true if the two rotation matrices are equal, false if not.
template<typename Type >
void blaze::reset ( RotationMatrix< Type > &  m)
inline

Resetting the given rotation matrix.

Parameters
mThe rotation matrix to be resetted.
Returns
void
template<typename Type >
const RotationMatrix< Type > blaze::sq ( const RotationMatrix< Type > &  m)
inline

Squaring the given rotation matrix.

Parameters
mThe rotation matrix to be squared.
Returns
The result of the square operation.

This function squares the given rotation matrix m. This function has the same effect as multiplying the rotation matrix with itself ( $ m * m $).

template<typename Type >
void blaze::swap ( RotationMatrix< Type > &  a,
RotationMatrix< Type > &  b 
)
inline

Swapping the contents of two rotation matrices.

Parameters
aThe first rotation matrix to be swapped.
bThe second rotation matrix to be swapped.
Returns
void
Exceptions
no-throwguarantee.
template<typename Type >
const RotationMatrix< Type > blaze::trans ( const RotationMatrix< Type > &  m)
inline

Calculation of the transpose of the rotation matrix.

Parameters
mThe rotation matrix to be transposed.
Returns
The transpose of the rotation matrix.

This function returns the transpose of the given rotation matrix:

blaze::Rot3 R1, R2;
// ... Resizing and initialization
R1 = trans( R2 );

Note that this function has the same effect as the inv() function ( $ R^T = R^-1 $).