OpenPose
1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
|
#include <rectangle.hpp>
Public Member Functions | |
Rectangle (const T x=0, const T y=0, const T width=0, const T height=0) | |
Rectangle (const Rectangle< T > &rectangle) | |
Rectangle< T > & | operator= (const Rectangle< T > &rectangle) |
Rectangle (Rectangle< T > &&rectangle) | |
Rectangle< T > & | operator= (Rectangle< T > &&rectangle) |
Point< T > | center () const |
Point< T > | topLeft () const |
Point< T > | bottomRight () const |
T | area () const |
void | recenter (const T newWidth, const T newHeight) |
std::string | toString () const |
Rectangle< T > & | operator*= (const T value) |
Rectangle< T > | operator* (const T value) const |
Rectangle< T > & | operator/= (const T value) |
Rectangle< T > | operator/ (const T value) const |
Public Attributes | |
T | x |
T | y |
T | width |
T | height |
Definition at line 11 of file rectangle.hpp.
op::Rectangle< T >::Rectangle | ( | const T | x = 0 , |
const T | y = 0 , |
||
const T | width = 0 , |
||
const T | height = 0 |
||
) |
op::Rectangle< T >::Rectangle | ( | const Rectangle< T > & | rectangle | ) |
Copy constructor. It performs fast copy
: For performance purpose, copying a Rectangle<T> or Datum or cv::Mat just copies the reference, it still shares the same internal data. Modifying the copied element will modify the original one. Use clone() for a slower but real copy, similarly to cv::Mat and Rectangle<T>.
rectangle | Rectangle to be copied. |
op::Rectangle< T >::Rectangle | ( | Rectangle< T > && | rectangle | ) |
|
inline |
Definition at line 62 of file rectangle.hpp.
Point<T> op::Rectangle< T >::bottomRight | ( | ) | const |
Point<T> op::Rectangle< T >::center | ( | ) | const |
Rectangle<T> op::Rectangle< T >::operator* | ( | const T | value | ) | const |
Rectangle<T>& op::Rectangle< T >::operator*= | ( | const T | value | ) |
Rectangle<T> op::Rectangle< T >::operator/ | ( | const T | value | ) | const |
Rectangle<T>& op::Rectangle< T >::operator/= | ( | const T | value | ) |
Rectangle<T>& op::Rectangle< T >::operator= | ( | const Rectangle< T > & | rectangle | ) |
Copy assignment. Similar to Rectangle<T>(const Rectangle<T>& rectangle).
rectangle | Rectangle to be copied. |
Rectangle<T>& op::Rectangle< T >::operator= | ( | Rectangle< T > && | rectangle | ) |
Move assignment. Similar to Rectangle<T>(Rectangle<T>&& rectangle).
rectangle | Rectangle to be moved. |
void op::Rectangle< T >::recenter | ( | const T | newWidth, |
const T | newHeight | ||
) |
|
inline |
Definition at line 55 of file rectangle.hpp.
std::string op::Rectangle< T >::toString | ( | ) | const |
It returns a string with the whole Rectangle<T> data. Useful for debugging. The format is: [x, y, width, height]
T op::Rectangle< T >::height |
Definition at line 16 of file rectangle.hpp.
T op::Rectangle< T >::width |
Definition at line 15 of file rectangle.hpp.
T op::Rectangle< T >::x |
Definition at line 13 of file rectangle.hpp.
T op::Rectangle< T >::y |
Definition at line 14 of file rectangle.hpp.