vtf-logo

distance.h

00001 // -*- C++ -*-
00002 
00019 #if !defined(__geom_distance_h__)
00020 #define __geom_distance_h__
00021 
00022 // If we are debugging the whole geom namespace.
00023 #if defined(DEBUG_geom) && !defined(DEBUG_distance)
00024 #define DEBUG_distance
00025 #endif
00026 
00027 #ifdef DEBUG_distance
00028 #ifndef DEBUG_ads
00029 #define DEBUG_ads
00030 #endif
00031 #endif
00032 
00033 #include "BBox.h"
00034 #include "Point.h"
00035 #include "content.h"
00036 
00037 BEGIN_NAMESPACE_GEOM
00038 
00039 // CONTINUE: continue fixing.  I think I should remove the signed distance 
00040 // functions.
00041 
00042 //---------------------------------------------------------------------------
00043 // Bounds on the distance to objects in a bounding box.
00044 //---------------------------------------------------------------------------
00045 
00046 
00048 
00054 template<int N, typename T>
00055 inline
00056 T
00057 computeUpperBoundOnSignedDistance(const BBox<N,T>& box, 
00058                                   const typename BBox<N,T>::Point& x) {
00059   return computeUpperBoundOnSignedDistance(box, x, Loki::Int2Type<N!=1>());
00060 }
00061 
00062 
00064 
00070 template<int N, typename T>
00071 inline
00072 T
00073 computeLowerBoundOnSignedDistance(const BBox<N,T>& box, 
00074                                   const typename BBox<N,T>::Point& x) {
00075   return computeLowerBoundOnSignedDistance(box, x, Loki::Int2Type<N!=1>());
00076 }
00077 
00078 
00080 template<int N, typename T>
00081 T
00082 computeUpperBoundOnUnsignedDistance(const BBox<N,T>& box, 
00083                                     const typename BBox<N,T>::Point& x);
00084 
00085 
00087 template<int N, typename T>
00088 T
00089 computeLowerBoundOnUnsignedDistance(const BBox<N,T>& box, 
00090                                     const typename BBox<N,T>::Point& x);
00091 
00092 END_NAMESPACE_GEOM
00093 
00094 #define __geom_distance_ipp__
00095 #include "distance.ipp"
00096 #undef __geom_distance_ipp__
00097 
00098 #endif

Generated on Fri Aug 24 12:55:52 2007 for Computational Geometry Package by  doxygen 1.4.7