Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
CRect Class Reference

Rectangle class used for screen rectangles. More...

#include <Overlay.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)
 
CRectoperator= (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
 

Detailed Description

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

Definition at line 71 of file Overlay.h.

Constructor & Destructor Documentation

CRect::CRect ( )

Definition at line 75 of file Overlay.cpp.

CRect::CRect ( const CPos pos)

Definition at line 80 of file Overlay.cpp.

CRect::CRect ( const CSize size)

Definition at line 85 of file Overlay.cpp.

CRect::CRect ( const CPos upperleft,
const CPos bottomright 
)

Definition at line 90 of file Overlay.cpp.

CRect::CRect ( const CPos pos,
const CSize size 
)

Definition at line 95 of file Overlay.cpp.

CRect::CRect ( const float  l,
const float  t,
const float  r,
const float  b 
)

Definition at line 100 of file Overlay.cpp.

Member Function Documentation

CPos CRect::BottomLeft ( ) const

Get Position equivalent to bottom/left corner.

Definition at line 257 of file Overlay.cpp.

CPos CRect::BottomRight ( ) const

Get Position equivalent to bottom/right corner.

Definition at line 262 of file Overlay.cpp.

CPos CRect::CenterPoint ( ) const

Get Position equivalent to the center of the rectangle.

Definition at line 267 of file Overlay.cpp.

float CRect::GetHeight ( ) const
Returns
Height of Rectangle

Definition at line 237 of file Overlay.cpp.

CSize CRect::GetSize ( ) const

Get Size.

Definition at line 242 of file Overlay.cpp.

float CRect::GetWidth ( ) const
Returns
Width of Rectangle

Definition at line 232 of file Overlay.cpp.

bool CRect::operator!= ( const CRect a) const

Definition at line 125 of file Overlay.cpp.

CRect CRect::operator+ ( void  ) const

Definition at line 137 of file Overlay.cpp.

CRect CRect::operator+ ( const CRect a) const

Definition at line 143 of file Overlay.cpp.

CRect CRect::operator+ ( const CPos a) const

Definition at line 149 of file Overlay.cpp.

CRect CRect::operator+ ( const CSize a) const

Definition at line 155 of file Overlay.cpp.

void CRect::operator+= ( const CRect a)

Definition at line 179 of file Overlay.cpp.

void CRect::operator+= ( const CPos a)

Definition at line 188 of file Overlay.cpp.

void CRect::operator+= ( const CSize a)

Definition at line 197 of file Overlay.cpp.

CRect CRect::operator- ( void  ) const

Definition at line 131 of file Overlay.cpp.

CRect CRect::operator- ( const CRect a) const

Definition at line 161 of file Overlay.cpp.

CRect CRect::operator- ( const CPos a) const

Definition at line 167 of file Overlay.cpp.

CRect CRect::operator- ( const CSize a) const

Definition at line 173 of file Overlay.cpp.

void CRect::operator-= ( const CRect a)

Definition at line 206 of file Overlay.cpp.

void CRect::operator-= ( const CPos a)

Definition at line 215 of file Overlay.cpp.

void CRect::operator-= ( const CSize a)

Definition at line 224 of file Overlay.cpp.

CRect & CRect::operator= ( const CRect a)

Definition at line 106 of file Overlay.cpp.

bool CRect::operator== ( const CRect a) const

Definition at line 116 of file Overlay.cpp.

bool CRect::PointInside ( const CPos point) const

Evalutates if point is within the rectangle.

Parameters
pointCPos representing point
Returns
true if inside.

Definition at line 272 of file Overlay.cpp.

CRect CRect::Scale ( float  x,
float  y 
) const

Definition at line 280 of file Overlay.cpp.

CPos CRect::TopLeft ( ) const

Get Position equivalent to top/left corner.

Definition at line 247 of file Overlay.cpp.

CPos CRect::TopRight ( ) const

Get Position equivalent to top/right corner.

Definition at line 252 of file Overlay.cpp.

Member Data Documentation

float CRect::bottom

Definition at line 159 of file Overlay.h.

float CRect::left

Returning CPos representing each corner.

Dimensions

Definition at line 159 of file Overlay.h.

float CRect::right

Definition at line 159 of file Overlay.h.

float CRect::top

Definition at line 159 of file Overlay.h.


The documentation for this class was generated from the following files: