Fawkes API  Fawkes Development Version
firevision::MirrorCalibTool::ConvexPolygon Class Reference

Represents a convex polygon. More...

#include <libs/fvmodels/mirror/mirror_calib.h>

Inheritance diagram for firevision::MirrorCalibTool::ConvexPolygon:

List of all members.

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.

Detailed Description

Represents a convex polygon.

It is defined by a sequence of points in clock-wise-order.


Member Function Documentation

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.

Parameters:
imgimage in which to check
rcartesian point to check
Returns:
true if the point is inside the convex polygon

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).

Parameters:
rpoint to check
Returns:
true if the point is inside the convex polygon

Definition at line 736 of file mirror_calib.cpp.

References firevision::MirrorCalibTool::Point::x, and firevision::MirrorCalibTool::Point::y.


The documentation for this class was generated from the following files: