vgl_triangle_test.h
Go to the documentation of this file.
1 // This is core/vgl/vgl_triangle_test.h
2 #ifndef vgl_triangle_test_h_
3 #define vgl_triangle_test_h_
4 //:
5 // \file
6 // \author fsm
7 // \verbatim
8 // Modifications
9 // Nov.2003 - Peter Vanroose - made functions templated
10 // \endverbatim
11 
12 //: Compute discriminant function
13 // Returns determinant of
14 // \verbatim
15 // [ x1 x2 x3 ]
16 // [ y1 y2 y3 ]
17 // [ 1 1 1 ]
18 // \endverbatim
19 
20 template <class T>
22  T x2, T y2,
23  T x3, T y3);
24 
25 //:Function returns true if (x, y) is inside, or on the boundary of triangle
26 // The triangle whose vertices are (xi, yi), i=1,2,3.
27 template <class T>
28 bool vgl_triangle_test_inside(T x1, T y1,
29  T x2, T y2,
30  T x3, T y3,
31  T x , T y );
32 
33 #define VGL_TRIANGLE_TEST_INSTANTIATE(T) extern "please include vgl/vgl_triangle_test.hxx instead"
34 
35 #endif // vgl_triangle_test_h_
T vgl_triangle_test_discriminant(T x1, T y1, T x2, T y2, T x3, T y3)
Compute discriminant function.
bool vgl_triangle_test_inside(T x1, T y1, T x2, T y2, T x3, T y3, T x, T y)
Function returns true if (x, y) is inside, or on the boundary of triangle.