35 #ifndef _BLAZE_MATH_ROTATIONMATRIX_H_
36 #define _BLAZE_MATH_ROTATIONMATRIX_H_
153 template<
typename Type >
154 class RotationMatrix :
public DenseMatrix< RotationMatrix<Type>, false >
169 template<
typename Axis >
174 template<
typename Other >
189 inline Type
operator()(
size_t i,
size_t j )
const;
197 inline size_t rows()
const;
210 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
217 template<
typename Other >
221 template<
typename Other >
258 Type yx, Type yy, Type yz,
259 Type zx, Type zy, Type zz );
279 template<
typename Other >
friend class Quaternion;
281 template<
typename Other >
284 template<
typename Other >
287 template<
typename T1,
typename T2 >
318 template<
typename Type >
321 v_[0] = v_[4] = v_[8] = Type(1);
322 v_[1] = v_[2] = v_[3] = v_[5] = v_[6] = v_[7] = Type(0);
344 template<
typename Type >
345 template<
typename Axis >
350 BLAZE_USER_ASSERT( ( axis.sqrLength() > Axis(0) || angle == Type(0) ),
"Invalid matrix parameters" );
352 const Type sina( std::sin(angle) );
353 const Type cosa( std::cos(angle) );
354 const Type tmp( Type(1)-cosa );
358 v_[0] = cosa + axis[0]*axis[0]*tmp;
359 v_[1] = axis[0]*axis[1]*tmp - axis[2]*sina;
360 v_[2] = axis[0]*axis[2]*tmp + axis[1]*sina;
361 v_[3] = axis[1]*axis[0]*tmp + axis[2]*sina;
362 v_[4] = cosa + axis[1]*axis[1]*tmp;
363 v_[5] = axis[1]*axis[2]*tmp - axis[0]*sina;
364 v_[6] = axis[2]*axis[0]*tmp - axis[1]*sina;
365 v_[7] = axis[2]*axis[1]*tmp + axis[0]*sina;
366 v_[8] = cosa + axis[2]*axis[2]*tmp;
378 template<
typename Type >
399 template<
typename Type >
400 template<
typename Other >
429 template<
typename Type >
431 Type yx, Type yy, Type yz,
432 Type zx, Type zy, Type zz )
434 v_[0] = xx; v_[1] = xy; v_[2] = xz;
435 v_[3] = yx; v_[4] = yy; v_[5] = yz;
436 v_[6] = zx; v_[7] = zy; v_[8] = zz;
457 template<
typename Type >
484 template<
typename Type >
485 template<
typename Other >
514 template<
typename Type >
530 template<
typename Type >
546 template<
typename Type >
547 template<
typename Other >
551 const RotationMatrix tmp( v_[0]*rhs[0] + v_[1]*rhs[3] + v_[2]*rhs[6],
552 v_[0]*rhs[1] + v_[1]*rhs[4] + v_[2]*rhs[7],
553 v_[0]*rhs[2] + v_[1]*rhs[5] + v_[2]*rhs[8],
554 v_[3]*rhs[0] + v_[4]*rhs[3] + v_[5]*rhs[6],
555 v_[3]*rhs[1] + v_[4]*rhs[4] + v_[5]*rhs[7],
556 v_[3]*rhs[2] + v_[4]*rhs[5] + v_[5]*rhs[8],
557 v_[6]*rhs[0] + v_[7]*rhs[3] + v_[8]*rhs[6],
558 v_[6]*rhs[1] + v_[7]*rhs[4] + v_[8]*rhs[7],
559 v_[6]*rhs[2] + v_[7]*rhs[5] + v_[8]*rhs[8] );
561 return this->operator=( tmp );
579 template<
typename Type >
592 template<
typename Type >
613 template<
typename Type >
616 v_[0] = v_[4] = v_[8] = Type(1);
617 v_[1] = v_[2] = v_[3] = v_[5] = v_[6] = v_[7] = Type(0);
627 template<
typename Type >
632 return v_[0]*v_[4]*v_[8] + v_[1]*v_[5]*v_[6] + v_[2]*v_[3]*v_[7] -
633 v_[6]*v_[4]*v_[2] - v_[7]*v_[5]*v_[0] - v_[8]*v_[3]*v_[1];
645 template<
typename Type >
663 template<
typename Type >
681 template<
typename Type >
711 template<
typename Type >
712 template<
typename Other >
715 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
741 template<
typename Type >
742 template<
typename Other >
753 const MT tmp( m.
v_[0]*v_[0] + m.
v_[1]*v_[1] + m.
v_[2]*v_[2],
754 m.
v_[0]*v_[3] + m.
v_[1]*v_[4] + m.
v_[2]*v_[5],
755 m.
v_[0]*v_[6] + m.
v_[1]*v_[7] + m.
v_[2]*v_[8],
756 m.
v_[3]*v_[0] + m.
v_[4]*v_[1] + m.
v_[5]*v_[2],
757 m.
v_[3]*v_[3] + m.
v_[4]*v_[4] + m.
v_[5]*v_[5],
758 m.
v_[3]*v_[6] + m.
v_[4]*v_[7] + m.
v_[5]*v_[8],
759 m.
v_[6]*v_[0] + m.
v_[7]*v_[1] + m.
v_[8]*v_[2],
760 m.
v_[6]*v_[3] + m.
v_[7]*v_[4] + m.
v_[8]*v_[5],
761 m.
v_[6]*v_[6] + m.
v_[7]*v_[7] + m.
v_[8]*v_[8] );
764 return MT( v_[0]*tmp.v_[0] + v_[1]*tmp.v_[3] + v_[2]*tmp.v_[6],
765 v_[0]*tmp.v_[1] + v_[1]*tmp.v_[4] + v_[2]*tmp.v_[7],
766 v_[0]*tmp.v_[2] + v_[1]*tmp.v_[5] + v_[2]*tmp.v_[8],
767 v_[3]*tmp.v_[0] + v_[4]*tmp.v_[3] + v_[5]*tmp.v_[6],
768 v_[3]*tmp.v_[1] + v_[4]*tmp.v_[4] + v_[5]*tmp.v_[7],
769 v_[3]*tmp.v_[2] + v_[4]*tmp.v_[5] + v_[5]*tmp.v_[8],
770 v_[6]*tmp.v_[0] + v_[7]*tmp.v_[3] + v_[8]*tmp.v_[6],
771 v_[6]*tmp.v_[1] + v_[7]*tmp.v_[4] + v_[8]*tmp.v_[7],
772 v_[6]*tmp.v_[2] + v_[7]*tmp.v_[5] + v_[8]*tmp.v_[8] );
805 template<
typename Type >
806 template<
typename Other >
815 const MT tmp( m.
v_[0]*v_[0], m.
v_[0]*v_[3], m.
v_[0]*v_[6],
816 m.
v_[4]*v_[1], m.
v_[4]*v_[4], m.
v_[4]*v_[7],
817 m.
v_[8]*v_[2], m.
v_[8]*v_[5], m.
v_[8]*v_[8] );
820 return MT( v_[0]*tmp.v_[0] + v_[1]*tmp.v_[3] + v_[2]*tmp.v_[6],
821 v_[0]*tmp.v_[1] + v_[1]*tmp.v_[4] + v_[2]*tmp.v_[7],
822 v_[0]*tmp.v_[2] + v_[1]*tmp.v_[5] + v_[2]*tmp.v_[8],
823 v_[3]*tmp.v_[0] + v_[4]*tmp.v_[3] + v_[5]*tmp.v_[6],
824 v_[3]*tmp.v_[1] + v_[4]*tmp.v_[4] + v_[5]*tmp.v_[7],
825 v_[3]*tmp.v_[2] + v_[4]*tmp.v_[5] + v_[5]*tmp.v_[8],
826 v_[6]*tmp.v_[0] + v_[7]*tmp.v_[3] + v_[8]*tmp.v_[6],
827 v_[6]*tmp.v_[1] + v_[7]*tmp.v_[4] + v_[8]*tmp.v_[7],
828 v_[6]*tmp.v_[2] + v_[7]*tmp.v_[5] + v_[8]*tmp.v_[8] );
848 template<
typename Type >
851 const Type cy( std::sqrt( v_[0]*v_[0] + v_[3]*v_[3] ) );
854 return StaticVector<Type,3UL>( std::atan2( v_[7], v_[8] ), std::atan2( -v_[6], cy ), std::atan2( v_[3], v_[0] ) );
869 template<
typename Type >
872 static const unsigned int eulSafe[4] = { 0, 1, 2, 0 };
873 static const unsigned int eulNext[4] = { 1, 2, 0, 1 };
878 const unsigned int frame( order&1 );
879 const unsigned int repetition( (order&2)>>1 );
880 const unsigned int parity( (order&4)>>2 );
881 const unsigned int i( eulSafe[(order&24)>>3] );
882 const unsigned int j( eulNext[i+parity] );
883 const unsigned int k( eulNext[i+1-parity] );
887 const Type sy( std::sqrt( v_[i*3+j]*v_[i*3+j] + v_[i*3+k]*v_[i*3+k] ) );
889 ea[0] = std::atan2( v_[i*3+j], v_[i*3+k] );
890 ea[1] = std::atan2( sy, v_[i*3+i] );
891 ea[2] = std::atan2( v_[j*3+i], -v_[k*3+i] );
894 ea[0] = std::atan2( -v_[j*3+k], v_[j*3+j] );
895 ea[1] = std::atan2( sy, v_[i*3+i] );
902 const Type cy( std::sqrt( v_[i*3+i]*v_[i*3+i] + v_[j*3+i]*v_[j*3+i] ) );
904 ea[0] = std::atan2( v_[k*3+j], v_[k*3+k] );
905 ea[1] = std::atan2( -v_[k*3+i], cy );
906 ea[2] = std::atan2( v_[j*3+i], v_[i*3+i] );
909 ea[0] = std::atan2( -v_[j*3+k], v_[j*3+j] );
910 ea[1] = std::atan2( -v_[k*3+i], cy );
945 template<
typename T1,
typename T2 >
948 template<
typename T1,
typename T2 >
951 template<
typename Type >
952 std::ostream& operator<<( std::ostream& os, const RotationMatrix<Type>& m );
954 template<
typename Type >
957 template<
typename Type >
960 template<
typename Type >
963 template<
typename Type >
966 template<
typename Type >
969 template<
typename Type >
972 template<
typename Type >
975 template<
typename Type >
978 template<
typename Type >
981 template<
typename Type >
995 template<
typename T1
1001 if( !
equal( lhs[0], rhs[0] ) ||
1002 !
equal( lhs[1], rhs[1] ) ||
1003 !
equal( lhs[2], rhs[2] ) ||
1004 !
equal( lhs[3], rhs[3] ) ||
1005 !
equal( lhs[4], rhs[4] ) ||
1006 !
equal( lhs[5], rhs[5] ) ||
1007 !
equal( lhs[6], rhs[6] ) ||
1008 !
equal( lhs[7], rhs[7] ) ||
1009 !
equal( lhs[8], rhs[8] ) )
1024 template<
typename T1
1028 return !( lhs == rhs );
1041 template<
typename Type >
1042 std::ostream& operator<<( std::ostream& os, const RotationMatrix<Type>& m )
1044 return os <<
" ( " << m[0] <<
" , " << m[1] <<
" , " << m[2] <<
" )\n"
1045 <<
" ( " << m[3] <<
" , " << m[4] <<
" , " << m[5] <<
" )\n"
1046 <<
" ( " << m[6] <<
" , " << m[7] <<
" , " << m[8] <<
" )\n";
1058 template<
typename Type >
1080 template<
typename Type >
1101 template<
typename Type >
1119 template<
typename Type >
1136 template<
typename Type >
1151 template<
typename Type >
1154 return ( m[0] == Type(1) ) && ( m[1] == Type(0) ) && ( m[2] == Type(0) ) &&
1155 ( m[3] == Type(0) ) && ( m[4] == Type(1) ) && ( m[5] == Type(0) ) &&
1156 ( m[6] == Type(0) ) && ( m[7] == Type(0) ) && ( m[8] == Type(1) );
1178 template<
typename Type >
1205 template<
typename Type >
1223 template<
typename Type >
1240 template<
typename Type >
1259 template<
typename T1,
typename T2 >
1260 inline const StaticVector< typename MultTrait<T1,T2>::Type, 3UL,
false >
1261 operator*(
const RotationMatrix<T1>& lhs,
const StaticVector<T2,3UL,false>& rhs );
1263 template<
typename T1,
typename T2 >
1264 inline const StaticVector< typename MultTrait<T1,T2>::Type, 3UL,
true >
1265 operator*(
const StaticVector<T1,3UL,true>& lhs,
const RotationMatrix<T2>& rhs );
1267 template<
typename T1,
typename T2 >
1268 inline const StaticMatrix< typename MultTrait<T1,T2>::Type, 3UL, 3UL,
false >
1269 operator*(
const RotationMatrix<T1>& lhs,
const StaticMatrix<T2,3UL,3UL,false>& rhs );
1271 template<
typename T1,
typename T2 >
1272 inline const StaticMatrix< typename MultTrait<T1,T2>::Type, 3UL, 3UL,
false >
1273 operator*(
const StaticMatrix<T1,3UL,3UL,false>& lhs,
const RotationMatrix<T2>& rhs );
1275 template<
typename T1,
typename T2 >
1276 inline const RotationMatrix< typename MultTrait<T1,T2>::Type >
1277 operator*(
const RotationMatrix<T1>& lhs,
const RotationMatrix<T2>& rhs );
1295 template<
typename T1
1297 inline const StaticVector< typename MultTrait<T1,T2>::Type, 3UL,
false >
1302 lhs[3]*rhs[0] + lhs[4]*rhs[1] + lhs[5]*rhs[2],
1303 lhs[6]*rhs[0] + lhs[7]*rhs[1] + lhs[8]*rhs[2] );
1321 template<
typename T1
1323 inline const StaticVector< typename MultTrait<T1,T2>::Type, 3UL,
true >
1328 lhs[0]*rhs[1] + lhs[1]*rhs[4] + lhs[2]*rhs[7],
1329 lhs[0]*rhs[2] + lhs[1]*rhs[5] + lhs[2]*rhs[8] );
1347 template<
typename T1
1349 inline const StaticMatrix< typename MultTrait<T1,T2>::Type, 3UL, 3UL,
false >
1353 return MT( lhs[0]*rhs[0] + lhs[1]*rhs[3] + lhs[2]*rhs[6],
1354 lhs[0]*rhs[1] + lhs[1]*rhs[4] + lhs[2]*rhs[7],
1355 lhs[0]*rhs[2] + lhs[1]*rhs[5] + lhs[2]*rhs[8],
1356 lhs[3]*rhs[0] + lhs[4]*rhs[3] + lhs[5]*rhs[6],
1357 lhs[3]*rhs[1] + lhs[4]*rhs[4] + lhs[5]*rhs[7],
1358 lhs[3]*rhs[2] + lhs[4]*rhs[5] + lhs[5]*rhs[8],
1359 lhs[6]*rhs[0] + lhs[7]*rhs[3] + lhs[8]*rhs[6],
1360 lhs[6]*rhs[1] + lhs[7]*rhs[4] + lhs[8]*rhs[7],
1361 lhs[6]*rhs[2] + lhs[7]*rhs[5] + lhs[8]*rhs[8] );
1379 template<
typename T1
1381 inline const StaticMatrix< typename MultTrait<T1,T2>::Type, 3UL, 3UL,
false >
1385 return MT( lhs[0]*rhs[0] + lhs[1]*rhs[3] + lhs[2]*rhs[6],
1386 lhs[0]*rhs[1] + lhs[1]*rhs[4] + lhs[2]*rhs[7],
1387 lhs[0]*rhs[2] + lhs[1]*rhs[5] + lhs[2]*rhs[8],
1388 lhs[3]*rhs[0] + lhs[4]*rhs[3] + lhs[5]*rhs[6],
1389 lhs[3]*rhs[1] + lhs[4]*rhs[4] + lhs[5]*rhs[7],
1390 lhs[3]*rhs[2] + lhs[4]*rhs[5] + lhs[5]*rhs[8],
1391 lhs[6]*rhs[0] + lhs[7]*rhs[3] + lhs[8]*rhs[6],
1392 lhs[6]*rhs[1] + lhs[7]*rhs[4] + lhs[8]*rhs[7],
1393 lhs[6]*rhs[2] + lhs[7]*rhs[5] + lhs[8]*rhs[8] );
1410 template<
typename T1
1412 inline const RotationMatrix< typename MultTrait<T1,T2>::Type >
1416 return RotationMatrix<MT>( lhs.v_[0]*rhs.v_[0] + lhs.v_[1]*rhs.v_[3] + lhs.v_[2]*rhs.v_[6],
1417 lhs.v_[0]*rhs.v_[1] + lhs.v_[1]*rhs.v_[4] + lhs.v_[2]*rhs.v_[7],
1418 lhs.v_[0]*rhs.v_[2] + lhs.v_[1]*rhs.v_[5] + lhs.v_[2]*rhs.v_[8],
1419 lhs.v_[3]*rhs.v_[0] + lhs.v_[4]*rhs.v_[3] + lhs.v_[5]*rhs.v_[6],
1420 lhs.v_[3]*rhs.v_[1] + lhs.v_[4]*rhs.v_[4] + lhs.v_[5]*rhs.v_[7],
1421 lhs.v_[3]*rhs.v_[2] + lhs.v_[4]*rhs.v_[5] + lhs.v_[5]*rhs.v_[8],
1422 lhs.v_[6]*rhs.v_[0] + lhs.v_[7]*rhs.v_[3] + lhs.v_[8]*rhs.v_[6],
1423 lhs.v_[6]*rhs.v_[1] + lhs.v_[7]*rhs.v_[4] + lhs.v_[8]*rhs.v_[7],
1424 lhs.v_[6]*rhs.v_[2] + lhs.v_[7]*rhs.v_[5] + lhs.v_[8]*rhs.v_[8] );
1439 template<
typename T1,
typename T2 >
1440 struct MultTrait< RotationMatrix<T1>, StaticVector<T2,3UL,false> >
1442 typedef StaticVector< typename MultTrait<T1,T2>::Type, 3UL,
false > Type;
1445 template<
typename T1,
typename T2 >
1446 struct MultTrait< StaticVector<T1,3UL,true>, RotationMatrix<T2> >
1448 typedef StaticVector< typename MultTrait<T1,T2>::Type, 3UL,
true > Type;
1451 template<
typename T1,
typename T2 >
1452 struct MultTrait< RotationMatrix<T1>, DynamicVector<T2,false> >
1454 typedef StaticVector< typename MultTrait<T1,T2>::Type, 3UL,
false > Type;
1457 template<
typename T1,
typename T2 >
1458 struct MultTrait< DynamicVector<T1,true>, RotationMatrix<T2> >
1460 typedef StaticVector< typename MultTrait<T1,T2>::Type, 3UL,
true > Type;
1463 template<
typename T1,
typename T2 >
1464 struct MultTrait< RotationMatrix<T1>, CompressedVector<T2,false> >
1466 typedef StaticVector< typename MultTrait<T1,T2>::Type, 3UL,
false > Type;
1469 template<
typename T1,
typename T2 >
1470 struct MultTrait< CompressedVector<T1,true>, RotationMatrix<T2> >
1472 typedef StaticVector< typename MultTrait<T1,T2>::Type, 3UL,
true > Type;
1475 template<
typename T1,
typename T2 >
1476 struct MultTrait< RotationMatrix<T1>, StaticMatrix<T2,3UL,3UL,false> >
1478 typedef StaticMatrix< typename MultTrait<T1,T2>::Type, 3UL, 3UL,
false > Type;
1481 template<
typename T1,
typename T2 >
1482 struct MultTrait< StaticMatrix<T1,3UL,3UL,false>, RotationMatrix<T2> >
1484 typedef StaticMatrix< typename MultTrait<T1,T2>::Type, 3UL, 3UL,
false > Type;
1487 template<
typename T1,
typename T2,
bool SO >
1488 struct MultTrait< RotationMatrix<T1>, DynamicMatrix<T2,SO> >
1490 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
1493 template<
typename T1,
bool SO,
typename T2 >
1494 struct MultTrait< DynamicMatrix<T1,SO>, RotationMatrix<T2> >
1496 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
1499 template<
typename T1,
typename T2,
bool SO >
1500 struct MultTrait< RotationMatrix<T1>, CompressedMatrix<T2,SO> >
1502 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
1505 template<
typename T1,
bool SO,
typename T2 >
1506 struct MultTrait< CompressedMatrix<T1,SO>, RotationMatrix<T2> >
1508 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
1511 template<
typename T1,
typename T2 >
1512 struct MultTrait< RotationMatrix<T1>, RotationMatrix<T2> >
1514 typedef RotationMatrix< typename MultTrait<T1,T2>::Type > Type;
1530 template<
typename T1,
typename T2 >
1531 struct MathTrait< RotationMatrix<T1>, RotationMatrix<T2> >
1533 typedef RotationMatrix< typename MathTrait<T1,T2>::HighType > HighType;
1534 typedef RotationMatrix< typename MathTrait<T1,T2>::LowType > LowType;
Header file for the isnan shim.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type, a compilation error is created.
Definition: Const.h:116
Computation accuracy for floating point data types.
Rotation order x, z, y in a static frame.
Definition: RotationMatrix.h:85
Type getDeterminant() const
Calculation of the determinant of the rotation matrix.
Definition: RotationMatrix.h:628
Type ElementType
Type of the matrix elements.
Definition: RotationMatrix.h:160
Rotation order x, z, x in a rotating frame.
Definition: RotationMatrix.h:88
void reset(DynamicMatrix< Type, SO > &m)
Resetting the given dense matrix.
Definition: DynamicMatrix.h:4599
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
const DMatDMatMultExpr< T1, T2 > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:4329
const StaticVector< Type, 3UL > getEulerAngles(EulerRotation order) const
Calculation of the Euler angles for a specific rotation order.
Definition: RotationMatrix.h:870
RotationMatrix< real > Rot3
Rotation matrix of real type.
Definition: RotationMatrix.h:1552
bool isDefault(const DynamicMatrix< Type, SO > &m)
Returns whether the given dense matrix is in default state.
Definition: DynamicMatrix.h:4642
Efficient, generic implementation of a 3x3 rotation matrix.The RotationMatrix class is the representa...
Definition: Forward.h:57
const Quaternion< Type > sq(const Quaternion< Type > &m)
Squaring the given quaternion.
Definition: Quaternion.h:1034
void swap(RotationMatrix &m)
Swapping the contents of two 3x3 matrices.
Definition: RotationMatrix.h:682
const StaticMatrix< typename MultTrait< Type, Other >::Type, 3UL, 3UL, false > diagRotate(const StaticMatrix< Other, 3UL, 3UL, false > &m) const
Rotation of a diagonal matrix M ( ).
Definition: RotationMatrix.h:808
const DMatAbsExpr< MT, SO > abs(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the absolute values of each single element of dm.
Definition: DMatAbsExpr.h:903
AlignedArray< Type, M *NN > v_
The statically allocated matrix elements.
Definition: StaticMatrix.h:428
const StaticMatrix< Type, 3UL, 3UL, false > fabs(const RotationMatrix< Type > &m)
Returns a matrix containing the absolute values of each single element of m.
Definition: RotationMatrix.h:1102
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type, a compilation error is created.
Definition: Volatile.h:116
bool isnan(const DenseMatrix< MT, SO > &dm)
Checks the given dense matrix for not-a-number elements.
Definition: DenseMatrix.h:640
Rotation order x, y, z in a rotating frame.
Definition: RotationMatrix.h:102
Rotation order y, x, z in a static frame.
Definition: RotationMatrix.h:93
void reset()
Reset to the default initial values.
Definition: RotationMatrix.h:614
Rotation order y, z, y in a static frame.
Definition: RotationMatrix.h:91
void clear(DynamicMatrix< Type, SO > &m)
Clearing the given dense matrix.
Definition: DynamicMatrix.h:4615
Rotation order z, x, z in a rotating frame.
Definition: RotationMatrix.h:100
Rotation order x, y, z in a static frame.
Definition: RotationMatrix.h:81
Efficient implementation of a fixed-sized vector.The StaticVector class template is the representatio...
Definition: Forward.h:52
size_t columns() const
Returns the current number of columns of the rotation matrix.
Definition: RotationMatrix.h:593
Rotation order x, z, y in a rotating frame.
Definition: RotationMatrix.h:90
Rotation order y, x, z in a rotating frame.
Definition: RotationMatrix.h:98
const RotationMatrix & CompositeType
Data type for composite expression templates.
Definition: RotationMatrix.h:161
Header file for the floating point precision of the Blaze library.
const StaticVector< Type, 3UL > getEulerAnglesXYZ() const
Calculation of the Euler angles (in radian measure).
Definition: RotationMatrix.h:849
RotationMatrix & operator=(const RotationMatrix &rhs)
Copy assignment operator for RotationMatrix.
Definition: RotationMatrix.h:458
Rotation order z, y, x in a static frame.
Definition: RotationMatrix.h:101
Rotation order z, x, y in a static frame.
Definition: RotationMatrix.h:97
Header file for the multiplication trait.
Rotation order x, y, x in a static frame.
Definition: RotationMatrix.h:83
Rotation order z, y, z in a static frame.
Definition: RotationMatrix.h:103
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b)
Swapping the contents of two sparse matrices.
Definition: CompressedMatrix.h:4605
Header file for all forward declarations of the math module.
Rotation order z, y, z in a rotating frame.
Definition: RotationMatrix.h:104
Efficient implementation of a fixed-sized matrix.The StaticMatrix class template is the representatio...
Definition: Forward.h:51
Rotation order y, x, y in a static frame.
Definition: RotationMatrix.h:95
Rotation order y, x, y in a rotating frame.
Definition: RotationMatrix.h:96
Constraint on the data type.
RotationMatrix & transpose()
Transposing the rotation matrix.
Definition: RotationMatrix.h:646
EulerRotation
Order of the Euler rotationThis codes are needed for the EulerAngles function in order to calculate t...
Definition: RotationMatrix.h:80
Type v_[9]
The nine statically allocated matrix elements.
Definition: RotationMatrix.h:266
RotationMatrix & invert()
Inverting the matrix.
Definition: RotationMatrix.h:664
Header file for the equal shim.
Rotation order x, z, x in a static frame.
Definition: RotationMatrix.h:87
Rotation order y, z, y in a rotating frame.
Definition: RotationMatrix.h:92
Header file for run time assertion macros.
const StaticMatrix< Type, 3UL, 3UL, false > abs(const RotationMatrix< Type > &m)
Returns a matrix containing the absolute values of each single element of m.
Definition: RotationMatrix.h:1081
Base template for the MultTrait class.
Definition: MultTrait.h:141
bool equal(const T1 &a, const T2 &b)
Generic equality check.
Definition: Equal.h:352
Rotation order z, x, z in a static frame.
Definition: RotationMatrix.h:99
void swap(DynamicMatrix< Type, SO > &a, DynamicMatrix< Type, SO > &b)
Swapping the contents of two matrices.
Definition: DynamicMatrix.h:4671
Constraint on the data type.
Efficient implementation of a quaternion.Quaternions are a superior way to deal with rotations and or...
Definition: Forward.h:56
Constraint on the data type.
Header file for the complete StaticVector implementation.
size_t rows() const
Returns the current number of rows of the rotation matrix.
Definition: RotationMatrix.h:580
Header file for the isDefault shim.
Rotation order y, z, x in a rotating frame.
Definition: RotationMatrix.h:86
Header file for the DenseMatrix CRTP base class.
Header file for the mathematical trait.
Rotation order z, x, y in a rotating frame.
Definition: RotationMatrix.h:94
Header file for the complete StaticMatrix implementation.
Rotation order x, y, z in a rotating frame.
Definition: RotationMatrix.h:84
RotationMatrix()
The default constructor for RotationMatrix.
Definition: RotationMatrix.h:319
const Accuracy accuracy
Global Accuracy instance.The blaze::accuracy instance can be used wherever a floating point data type...
Definition: Accuracy.h:901
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:907
Rotation order y, z, x in a static frame.
Definition: RotationMatrix.h:89
This ResultType
Result type for expression template evaluations.
Definition: RotationMatrix.h:159
bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:249
Type operator[](size_t index) const
1D-access to the rotation matrix elements.
Definition: RotationMatrix.h:515
bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:289
Header file for basic type definitions.
bool isAliased(const Other *alias) const
Returns whether the rotation matrix is aliased with the given address alias.
Definition: RotationMatrix.h:713
RotationMatrix< Type > This
Type of this RotationMatrix instance.
Definition: RotationMatrix.h:158
Type operator()(size_t i, size_t j) const
2D-access to the rotation matrix elements.
Definition: RotationMatrix.h:531
Size type of the Blaze library.
Rotation order z, y, x in a rotating frame.
Definition: RotationMatrix.h:82
const StaticMatrix< typename MultTrait< Type, Other >::Type, 3UL, 3UL, false > rotate(const StaticMatrix< Other, 3UL, 3UL, false > &m) const
Rotation of a matrix M ( ).
Definition: RotationMatrix.h:744
#define BLAZE_CONSTRAINT_MUST_BE_FLOATING_POINT_TYPE(T)
Constraint on the data type.In case the given data type T is not a floating point data type...
Definition: FloatingPoint.h:79
const Quaternion< Type > inv(const Quaternion< Type > &m)
Inverting the given quaternion ( ).
Definition: Quaternion.h:1016