Fawkes API
Fawkes Development Version
|
Represents a convex polygon. More...
#include <libs/fvmodels/mirror/mirror_calib.h>
Public Member Functions | |
bool | contains (const CartesianImage &img, const CartesianPoint &r) const |
Check if point is inside convex polygon. | |
bool | contains (const PixelPoint &r) const |
Check if pixel point is inside convex polygon. |
Represents a convex polygon.
It is defined by a sequence of points in clock-wise-order.
bool firevision::MirrorCalibTool::ConvexPolygon::contains | ( | const CartesianImage & | img, |
const CartesianPoint & | r | ||
) | const |
Check if point is inside convex polygon.
The point r is converted to PixelPoint wrt img.
img | image in which to check |
r | cartesian point to check |
Definition at line 720 of file mirror_calib.cpp.
References firevision::MirrorCalibTool::CartesianImage::to_pixel().
bool firevision::MirrorCalibTool::ConvexPolygon::contains | ( | const PixelPoint & | r | ) | const |
Check if pixel point is inside convex polygon.
This is the case if for all points p, q in the polygon p_1, ..., p_n where p = p_i, q = p_{i+1} for some i or p = p_n, q = p_1 it holds (p, q, r) does not form a left turn (if they do, they are counter-clock-wise).
r | point to check |
Definition at line 736 of file mirror_calib.cpp.
References firevision::MirrorCalibTool::Point::x, and firevision::MirrorCalibTool::Point::y.