2 #ifndef vgl_closest_point_h_ 3 #define vgl_closest_point_h_ 29 # include <vcl_msvc_warnings.h> 50 T
const px[], T
const py[],
unsigned int n,
57 T
const px[], T
const py[], T
const pz[],
unsigned int n,
64 T
const px[], T
const py[],
unsigned int n,
71 T
const px[], T
const py[], T
const pz[],
unsigned int n,
116 template <
class T>
inline 127 template <
class T>
inline 138 template <
class T>
inline 149 template <
class T>
inline 164 template <
class T>
inline 208 template <
class T>
inline 220 template <
class T>
inline 225 template <
class T>
inline 231 template <
class T>
inline 240 template <
class T>
inline 254 template <
class T>
inline 271 bool* unique=
nullptr);
285 bool* unique=
nullptr)
303 bool* unique=
nullptr);
312 template <
class T>
inline 323 template <
class T>
inline 340 T dist = std::numeric_limits<T>::max());
346 #endif // vgl_closest_point_h_
Represents a homogeneous 2D line.
void vgl_closest_point_to_linesegment(T &ret_x, T &ret_y, T x1, T y1, T x2, T y2, T x, T y)
Closest point to (x,y) on the line segment (x1,y1)-(x2,y2).
Represents a homogeneous 3D point.
A class to hold a non-homogeneous representation of a 3D line.
int vgl_closest_point_to_closed_polygon(T &ret_x, T &ret_y, T const px[], T const py[], unsigned int n, T x, T y)
Closest point to (x,y) on closed polygon (px[i],py[i]).
vgl_point_2d< T > vgl_closest_point_origin(vgl_line_2d< T > const &l)
Return the point on the given line closest to the origin.
vgl_point_2d< T > vgl_closest_point(vgl_line_2d< T > const &l, vgl_point_2d< T > const &p)
Return the point on the given line closest to the given point.
vgl_point_3d< Type > point_t(const double t) const
Return a point on the line defined by a scalar parameter t.
Represents a Euclidean 3D plane.
Represents a 3D line segment using two points.
int vgl_closest_point_to_non_closed_polygon(T &ret_x, T &ret_y, T const px[], T const py[], unsigned int n, T x, T y)
Closest point to (x,y) on open polygon (px[i],py[i]).
Represents a 3-d line with position defined in the orthogonal plane passing through the origin.
A 3-d infinite line with position parameterized by orthogonal plane coordinates.
double vgl_closest_point_t(vgl_line_3d_2_points< T > const &l, vgl_point_3d< T > const &p)
Return the point on the given line which is closest to the given point.
Represents a homogeneous 2D point.
vgl_point_3d< Type > point() const
Return the point on the line closest to the origin.
std::pair< vgl_homg_point_3d< T >, vgl_homg_point_3d< T > > vgl_closest_points(vgl_homg_line_3d_2_points< T > const &line1, vgl_homg_line_3d_2_points< T > const &line2)
Return the two points of nearest approach of two 3D lines, one on each line.
Represents a homogeneous 3D line using two points.