#include <OpenGUI_Types.h>
Public Member Functions | |
| IRect () | |
| constructor | |
| IRect (const IVector2 &min, const IVector2 max) | |
| constructor | |
| IRect (const int &left, const int &top, const int &right, const int &bottom) | |
| constructor | |
| const IVector2 & | getPosition () const |
| returns top,left | |
| IVector2 | getSize () const |
| return size as IVector2 | |
| int | getWidth () const |
| return width | |
| int | getHeight () const |
| return height | |
| int | getArea () const |
| return total area | |
| void | setWidth (const int &newWidth) |
| sets new width | |
| void | setHeight (const int &newHeight) |
| sets new height | |
| void | setSize (const IVector2 &newSize) |
| sets new size | |
| void | setPosition (const IVector2 &newPosition) |
| sets new position | |
| void | offset (const IVector2 &offsetVector) |
| offset position by given IVector2 | |
| bool | inside (IVector2 point) const |
| return true if given point is inside this IRect | |
| std::string | toStr () const |
| Return a string representation of this value. | |
| bool | operator== (const IRect &right) const |
| comparison operator | |
| bool | operator!= (const IRect &right) const |
| comparison operator | |
Public Attributes | |
| IVector2 | min |
| direct access to upper left point | |
| IVector2 | max |
| direct access to lower right point | |
| OpenGUI::IRect::IRect | ( | ) | [inline] |
constructor
| OpenGUI::IRect::IRect | ( | const int & | left, | |
| const int & | top, | |||
| const int & | right, | |||
| const int & | bottom | |||
| ) | [inline] |
constructor
| int OpenGUI::IRect::getArea | ( | ) | const [inline] |
return total area
| int OpenGUI::IRect::getHeight | ( | ) | const [inline] |
return height
| const IVector2& OpenGUI::IRect::getPosition | ( | ) | const [inline] |
returns top,left
| int OpenGUI::IRect::getWidth | ( | ) | const [inline] |
return width
| bool OpenGUI::IRect::inside | ( | IVector2 | point | ) | const [inline] |
return true if given point is inside this IRect
| void OpenGUI::IRect::offset | ( | const IVector2 & | offsetVector | ) | [inline] |
offset position by given IVector2
| bool OpenGUI::IRect::operator!= | ( | const IRect & | right | ) | const [inline] |
comparison operator
| bool OpenGUI::IRect::operator== | ( | const IRect & | right | ) | const [inline] |
comparison operator
| void OpenGUI::IRect::setHeight | ( | const int & | newHeight | ) | [inline] |
sets new height
| void OpenGUI::IRect::setPosition | ( | const IVector2 & | newPosition | ) | [inline] |
sets new position
| void OpenGUI::IRect::setSize | ( | const IVector2 & | newSize | ) | [inline] |
sets new size
| void OpenGUI::IRect::setWidth | ( | const int & | newWidth | ) | [inline] |
sets new width
| std::string OpenGUI::IRect::toStr | ( | ) | const |
Return a string representation of this value.
direct access to lower right point
direct access to upper left point