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

AABoxOps.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_AABOXOPS_H_
00007 #define _GMTL_AABOXOPS_H_
00008 
00009 #include <gmtl/AABox.h>
00010 #include <gmtl/VecOps.h>
00011 
00012 namespace gmtl
00013 {
00014 
00029 template< class DATA_TYPE >
00030 inline bool operator==( const AABox<DATA_TYPE>& b1, const AABox<DATA_TYPE>& b2 )
00031 {
00032    return ( (b1.isEmpty() == b2.isEmpty()) &&
00033             (b1.getMin() == b2.getMin()) &&
00034             (b1.getMax() == b2.getMax()) );
00035 }
00036 
00046 template< class DATA_TYPE >
00047 inline bool operator!=( const AABox<DATA_TYPE>& b1, const AABox<DATA_TYPE>& b2 )
00048 {
00049    return (! (b1 == b2));
00050 }
00051 
00063 template< class DATA_TYPE >
00064 inline bool isEqual( const AABox<DATA_TYPE>& b1, const AABox<DATA_TYPE>& b2, const DATA_TYPE& eps )
00065 {
00066    gmtlASSERT( eps >= 0 );
00067    return (b1.isEmpty() == b2.isEmpty()) &&
00068           isEqual( b1.getMin(), b2.getMin(), eps ) &&
00069           isEqual( b1.getMax(), b2.getMax(), eps );
00070 }
00073 }
00074 
00075 #endif
00076 

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