00001
00002
00003 #ifndef _GEOM_DISTANCE_HPP_
00004 #define _GEOM_DISTANCE_HPP_
00005
00006 #define GEN_DISTANCE_FUNCTIONS \
00007 protected: \
00008 virtual double distance( const geom::Point<dimension>& point ) const \
00009 { \
00010 return geom::distance( point, *this); \
00011 } \
00012 virtual double distance( const geom::Line<dimension>& line) const \
00013 { \
00014 return geom::distance( line, *this); \
00015 } \
00016 virtual double distance( const geom::HyperPlane<dimension>& plan) const \
00017 { \
00018 return geom::distance( plan, *this); \
00019 } \
00020 virtual double distance( const geom::Segment<dimension>& segment) const \
00021 { \
00022 return geom::distance( segment, *this); \
00023 } \
00024 virtual double distance( const geom::PolyLine<dimension>& polyLine) const \
00025 { \
00026 return geom::distance( polyLine, *this); \
00027 } \
00028 virtual double distance( const geom::Facet<dimension>& facet) const \
00029 { \
00030 return geom::distance( facet, *this); \
00031 } \
00032 virtual double distance( const geom::Repere<dimension>& repere) const \
00033 { \
00034 return geom::distance( repere, *this); \
00035 }
00036
00037 namespace jafar {
00038 namespace geom {
00039 template<int dimension>
00040 inline double distance(const typename Atom<dimension>::HomogenousVecD&, const typename Atom<dimension>::HomogenousVecD&);
00041
00042 template<int dimension>
00043 inline double distance(const Point<dimension>&, const typename Atom<dimension>::HomogenousVecD&);
00044 template<int dimension>
00045 inline double distance(const Point<dimension>&, const HyperPlane<dimension>&);
00046 template<int dimension>
00047 inline double distance(const Point<dimension>&, const Line<dimension>&);
00048 template<int dimension>
00049 inline double distance(const Point<dimension>&, const Point<dimension>&);
00050 template<int dimension>
00051 inline double distance(const Point<dimension>&, const Segment<dimension>& );
00052
00053 template<int dimension>
00054 inline double distance(const Line<dimension>& line, const typename Atom<dimension>::HomogenousVecD& v);
00055 template<int dimension>
00056 inline double distance(const Line<dimension>&, const HyperPlane<dimension>&);
00057 template<int dimension>
00058 inline double distance(const Line<dimension>&, const Line<dimension>&);
00059 template<int dimension>
00060 inline double distance(const Line<dimension>&, const Point<dimension>&);
00061 template<int dimension>
00062 inline double distance(const Line<dimension>&, const Segment<dimension>& );
00063
00064 template<int dimension>
00065 inline double distance(const HyperPlane<dimension>&, const typename Atom<dimension>::HomogenousVecD&);
00066 template<int dimension>
00067 inline double distance(const HyperPlane<dimension>&, const HyperPlane<dimension>&);
00068 template<int dimension>
00069 inline double distance(const HyperPlane<dimension>&, const Line<dimension>&);
00070 template<int dimension>
00071 inline double distance(const HyperPlane<dimension>&, const Point<dimension>&);
00072 template<int dimension>
00073 inline double distance(const HyperPlane<dimension>&, const Segment<dimension>& );
00074
00075 template<int dimension>
00076 inline double distance(const Segment<dimension>& seg,
00077 const typename Atom<dimension>::HomogenousVecD& t2 );
00078 template<int dimension>
00079 inline double distance(const Segment<dimension>&, const HyperPlane<dimension>& );
00080 template<int dimension>
00081 inline double distance(const Segment<dimension>&, const Line<dimension>& );
00082 template<int dimension>
00083 inline double distance(const Segment<dimension>&, const Point<dimension>& );
00084 template<int dimension>
00085 inline double distance(const Segment<dimension>&, const PolyLine<dimension>& );
00086 template<int dimension>
00087 inline double distance(const Segment<dimension>&, const Segment<dimension>& );
00088
00089 template<int dimension, typename _T2_>
00090 inline double distance(const PolyLine<dimension>&, const _T2_&);
00091 template<int dimension, typename _T1_>
00092 inline double distance(const _T1_&, const PolyLine<dimension>& );
00093 template<int dimension>
00094 inline double distance(const PolyLine<dimension>&, const PolyLine<dimension>& );
00095 template<int dimension>
00096 inline double distance(const PolyLine<dimension>&, const Segment<dimension>& );
00097 template<int dimension>
00098 inline double distance(const PolyLine<dimension>&, const Repere<dimension>& );
00099 template<int dimension>
00100 inline double distance(const PolyLine<dimension>&, const Facet<dimension>&);
00101
00102 template<int dimension, typename _T2_>
00103 inline double distance(const Facet<dimension>&, const _T2_&);
00104 template<int dimension, typename _T1_>
00105 inline double distance(const _T1_&, const Facet<dimension>& );
00106 template<int dimension>
00107 inline double distance(const Facet<dimension>&, const Facet<dimension>&);
00108 template<int dimension>
00109 inline double distance(const Facet<dimension>&, const Segment<dimension>&);
00110 template<int dimension>
00111 inline double distance(const Facet<dimension>&, const PolyLine<dimension>&);
00112 template<int dimension>
00113 inline double distance(const Repere<dimension>&, const Facet<dimension>& );
00114 template<int dimension>
00115 inline double distance(const Facet<dimension>&, const Repere<dimension>& );
00116
00117 template<int dimension, typename _T2_>
00118 inline double distance(const Repere<dimension>&, const _T2_&);
00119 template<int dimension, typename _T1_>
00120 inline double distance(const _T1_&, const Repere<dimension>& );
00121 template<int dimension>
00122 inline double distance(const Repere<dimension>&, const Repere<dimension>& );
00123 template<int dimension>
00124 inline double distance(const Repere<dimension>&, const PolyLine<dimension>& );
00125 }
00126 }
00127
00128 #include "DistanceImpl.hpp"
00129
00130 #endif