Hi,

 

I think there’s been a bug in vgl_lineseg_test.h for a while. The function

 

template <class T>

inline bool vgl_lineseg_test_line(vgl_line_2d<T> const& l1,

                                  vgl_line_segment_2d<T> const& l2)

{

  return vgl_lineseg_test_line(l1.point1().x(),l1.point1().y(),

                               l1.point2().x(),l1.point2().y(),

                               l2.point1().x(),l2.point1().y(),

                               l2.point2().x(),l2.point2().y());

}

 

gives compile errors when it’s used (the errors wouldn’t show up if it wasn’t used since it’s a templated function). The problem is that vgl_line_2d has no point1() or point2() methods (correctly, since it’s an infinite line). However, it does have the method get_two_points, so the corrected function looks something like this:

 

template <class T>

inline bool vgl_lineseg_test_line(vgl_line_2d<T> const& l1,

                                  vgl_line_segment_2d<T> const& l2)

{

  vgl_point_2d<T> p1, p2;

  l1.get_two_points(p1, p2);

  return vgl_lineseg_test_line(p1.x(),p1.y(),

                               p2.x(),p2.y(),

                               l2.point1().x(),l2.point1().y(),

                               l2.point2().x(),l2.point2().y());

}

 

I assume that this function is rarely used, which is why the bug is still there, but if a developer could make the appropriate changes for an upcoming release, it would be greatly appreciated J

 

I’m using MS Visual Studio 2005, VxL 1.7.0, and you should be able to replicate this bug by trying to call the above function with a vgl_line_2d<double> and a vgl_line_segment_2d<double>.

 

Thanks,

 

Eric Greveson


________________________________________________________________________
This e-mail, and any attachment, is confidential. If you have received it in error, do not use or disclose the information in any way, notify me immediately, and please delete it from your system.
________________________________________________________________________