Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Rectangle class used for screen rectangles. More...
#include <Rect.h>
Public Member Functions | |
CRect () | |
CRect (const CVector2D &pos) | |
CRect (const CSize2D &size) | |
CRect (const CVector2D &upperleft, const CVector2D &bottomright) | |
CRect (const CVector2D &pos, const CSize2D &size) | |
CRect (const float l, const float t, const float r, const float b) | |
CRect (const CRect &) | |
CRect & | operator= (const CRect &a) |
bool | operator== (const CRect &a) const |
bool | operator!= (const CRect &a) const |
CRect | operator- () const |
CRect | operator+ () const |
CRect | operator+ (const CRect &a) const |
CRect | operator+ (const CVector2D &a) const |
CRect | operator+ (const CSize2D &a) const |
CRect | operator- (const CRect &a) const |
CRect | operator- (const CVector2D &a) const |
CRect | operator- (const CSize2D &a) const |
void | operator+= (const CRect &a) |
void | operator+= (const CVector2D &a) |
void | operator+= (const CSize2D &a) |
void | operator-= (const CRect &a) |
void | operator-= (const CVector2D &a) |
void | operator-= (const CSize2D &a) |
float | GetWidth () const |
float | GetHeight () const |
CSize2D | GetSize () const |
Get Size. More... | |
CVector2D | TopLeft () const |
Get Position equivalent to top/left corner. More... | |
CVector2D | TopRight () const |
Get Position equivalent to top/right corner. More... | |
CVector2D | BottomLeft () const |
Get Position equivalent to bottom/left corner. More... | |
CVector2D | BottomRight () const |
Get Position equivalent to bottom/right corner. More... | |
CVector2D | CenterPoint () const |
Get Position equivalent to the center of the rectangle. More... | |
bool | PointInside (const CVector2D &point) const |
Evalutates if point is within the rectangle. More... | |
CRect | Scale (float x, float y) const |
Public Attributes | |
float | left |
Returning CVector2D representing each corner. More... | |
float | top |
float | right |
float | bottom |
Rectangle class used for screen rectangles.
It's very similar to the MS CRect, but with FLOATS because it's meant to be used with OpenGL which takes float values.
CRect::CRect | ( | ) |
CRect::CRect | ( | const CVector2D & | pos | ) |
CRect::CRect | ( | const CSize2D & | size | ) |
CRect::CRect | ( | const float | l, |
const float | t, | ||
const float | r, | ||
const float | b | ||
) |
CRect::CRect | ( | const CRect & | rect | ) |
CVector2D CRect::BottomLeft | ( | ) | const |
Get Position equivalent to bottom/left corner.
CVector2D CRect::BottomRight | ( | ) | const |
Get Position equivalent to bottom/right corner.
CVector2D CRect::CenterPoint | ( | ) | const |
Get Position equivalent to the center of the rectangle.
float CRect::GetHeight | ( | ) | const |
CSize2D CRect::GetSize | ( | ) | const |
Get Size.
float CRect::GetWidth | ( | ) | const |
bool CRect::operator!= | ( | const CRect & | a | ) | const |
CRect CRect::operator+ | ( | ) | const |
void CRect::operator+= | ( | const CRect & | a | ) |
void CRect::operator+= | ( | const CSize2D & | a | ) |
void CRect::operator+= | ( | const CVector2D & | a | ) |
CRect CRect::operator- | ( | ) | const |
void CRect::operator-= | ( | const CRect & | a | ) |
void CRect::operator-= | ( | const CSize2D & | a | ) |
void CRect::operator-= | ( | const CVector2D & | a | ) |
bool CRect::operator== | ( | const CRect & | a | ) | const |
bool CRect::PointInside | ( | const CVector2D & | point | ) | const |
Evalutates if point is within the rectangle.
point | CVector2D representing point |
CRect CRect::Scale | ( | float | x, |
float | y | ||
) | const |
CVector2D CRect::TopLeft | ( | ) | const |
Get Position equivalent to top/left corner.
CVector2D CRect::TopRight | ( | ) | const |
Get Position equivalent to top/right corner.
float CRect::bottom |
float CRect::left |
Returning CVector2D representing each corner.
Dimensions
float CRect::right |
float CRect::top |