• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

CoordOps.h

Go to the documentation of this file.
00001 // GMTL is (C) Copyright 2001-2010 by Allen Bierbaum
00002 // Distributed under the GNU Lesser General Public License 2.1 with an
00003 // addendum covering inlined code. (See accompanying files LICENSE and
00004 // LICENSE.addendum or http://www.gnu.org/copyleft/lesser.txt)
00005 
00006 #ifndef _GMTL_COORD_OPS_H_
00007 #define _GMTL_COORD_OPS_H_
00008 
00009 #include <gmtl/Coord.h>
00010 
00011 namespace gmtl
00012 {
00023    template <typename POS_TYPE, typename ROT_TYPE>
00024    inline bool operator==( const Coord<POS_TYPE, ROT_TYPE>& c1, 
00025                            const Coord<POS_TYPE, ROT_TYPE>& c2 )
00026    {
00027       return bool( c1.getPos() == c2.getPos() &&
00028                    c1.getRot() == c2.getRot() );
00029    }
00030 
00036    template <typename POS_TYPE, typename ROT_TYPE>
00037    inline bool operator!=( const Coord<POS_TYPE, ROT_TYPE>& c1, 
00038                            const Coord<POS_TYPE, ROT_TYPE>& c2 )
00039    {
00040       return !operator==( c1, c2 );
00041    }
00042 
00049    template <typename POS_TYPE, typename ROT_TYPE>
00050    inline bool isEqual( const Coord<POS_TYPE, ROT_TYPE>& c1, 
00051                         const Coord<POS_TYPE, ROT_TYPE>& c2, 
00052                         typename Coord<POS_TYPE, ROT_TYPE>::DataType tol = 0 )
00053    {
00054       return bool( isEqual( c1.getPos(), c2.getPos(), tol ) &&
00055                    isEqual( c1.getRot(), c2.getRot(), tol )     );
00056    }
00059 }
00060 
00061 #endif

Generated on Sun Sep 19 2010 14:35:14 for GenericMathTemplateLibrary by  doxygen 1.7.1