Rectangle object. More...
#include <cvb/rect.hpp>
Public Member Functions | |
Rect () noexcept | |
Default rectangle in the integral type system. More... | |
Rect (T left, T top, T right, T bottom) noexcept | |
Constructor for a rectangle. More... | |
Rect (Point2D< T > location, Size2D< T > size) noexcept | |
Constructor for a rectangle. More... | |
T | Left () const noexcept |
Gets first column of the rectangle. More... | |
void | SetLeft (T left) noexcept |
Sets first column of the rectangle. More... | |
T | Top () const noexcept |
Gets first row of the rectangle. More... | |
void | SetTop (T top) noexcept |
Sets first row of the rectangle. More... | |
T | Right () const noexcept |
Gets rightmost column of the rectangle (still inside the rectangle). More... | |
void | SetRight (T right) noexcept |
Sets rightmost column of the rectangle (still inside the rectangle). More... | |
T | Bottom () const noexcept |
Gets bottom row of the rectangle (still inside the rectangle). More... | |
void | SetBottom (T bottom) noexcept |
Sets bottom row of the rectangle (still inside the rectangle). More... | |
T | Width () const noexcept |
Gets the width of the rectangle. More... | |
void | SetWidth (T width) noexcept |
Sets the width of the rectangle. More... | |
T | Height () const noexcept |
Gets the height of the rectangle. More... | |
void | SetHeight (T height) noexcept |
Sets the height of the rectangle. More... | |
Size2D< T > | Size () const noexcept |
Gets the size of the rectangle. More... | |
void | SetSize (Size2D< T > size) noexcept |
Gets the size of the rectangle. More... | |
Point2D< T > | Location () const noexcept |
Gets the location of the top left corner of the rectangle. More... | |
void | SetLocation (Point2D< T > location) noexcept |
Sets the location of the top left corner of the rectangle. More... | |
bool | Contains (Point2D< T > point) const noexcept |
Checks if this rectangle contains a point. More... | |
CoordinateSystemType | CoordinateSystem () const noexcept |
Indicates the coordinate system in which this object is being measured (when used as an area of interest). More... | |
bool | operator== (const Rect< T > &rect) const noexcept |
Compares to another rectangle. More... | |
bool | operator!= (const Rect< T > &rect) const noexcept |
Compares to another rectangle. More... | |
Rectangle object.
Common Vision Blox always uses rectangles (or rectangular shaped areas of interest represented by integer parameters left, top, right and bottom) in such a way, that right and bottom are still part of the area to be investigated (i.e. Width = Right - Left + 1 and Height = Bottom - Top + 1).
|
inlinenoexcept |
Default rectangle in the integral type system.
Does | not throw any exception. |
The top-left corner will be at (0, 0) and the other corner point will be at (-1, -1).
|
inlinenoexcept |
Constructor for a rectangle.
[in] | left | Leftmost column of the rectangle. |
[in] | top | Topmost column of the rectangle. |
[in] | right | Rightmost column of the rectangle. |
[in] | bottom | Bottom columns of the rectangle. |
Does | not throw any exception. |
Constructor for a rectangle.
[in] | location | Location of the rectangle. |
[in] | size | Size of the rectangle. |
Does | not throw any exception. |
|
inlinenoexcept |
Gets bottom row of the rectangle (still inside the rectangle).
Does | not throw any exception. |
|
inlinenoexcept |
Checks if this rectangle contains a point.
[in] | point | Point to check. |
Does | not throw any exception. |
|
inlinenoexcept |
Indicates the coordinate system in which this object is being measured (when used as an area of interest).
Does | not throw any exception. |
|
inlinenoexcept |
Gets the height of the rectangle.
Does | not throw any exception. |
|
inlinenoexcept |
Gets first column of the rectangle.
Does | not throw any exception. |
|
inlinenoexcept |
Gets the location of the top left corner of the rectangle.
Does | not throw any exception. |
|
inlinenoexcept |
Compares to another rectangle.
[in] | rect | Other rectangle. |
Does | not throw any exception. |
|
inlinenoexcept |
Compares to another rectangle.
[in] | rect | Other rectangle. |
Does | not throw any exception. |
|
inlinenoexcept |
Gets rightmost column of the rectangle (still inside the rectangle).
Does | not throw any exception. |
|
inlinenoexcept |
Sets bottom row of the rectangle (still inside the rectangle).
[in] | bottom | The last row. |
Does | not throw any exception. |
|
inlinenoexcept |
Sets the height of the rectangle.
[in] | height | The height. |
Does | not throw any exception. |
|
inlinenoexcept |
Sets first column of the rectangle.
[in] | left | First column. |
Does | not throw any exception. |
|
inlinenoexcept |
Sets the location of the top left corner of the rectangle.
[in] | location | The location. |
Does | not throw any exception. |
|
inlinenoexcept |
Sets rightmost column of the rectangle (still inside the rectangle).
[in] | right | Rightmost column. |
Does | not throw any exception. |
|
inlinenoexcept |
Gets the size of the rectangle.
[in] | size | The size. |
Does | not throw any exception. |
|
inlinenoexcept |
Sets first row of the rectangle.
[in] | top | First row. |
Does | not throw any exception. |
|
inlinenoexcept |
Sets the width of the rectangle.
[in] | width | The width. |
Does | not throw any exception. |
|
inlinenoexcept |
Gets the size of the rectangle.
Does | not throw any exception. |
|
inlinenoexcept |
Gets first row of the rectangle.
Does | not throw any exception. |
|
inlinenoexcept |
Gets the width of the rectangle.
Does | not throw any exception. |