Pyrogenesis
trunk
|
Rectangle class used for screen rectangles. More...
#include <Shapes.h>
Public Member Functions | |
CRect () | |
CRect (const CPos &pos) | |
CRect (const CSize &size) | |
CRect (const CPos &upperleft, const CPos &bottomright) | |
CRect (const CPos &pos, const CSize &size) | |
CRect (const float l, const float t, const float r, const float b) | |
CRect & | operator= (const CRect &a) |
bool | operator== (const CRect &a) const |
bool | operator!= (const CRect &a) const |
CRect | operator- (void) const |
CRect | operator+ (void) const |
CRect | operator+ (const CRect &a) const |
CRect | operator+ (const CPos &a) const |
CRect | operator+ (const CSize &a) const |
CRect | operator- (const CRect &a) const |
CRect | operator- (const CPos &a) const |
CRect | operator- (const CSize &a) const |
void | operator+= (const CRect &a) |
void | operator+= (const CPos &a) |
void | operator+= (const CSize &a) |
void | operator-= (const CRect &a) |
void | operator-= (const CPos &a) |
void | operator-= (const CSize &a) |
float | GetWidth () const |
float | GetHeight () const |
CSize | GetSize () const |
Get Size. More... | |
CPos | TopLeft () const |
Get Position equivalent to top/left corner. More... | |
CPos | TopRight () const |
Get Position equivalent to top/right corner. More... | |
CPos | BottomLeft () const |
Get Position equivalent to bottom/left corner. More... | |
CPos | BottomRight () const |
Get Position equivalent to bottom/right corner. More... | |
CPos | CenterPoint () const |
Get Position equivalent to the center of the rectangle. More... | |
bool | PointInside (const CPos &point) const |
Evalutates if point is within the rectangle. More... | |
CRect | Scale (float x, float y) const |
Public Attributes | |
float | left |
Returning CPos 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.
Changed to floats 2004-08-31 /GL
CRect::CRect | ( | ) |
CRect::CRect | ( | const CPos & | pos | ) |
CRect::CRect | ( | const CSize & | size | ) |
CRect::CRect | ( | const float | l, |
const float | t, | ||
const float | r, | ||
const float | b | ||
) |
CPos CRect::BottomLeft | ( | ) | const |
Get Position equivalent to bottom/left corner.
CPos CRect::BottomRight | ( | ) | const |
Get Position equivalent to bottom/right corner.
CPos CRect::CenterPoint | ( | ) | const |
Get Position equivalent to the center of the rectangle.
float CRect::GetHeight | ( | ) | const |
CSize CRect::GetSize | ( | ) | const |
Get Size.
float CRect::GetWidth | ( | ) | const |
bool CRect::operator!= | ( | const CRect & | a | ) | const |
CRect CRect::operator+ | ( | void | ) | const |
void CRect::operator+= | ( | const CRect & | a | ) |
void CRect::operator+= | ( | const CPos & | a | ) |
void CRect::operator+= | ( | const CSize & | a | ) |
CRect CRect::operator- | ( | void | ) | const |
void CRect::operator-= | ( | const CRect & | a | ) |
void CRect::operator-= | ( | const CPos & | a | ) |
void CRect::operator-= | ( | const CSize & | a | ) |
bool CRect::operator== | ( | const CRect & | a | ) | const |
bool CRect::PointInside | ( | const CPos & | point | ) | const |
Evalutates if point is within the rectangle.
point | CPos representing point |
CRect CRect::Scale | ( | float | x, |
float | y | ||
) | const |
CPos CRect::TopLeft | ( | ) | const |
Get Position equivalent to top/left corner.
CPos CRect::TopRight | ( | ) | const |
Get Position equivalent to top/right corner.
float CRect::bottom |
float CRect::left |
Returning CPos representing each corner.
Dimensions
float CRect::right |
float CRect::top |