0.44.0
|
#include <iaRectangle.h>
Public Member Functions | |
iaRectangle ()=default | |
iaRectangle (T x, T y, T width=0, T height=0) | |
iaRectangle (const iaVector2< T > &pos, const iaVector2< T > &size) | |
iaRectangle (const iaRectangle< T > &rect) | |
void | adjust (T x, T y, T width, T height) |
const T | getX () const |
const T | getY () const |
const T | getWidth () const |
const T | getHeight () const |
const T | getLeft () const |
const T | getRight () const |
const T | getTop () const |
const T | getBottom () const |
void | setCenter (T x, T y) |
void | setCenter (const iaVector2< T > ¢er) |
const iaVector2< T > | getCenter () const |
void | setTopLeft (const iaVector2< T > &pos) |
void | setTopLeft (T x, T y) |
const iaVector2< T > | getTopLeft () const |
const iaVector2< T > | getTopRight () const |
const iaVector2< T > | getBottomLeft () const |
const iaVector2< T > | getBottomRight () const |
void | setX (T x) |
void | setY (T y) |
void | setWidth (T width) |
void | setHeight (T height) |
void | setSize (T width, T height) |
void | set (T x, T y, T width, T height) |
iaRectangle< T > | operator= (const iaRectangle< T > &rectangle) |
bool | operator== (const iaRectangle< T > &other) const |
bool | operator!= (const iaRectangle< T > &other) const |
Public Attributes | |
T | _x = (T)0 |
T | _y = (T)0 |
T | _width = (T)0 |
T | _height = (T)0 |
2d rectangle
|
default |
does nothing
iaRectangle::iaRectangle | ( | T | x, |
T | y, | ||
T | width = 0 , |
||
T | height = 0 |
||
) |
ctor with parameters
x | horizontal position |
y | vertical position |
width | width |
height | height |
iaRectangle::iaRectangle | ( | const iaVector2< T > & | pos, |
const iaVector2< T > & | size | ||
) |
ctor with parameters
pos | top left position |
size | the size of the rectangle |
iaRectangle::iaRectangle | ( | const iaRectangle< T > & | rect | ) |
copy ctor
rect | the rectangle to copy |
void iaRectangle::adjust | ( | T | x, |
T | y, | ||
T | width, | ||
T | height | ||
) |
adjust the dimensions of the rectangle
x | the horizontal position adjustment |
y | the vertical position adjustment |
width | the horizontal size adjustment |
height | the vertical size adjustment |
const T iaRectangle::getBottom | ( | ) | const |
const iaVector2< T > iaRectangle::getBottomLeft | ( | ) | const |
const iaVector2< T > iaRectangle::getBottomRight | ( | ) | const |
const iaVector2< T > iaRectangle::getCenter | ( | ) | const |
const T iaRectangle::getHeight | ( | ) | const |
const T iaRectangle::getLeft | ( | ) | const |
const T iaRectangle::getRight | ( | ) | const |
const T iaRectangle::getTop | ( | ) | const |
const iaVector2< T > iaRectangle::getTopLeft | ( | ) | const |
const iaVector2< T > iaRectangle::getTopRight | ( | ) | const |
const T iaRectangle::getWidth | ( | ) | const |
const T iaRectangle::getX | ( | ) | const |
const T iaRectangle::getY | ( | ) | const |
bool iaRectangle::operator!= | ( | const iaRectangle< T > & | other | ) | const |
compares two rectangles
other | the other rectangle |
iaRectangle< T > iaRectangle::operator= | ( | const iaRectangle< T > & | rectangle | ) |
assignment operator
rectangle | the rectangle to assign |
bool iaRectangle::operator== | ( | const iaRectangle< T > & | other | ) | const |
compares two rectangles
other | the other rectangle |
void iaRectangle::set | ( | T | x, |
T | y, | ||
T | width, | ||
T | height | ||
) |
sets all values at once
x | the horizontal position |
y | the vertical position |
width | the horizontal size |
height | the vertical size |
void iaRectangle::setCenter | ( | const iaVector2< T > & | center | ) |
sets center of rectangle without changing it's size
center | the center to se |
void iaRectangle::setCenter | ( | T | x, |
T | y | ||
) |
sets center of rectangle without changing it's size
x | x component of the new center |
y | y component of the new center |
void iaRectangle::setHeight | ( | T | height | ) |
sets height of rectangle
height | height of rectangle |
void iaRectangle::setSize | ( | T | width, |
T | height | ||
) |
sets width and height of rectangle
height | height of rectangle |
width | width of rectangle |
void iaRectangle::setTopLeft | ( | const iaVector2< T > & | pos | ) |
sets top left of rectangle
pos | the top left corner |
void iaRectangle::setTopLeft | ( | T | x, |
T | y | ||
) |
sets top left of rectangle
x | horizontal position |
y | vertical position |
void iaRectangle::setWidth | ( | T | width | ) |
sets width of rectangle
width | width of rectangle |
void iaRectangle::setX | ( | T | x | ) |
sets horizontal position
x | horizontal position |
void iaRectangle::setY | ( | T | y | ) |
sets vertical position
y | vertical position |
T iaux::iaRectangle< T >::_height = (T)0 |
height of rectangle
T iaux::iaRectangle< T >::_width = (T)0 |
height of rectangle
T iaux::iaRectangle< T >::_x = (T)0 |
horizontal position
T iaux::iaRectangle< T >::_y = (T)0 |
vertical position