core/vgl/vgl_triangle_test.h
Go to the documentation of this file.
00001 // This is core/vgl/vgl_triangle_test.h
00002 #ifndef vgl_triangle_test_h_
00003 #define vgl_triangle_test_h_
00004 //:
00005 // \file
00006 // \author fsm
00007 // \verbatim
00008 //  Modifications
00009 //   Nov.2003 - Peter Vanroose - made functions templated
00010 // \endverbatim
00011 
00012 //: Compute discriminant function
00013 // Returns determinant of
00014 // \verbatim
00015 // [ x1 x2 x3 ]
00016 // [ y1 y2 y3 ]
00017 // [ 1  1  1  ]
00018 // \endverbatim
00019 
00020 template <class T>
00021 T vgl_triangle_test_discriminant(T x1, T y1,
00022                                  T x2, T y2,
00023                                  T x3, T y3);
00024 
00025 //:Function returns true if (x, y) is inside, or on the boundary of triangle
00026 // The triangle whose vertices are (xi, yi), i=1,2,3.
00027 template <class T>
00028 bool vgl_triangle_test_inside(T x1, T y1,
00029                               T x2, T y2,
00030                               T x3, T y3,
00031                               T x , T y );
00032 
00033 #define VGL_TRIANGLE_TEST_INSTANTIATE(T) extern "please include vgl/vgl_triangle_test.txx instead"
00034 
00035 #endif // vgl_triangle_test_h_