template<typename TPoint, typename TDetComputer>
class DGtal::InHalfPlaneBy2x2DetComputer< TPoint, TDetComputer >
Aim: Class that implements an orientation functor, ie. it provides a way to compute the orientation of three given 2d points. More precisely, it returns:
- zero if the three points belong to the same line
- strictly positive if the three points are counter-clockwise oriented
- striclty negative if the three points are clockwise oriented. The orientation test is reduced to the computation of the determinant of a 2x2 matrix, the implementation of which is delegated to a determinant computer.
typedef Simple2x2DetComputer<Z2i::Integer> DeterminantComputer;
typedef InHalfPlaneBy2x2DetComputer<Point, DeterminantComputer> MyType;
- Template Parameters
NB: The robustness of the computation depends on the robustness of the determinant computer. However, in order to be sure that the result will be exact, you should be sure that the chosen determinant computer can safely deal with integers coded with b+1 bits if the points coordinates are coded with b bits.
- See also
- Simple2x2DetComputer SimpleIncremental2x2DetComputer AvnaimEtAl2x2DetComputer FilteredDetComputer
Definition at line 92 of file InHalfPlaneBy2x2DetComputer.h.