#include <rect.h>
Public Member Functions | |
constexpr | Rect ()=default |
constexpr | Rect (float x, float y, float width, float height) |
constexpr | Rect (const glm::vec2 &min, const glm::vec2 &max) |
constexpr | Rect (glm::vec2 &&min, glm::vec2 &&max) |
bool | operator== (const Rect &other) const |
bool | operator!= (const Rect &other) const |
float | getWidth () const |
float | getHeight () const |
bool | hasWidth () const |
bool | hasHeight () const |
bool | inside (const glm::vec2 &point) const |
const glm::vec2 & | getMin () const |
const glm::vec2 & | getMax () const |
Public Attributes | |
glm::vec2 | mMinPosition = { 0.0f, 0.0f } |
glm::vec2 | mMaxPosition = { 0.0f, 0.0f } |
Simple 2D rectangle.
|
constexprdefault |
Default constructor
|
constexpr |
Utility constructor
x | the start x position of the rectangle |
y | the start y position of the rectangle |
width | the width of the rectangle |
height | the height of the triangle |
|
constexpr |
Utility min max constructor
min | the min x, y position of the rectangle |
max | the max x, y position of the rectangle |
|
constexpr |
Utility min max move constructor
min | the min x, y position of the rectangle |
max | the max x, y position of the rectangle |
float getHeight | ( | ) | const |
const glm::vec2& getMax | ( | ) | const |
const glm::vec2& getMin | ( | ) | const |
float getWidth | ( | ) | const |
bool hasHeight | ( | ) | const |
bool hasWidth | ( | ) | const |
bool inside | ( | const glm::vec2 & | point | ) | const |
bool operator!= | ( | const Rect & | other | ) | const |
bool operator== | ( | const Rect & | other | ) | const |
glm::vec2 mMaxPosition = { 0.0f, 0.0f } |
glm::vec2 mMinPosition = { 0.0f, 0.0f } |