Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #ifndef _GMTL_EULER_ANGLE_OPS_H_
00007 #define _GMTL_EULER_ANGLE_OPS_H_
00008
00009 #include <gmtl/EulerAngle.h>
00010
00011 namespace gmtl
00012 {
00013
00027 template<class DATA_TYPE, typename ROT_ORDER>
00028 inline bool operator==(const EulerAngle<DATA_TYPE, ROT_ORDER>& e1,
00029 const EulerAngle<DATA_TYPE, ROT_ORDER>& e2)
00030 {
00031
00032 if (e1[0] != e2[0]) return false;
00033 if (e1[1] != e2[1]) return false;
00034 if (e1[2] != e2[2]) return false;
00035 return true;
00036 }
00037
00046 template<class DATA_TYPE, typename ROT_ORDER>
00047 inline bool operator!=(const EulerAngle<DATA_TYPE, ROT_ORDER>& e1,
00048 const EulerAngle<DATA_TYPE, ROT_ORDER>& e2)
00049 {
00050 return(! (e1 == e2));
00051 }
00052
00065 template<class DATA_TYPE, typename ROT_ORDER>
00066 inline bool isEqual( const EulerAngle<DATA_TYPE, ROT_ORDER>& e1,
00067 const EulerAngle<DATA_TYPE, ROT_ORDER>& e2,
00068 const DATA_TYPE eps = 0 )
00069 {
00070 gmtlASSERT(eps >= (DATA_TYPE)0);
00071
00072
00073 if (!Math::isEqual( e1[0], e2[0], eps )) return false;
00074 if (!Math::isEqual( e1[1], e2[1], eps )) return false;
00075 if (!Math::isEqual( e1[2], e2[2], eps )) return false;
00076 return true;
00077 }
00078
00079
00080
00081
00084 }
00085
00086 #endif