#include <OpenGUI_Types.h>
Public Member Functions | |
| FRect () | |
| constructor | |
| FRect (const FVector2 &min, const FVector2 max) | |
| constructor | |
| FRect (const float &left, const float &top, const float &right, const float &bottom) | |
| constructor | |
| const FVector2 & | getPosition () const |
| return position | |
| FVector2 | getSize () const |
| return size | |
| float | getWidth () const |
| return width | |
| float | getHeight () const |
| return height | |
| void | setWidth (const float &newWidth) |
| set new width | |
| void | setHeight (const float &newHeight) |
| set new height | |
| void | setSize (const FVector2 &newSize) |
| set new size | |
| void | setPosition (const FVector2 &newPosition) |
| set new position | |
| void | offset (const FVector2 &offsetVector) |
offset position by offsetVector | |
| FRect & | normalize () |
| Normalizes the rect, ensuring that min really is the min and max really is the max. | |
| bool | isInside (const FVector2 &point) const |
| return true if given point is within bounds of this rect | |
| FVector2 | getInnerCoord (const FVector2 &outerFVector2) |
| Return the given outer coord as an inner coord. | |
| FVector2 | getOuterCoord (const FVector2 &innerFVector2) |
| Return the given inner coord as an outer coord. | |
| FRect | pixelAligned (const IVector2 &resolution) const |
| Returns a pixel aligned copy of this FRect. | |
| std::string | toStr () const |
| Return a string representation of this value. | |
| bool | operator== (const FRect &right) const |
| comparison operator | |
| bool | operator!= (const FRect &right) const |
| comparison operator | |
Public Attributes | |
| FVector2 | min |
| direct access to upper left point | |
| FVector2 | max |
| direct access to lower right point | |
| OpenGUI::FRect::FRect | ( | ) | [inline] |
constructor
| OpenGUI::FRect::FRect | ( | const float & | left, | |
| const float & | top, | |||
| const float & | right, | |||
| const float & | bottom | |||
| ) | [inline] |
constructor
| float OpenGUI::FRect::getHeight | ( | ) | const [inline] |
return height
Return the given outer coord as an inner coord.
inner coord is defined as upper left = 0,0, lower right = 1.0f,1.0f
Return the given inner coord as an outer coord.
inner coord is defined as upper left = 0,0, lower right = 1.0f,1.0f
| const FVector2& OpenGUI::FRect::getPosition | ( | ) | const [inline] |
return position
| FVector2 OpenGUI::FRect::getSize | ( | ) | const [inline] |
return size
| float OpenGUI::FRect::getWidth | ( | ) | const [inline] |
return width
| bool OpenGUI::FRect::isInside | ( | const FVector2 & | point | ) | const [inline] |
return true if given point is within bounds of this rect
| FRect& OpenGUI::FRect::normalize | ( | ) | [inline] |
Normalizes the rect, ensuring that min really is the min and max really is the max.
| void OpenGUI::FRect::offset | ( | const FVector2 & | offsetVector | ) | [inline] |
offset position by offsetVector
| bool OpenGUI::FRect::operator!= | ( | const FRect & | right | ) | const [inline] |
comparison operator
| bool OpenGUI::FRect::operator== | ( | const FRect & | right | ) | const [inline] |
comparison operator
Returns a pixel aligned copy of this FRect.
| void OpenGUI::FRect::setHeight | ( | const float & | newHeight | ) | [inline] |
set new height
| void OpenGUI::FRect::setPosition | ( | const FVector2 & | newPosition | ) | [inline] |
set new position
| void OpenGUI::FRect::setSize | ( | const FVector2 & | newSize | ) | [inline] |
set new size
| void OpenGUI::FRect::setWidth | ( | const float & | newWidth | ) | [inline] |
set new width
| std::string OpenGUI::FRect::toStr | ( | ) | const |
Return a string representation of this value.
direct access to lower right point
direct access to upper left point