Macros | Functions
vgl_lineseg_test.h File Reference
#include <cmath>
#include <vgl/vgl_line_segment_2d.h>
#include <vgl/vgl_line_2d.h>
#include <vgl/vgl_point_2d.h>

Go to the source code of this file.

Macros

#define VGL_LINESEG_TEST_INSTANTIATE(T)   extern "please include vgl/vgl_lineseg_test.hxx instead"
 

Functions

template<class T >
bool vgl_lineseg_test_line (T x1, T y1, T x2, T y2, T x3, T y3, T x4, T y4)
 true if the line joining [1], [2] meets the linesegment joining [3], [4]. More...
 
template<class T >
bool vgl_lineseg_test_lineseg (T x1, T y1, T x2, T y2, T x3, T y3, T x4, T y4)
 true if the linesegment joining [1], [2] meets the linesegment joining [3], [4]. More...
 
template<class T >
bool vgl_lineseg_test_line (vgl_line_2d< T > const &l1, vgl_line_segment_2d< T > const &l2)
 true if the line meets the linesegment. More...
 
template<class T >
bool vgl_lineseg_test_point (vgl_point_2d< T > const &p, vgl_line_segment_2d< T > const &lseg)
 true if the point lies on the line segment and is between the endpoints. More...
 
template<class T >
bool vgl_lineseg_test_lineseg (vgl_line_segment_2d< T > const &l1, vgl_line_segment_2d< T > const &l2)
 return true if the two linesegments meet. More...
 

Detailed Description

Author
fsm
  Modifications
   Nov.2003 - Peter Vanroose - made all functions templated
   Sep.2005 - Peter Vanroose - bug fix: collinear line segments always "true"
   Mar.2008 - Ibrahim Eden - bug fix: bool vgl_lineseg_test_line(vgl_line_2d<T> const& l1,vgl_line_segment_2d<T> const& l2)
   Mar.2009 - Dirk Steckhan - bug fix in vgl_lineseg_test_point (missing sqrt)

Definition in file vgl_lineseg_test.h.

Macro Definition Documentation

◆ VGL_LINESEG_TEST_INSTANTIATE

#define VGL_LINESEG_TEST_INSTANTIATE (   T)    extern "please include vgl/vgl_lineseg_test.hxx instead"

Definition at line 73 of file vgl_lineseg_test.h.

Function Documentation

◆ vgl_lineseg_test_line() [1/2]

template<class T >
bool vgl_lineseg_test_line ( x1,
y1,
x2,
y2,
x3,
y3,
x4,
y4 
)

true if the line joining [1], [2] meets the linesegment joining [3], [4].

End points are considered to belong to a line segment.

Definition at line 17 of file vgl_lineseg_test.hxx.

◆ vgl_lineseg_test_line() [2/2]

template<class T >
bool vgl_lineseg_test_line ( vgl_line_2d< T > const &  l1,
vgl_line_segment_2d< T > const &  l2 
)
inline

true if the line meets the linesegment.

End points are considered to belong to a line segment.

Definition at line 42 of file vgl_lineseg_test.h.

◆ vgl_lineseg_test_lineseg() [1/2]

template<class T >
bool vgl_lineseg_test_lineseg ( x1,
y1,
x2,
y2,
x3,
y3,
x4,
y4 
)

true if the linesegment joining [1], [2] meets the linesegment joining [3], [4].

End points are considered to belong to a line segment.

Definition at line 36 of file vgl_lineseg_test.hxx.

◆ vgl_lineseg_test_lineseg() [2/2]

template<class T >
bool vgl_lineseg_test_lineseg ( vgl_line_segment_2d< T > const &  l1,
vgl_line_segment_2d< T > const &  l2 
)
inline

return true if the two linesegments meet.

End points are considered to belong to a line segment.

Definition at line 64 of file vgl_lineseg_test.h.

◆ vgl_lineseg_test_point()

template<class T >
bool vgl_lineseg_test_point ( vgl_point_2d< T > const &  p,
vgl_line_segment_2d< T > const &  lseg 
)

true if the point lies on the line segment and is between the endpoints.

Definition at line 91 of file vgl_lineseg_test.hxx.