Visual Servoing Platform
version 3.2.0 under development (2019-01-22)
|
#include <visp3/core/vpRectOriented.h>
Public Member Functions | |
vpRectOriented () | |
vpRectOriented (const vpImagePoint ¢er, const double width, const double height, const double theta=0) | |
vpRectOriented (const vpRect &rect) | |
vpRectOriented & | operator= (const vpRectOriented &rect) |
vpRectOriented & | operator= (const vpRect &rect) |
operator vpRect () | |
void | setCenter (const vpImagePoint ¢er) |
void | setPoints (const vpImagePoint &topLeft, const vpImagePoint &topRight, const vpImagePoint &bottomLeft, const vpImagePoint &bottomRight) |
vpImagePoint | getCenter () const |
vpImagePoint | getTopLeft () const |
vpImagePoint | getTopRight () const |
vpImagePoint | getBottomLeft () const |
vpImagePoint | getBottomRight () const |
void | setSize (double width, double height) |
double | getWidth () const |
double | getHeight () const |
void | setOrientation (double theta) |
double | getOrientation () const |
bool | isInside (const vpImagePoint &point) const |
Defines an oriented rectangle in the plane.
Definition at line 52 of file vpRectOriented.h.
vpRectOriented::vpRectOriented | ( | ) |
Default constructor.
Definition at line 44 of file vpRectOriented.cpp.
vpRectOriented::vpRectOriented | ( | const vpImagePoint & | center, |
const double | width, | ||
const double | height, | ||
const double | theta = 0 |
||
) |
Constructor.
center | The rectangle center. |
width | The rectangle width. |
height | The rectangle height. |
theta | The rectangle orientation (rad). |
Definition at line 55 of file vpRectOriented.cpp.
References vpImagePoint::get_i(), vpImagePoint::get_j(), vpImagePoint::set_i(), and vpImagePoint::set_j().
vpRectOriented::vpRectOriented | ( | const vpRect & | rect | ) |
Copy constructor.
rect | Rectangle to copy. |
Definition at line 74 of file vpRectOriented.cpp.
References vpImagePoint::get_i(), vpImagePoint::get_j(), vpRect::getCenter(), vpRect::getHeight(), vpRect::getWidth(), vpImagePoint::set_i(), and vpImagePoint::set_j().
vpImagePoint vpRectOriented::getBottomLeft | ( | ) | const |
Get the bottom-left corner.
Definition at line 176 of file vpRectOriented.cpp.
Referenced by operator=().
vpImagePoint vpRectOriented::getBottomRight | ( | ) | const |
Get the bottom-right corner.
Definition at line 179 of file vpRectOriented.cpp.
Referenced by operator=().
vpImagePoint vpRectOriented::getCenter | ( | ) | const |
Get the rectangle center point.
Definition at line 167 of file vpRectOriented.cpp.
Referenced by operator=(), and vpXmlParserRectOriented::writeMainClass().
double vpRectOriented::getHeight | ( | ) | const |
Get the rectangle height.
Definition at line 200 of file vpRectOriented.cpp.
Referenced by vpImageTools::extract(), operator=(), and vpXmlParserRectOriented::writeMainClass().
double vpRectOriented::getOrientation | ( | ) | const |
Get the rectangle orientation (rad).
Definition at line 217 of file vpRectOriented.cpp.
Referenced by vpImageTools::extract(), operator=(), and vpXmlParserRectOriented::writeMainClass().
vpImagePoint vpRectOriented::getTopLeft | ( | ) | const |
Get the top-left corner.
Definition at line 170 of file vpRectOriented.cpp.
Referenced by vpImageTools::extract(), and operator=().
vpImagePoint vpRectOriented::getTopRight | ( | ) | const |
Get the top-right corner.
Definition at line 173 of file vpRectOriented.cpp.
Referenced by operator=().
double vpRectOriented::getWidth | ( | ) | const |
Get the rectangle width.
Definition at line 197 of file vpRectOriented.cpp.
Referenced by vpImageTools::extract(), operator=(), and vpXmlParserRectOriented::writeMainClass().
bool vpRectOriented::isInside | ( | const vpImagePoint & | point | ) | const |
Check whether the point is inside the rectangle.
Definition at line 220 of file vpRectOriented.cpp.
References vpImagePoint::get_i(), and vpImagePoint::get_j().
vpRectOriented::operator vpRect | ( | ) |
Conversion to vpRect operator.
Definition at line 128 of file vpRectOriented.cpp.
References vpException::badValue.
vpRectOriented & vpRectOriented::operator= | ( | const vpRectOriented & | rectOriented | ) |
Assignement operator.
rectOriented | Oriented rectangle to copy. |
Definition at line 93 of file vpRectOriented.cpp.
References getBottomLeft(), getBottomRight(), getCenter(), getHeight(), getOrientation(), getTopLeft(), getTopRight(), and getWidth().
vpRectOriented & vpRectOriented::operator= | ( | const vpRect & | rect | ) |
Assignement operator from vpRect.
rect | Rectangle to copy. |
Definition at line 109 of file vpRectOriented.cpp.
References vpImagePoint::get_i(), vpImagePoint::get_j(), vpRect::getCenter(), vpRect::getHeight(), vpRect::getWidth(), vpImagePoint::set_i(), and vpImagePoint::set_j().
void vpRectOriented::setCenter | ( | const vpImagePoint & | center | ) |
Set the center of the rectangle.
Definition at line 157 of file vpRectOriented.cpp.
void vpRectOriented::setOrientation | ( | double | theta | ) |
Set the rectangle orientation (rad).
Definition at line 203 of file vpRectOriented.cpp.
References vpImagePoint::get_i(), vpImagePoint::get_j(), vpImagePoint::set_i(), and vpImagePoint::set_j().
void vpRectOriented::setPoints | ( | const vpImagePoint & | topLeft, |
const vpImagePoint & | topRight, | ||
const vpImagePoint & | bottomLeft, | ||
const vpImagePoint & | bottomRight | ||
) |
Set the corners of the rectangle.
Definition at line 140 of file vpRectOriented.cpp.
References vpImagePoint::get_i(), vpImagePoint::get_j(), vpImagePoint::set_i(), and vpImagePoint::set_j().
void vpRectOriented::setSize | ( | double | width, |
double | height | ||
) |
Set the size of the rectangle : performs a homothety relatively to the rectangle center.
Definition at line 182 of file vpRectOriented.cpp.
References vpImagePoint::get_i(), vpImagePoint::get_j(), vpImagePoint::set_i(), and vpImagePoint::set_j().