![]() |
Visual Servoing Platform version 3.6.0
|
#include <vpTriangle.h>
Public Member Functions | |
| vpTriangle () | |
| vpTriangle (const vpTriangle &tri) | |
| virtual | ~vpTriangle () |
| vpTriangle & | operator= (const vpTriangle &tri) |
| vpTriangle (const vpImagePoint &iP1, const vpImagePoint &iP2, const vpImagePoint &iP3) | |
| void | buildFrom (const vpImagePoint &iP1, const vpImagePoint &iP2, const vpImagePoint &iP3) |
| bool | inTriangle (const vpImagePoint &iP, double threshold=0.00001) |
| void | getTriangleApexes (vpImagePoint &iP1, vpImagePoint &iP2, vpImagePoint &iP3) const |
| double | getArea () const |
Defines a 2D triangle.
A triangle is internally represented by three 2D points.
By default the three coordinates in the 



Definition at line 52 of file vpTriangle.h.
| vpTriangle::vpTriangle | ( | ) |
Basic constructor.
By default, the three 2D points coordinates which define the triangle are 


Definition at line 45 of file vpTriangle.cpp.
| vpTriangle::vpTriangle | ( | const vpTriangle & | tri | ) |
Copy constructor
| tri | : The triangle used for the initialisation. |
Definition at line 72 of file vpTriangle.cpp.
|
virtual |
Basic destructor
Definition at line 82 of file vpTriangle.cpp.
| vpTriangle::vpTriangle | ( | const vpImagePoint & | iP1, |
| const vpImagePoint & | iP2, | ||
| const vpImagePoint & | iP3 | ||
| ) |
Constructor which initialise the triangle thanks to the three 2D points 


| iP1 | : The first apex of the triangle. |
| iP2 | : The first apex of the triangle. |
| iP3 | : The first apex of the triangle. |
Definition at line 60 of file vpTriangle.cpp.
| void vpTriangle::buildFrom | ( | const vpImagePoint & | iP1, |
| const vpImagePoint & | iP2, | ||
| const vpImagePoint & | iP3 | ||
| ) |
Initialise the triangle thanks to the three 2D points 


| iP1 | : The first apex of the triangle. |
| iP2 | : The first apex of the triangle. |
| iP3 | : The first apex of the triangle. |
Definition at line 112 of file vpTriangle.cpp.
|
inline |
Return the area of the triangle. The area is computed when the triangle is built from three image points.
Definition at line 101 of file vpTriangle.h.
|
inline |
Get the apexes of the triangle.
| iP1 | : first apex. |
| iP2 | : second apex. |
| iP3 | : third apex. |
Definition at line 88 of file vpTriangle.h.
| bool vpTriangle::inTriangle | ( | const vpImagePoint & | iP, |
| double | threshold = 0.00001 |
||
| ) |
Check if the 2D point 
| iP | : The point which coulb be inside the triangle. |
| threshold | : A threshold used to define the accuracy of the computation when the point is very near from the edges of the triangle. 0 is the smallest value. |
Definition at line 159 of file vpTriangle.cpp.
References vpImagePoint::get_i(), and vpImagePoint::get_j().
| vpTriangle & vpTriangle::operator= | ( | const vpTriangle & | tri | ) |
Assign tri to this triangle and return a reference to this triangle.
Definition at line 87 of file vpTriangle.cpp.