#include <spDimensionRect2D.hpp>
Public Member Functions | |
rect2d () | |
rect2d (T X, T Y) | |
rect2d (T NewLeft, T NewTop, T NewRight, T NewBottom) | |
rect2d (const rect2d< T > &Other) | |
~rect2d () | |
bool | operator== (const rect2d< T > &other) const |
bool | operator!= (const rect2d< T > &other) const |
rect2d< T > | operator+ (const rect2d< T > &other) const |
rect2d< T > & | operator+= (const rect2d< T > &other) |
rect2d< T > | operator- (const rect2d< T > &other) const |
rect2d< T > & | operator-= (const rect2d< T > &other) |
rect2d< T > | operator/ (const rect2d< T > &other) const |
rect2d< T > & | operator/= (const rect2d< T > &other) |
rect2d< T > | operator* (const rect2d< T > &other) const |
rect2d< T > & | operator*= (const rect2d< T > &other) |
rect2d< T > | operator- () const |
void | setSize (const size2d< T > &Size) |
Sets the rectangle's size. | |
size2d< T > | getSize () const |
Returns the rectangle's size. | |
void | setCenter (const point2d< T > &Center) |
Sets the rectangle's center point. | |
point2d< T > | getCenter () const |
Returns the rectangle's center point. | |
void | setLTPoint (const point2d< T > &Point) |
Sets the left-top point. | |
point2d< T > | getLTPoint () const |
Returns the left-top point. | |
void | setRBPoint (const point2d< T > &Point) |
Sets the right-bottom point. | |
point2d< T > | getRBPoint () const |
Returns the right-bottom point. | |
T | getWidth () const |
Returns the rectangle's width (Right - Left). | |
T | getHeight () const |
Returns the rectangle's height (Bottom - Top). | |
bool | empty () const |
Returns true if all four components are 0. | |
bool | valid () const |
Returns true if this is a valid rectangle. | |
rect2d< T > & | repair () |
bool | overlap (const point2d< T > &Point) const |
bool | overlap (const rect2d< T > &other) const |
template<typename B > | |
rect2d< B > | cast () const |
Public Attributes | |
T | Left |
T | Right |
T | Top |
T | Bottom |
sp::dim::rect2d< T >::rect2d | ( | ) | [inline] |
sp::dim::rect2d< T >::rect2d | ( | T | X, | |
T | Y | |||
) | [inline] |
sp::dim::rect2d< T >::rect2d | ( | T | NewLeft, | |
T | NewTop, | |||
T | NewRight, | |||
T | NewBottom | |||
) | [inline] |
sp::dim::rect2d< T >::rect2d | ( | const rect2d< T > & | Other | ) | [inline] |
sp::dim::rect2d< T >::~rect2d | ( | ) | [inline] |
bool sp::dim::rect2d< T >::empty | ( | ) | const [inline] |
Returns true if all four components are 0.
point2d<T> sp::dim::rect2d< T >::getCenter | ( | ) | const [inline] |
Returns the rectangle's center point.
T sp::dim::rect2d< T >::getHeight | ( | ) | const [inline] |
Returns the rectangle's height (Bottom - Top).
point2d<T> sp::dim::rect2d< T >::getLTPoint | ( | ) | const [inline] |
Returns the left-top point.
point2d<T> sp::dim::rect2d< T >::getRBPoint | ( | ) | const [inline] |
Returns the right-bottom point.
size2d<T> sp::dim::rect2d< T >::getSize | ( | ) | const [inline] |
Returns the rectangle's size.
T sp::dim::rect2d< T >::getWidth | ( | ) | const [inline] |
Returns the rectangle's width (Right - Left).
bool sp::dim::rect2d< T >::operator!= | ( | const rect2d< T > & | other | ) | const [inline] |
rect2d<T> sp::dim::rect2d< T >::operator* | ( | const rect2d< T > & | other | ) | const [inline] |
rect2d<T>& sp::dim::rect2d< T >::operator*= | ( | const rect2d< T > & | other | ) | [inline] |
rect2d<T> sp::dim::rect2d< T >::operator+ | ( | const rect2d< T > & | other | ) | const [inline] |
rect2d<T>& sp::dim::rect2d< T >::operator+= | ( | const rect2d< T > & | other | ) | [inline] |
rect2d<T> sp::dim::rect2d< T >::operator- | ( | const rect2d< T > & | other | ) | const [inline] |
rect2d<T> sp::dim::rect2d< T >::operator- | ( | ) | const [inline] |
rect2d<T>& sp::dim::rect2d< T >::operator-= | ( | const rect2d< T > & | other | ) | [inline] |
rect2d<T> sp::dim::rect2d< T >::operator/ | ( | const rect2d< T > & | other | ) | const [inline] |
rect2d<T>& sp::dim::rect2d< T >::operator/= | ( | const rect2d< T > & | other | ) | [inline] |
bool sp::dim::rect2d< T >::operator== | ( | const rect2d< T > & | other | ) | const [inline] |
bool sp::dim::rect2d< T >::overlap | ( | const rect2d< T > & | other | ) | const [inline] |
bool sp::dim::rect2d< T >::overlap | ( | const point2d< T > & | Point | ) | const [inline] |
rect2d<T>& sp::dim::rect2d< T >::repair | ( | ) | [inline] |
void sp::dim::rect2d< T >::setCenter | ( | const point2d< T > & | Center | ) | [inline] |
Sets the rectangle's center point.
void sp::dim::rect2d< T >::setLTPoint | ( | const point2d< T > & | Point | ) | [inline] |
Sets the left-top point.
void sp::dim::rect2d< T >::setRBPoint | ( | const point2d< T > & | Point | ) | [inline] |
Sets the right-bottom point.
void sp::dim::rect2d< T >::setSize | ( | const size2d< T > & | Size | ) | [inline] |
Sets the rectangle's size.
bool sp::dim::rect2d< T >::valid | ( | ) | const [inline] |
Returns true if this is a valid rectangle.
T sp::dim::rect2d< T >::Bottom |
T sp::dim::rect2d< T >::Left |
T sp::dim::rect2d< T >::Right |
T sp::dim::rect2d< T >::Top |