00001 // This is gel/vdgl/vdgl_interpolator.cxx 00002 #ifdef VCL_NEEDS_PRAGMA_INTERFACE 00003 #pragma implementation 00004 #endif 00005 00006 #include "vdgl_interpolator.h" 00007 #include <vsol/vsol_point_2d.h> 00008 #include <vgl/vgl_distance.h> 00009 00010 double vdgl_interpolator::distance_curve_to_point ( vsol_point_2d_sptr p ) 00011 { 00012 vsol_point_2d_sptr curve_point = this->closest_point_on_curve ( p ); 00013 if ( curve_point.ptr() == NULL ) 00014 return 1e11; 00015 00016 return vgl_distance ( p->get_p(), curve_point->get_p() ); 00017 }