OpenGUI::IRect Class Reference
[Types]

#include <OpenGUI_Types.h>

List of all members.


Detailed Description

IRects are rects built from int values. Internally they are comprised of two IVector2's.


Public Member Functions

 IRect ()
 constructor
 IRect (const IVector2 &min, const IVector2 max)
 constructor
 IRect (const int &left, const int &top, const int &right, const int &bottom)
 constructor
const IVector2getPosition () const
 returns top,left
IVector2 getSize () const
 return size as IVector2
int getWidth () const
 return width
int getHeight () const
 return height
int getArea () const
 return total area
void setWidth (const int &newWidth)
 sets new width
void setHeight (const int &newHeight)
 sets new height
void setSize (const IVector2 &newSize)
 sets new size
void setPosition (const IVector2 &newPosition)
 sets new position
void offset (const IVector2 &offsetVector)
 offset position by given IVector2
bool inside (IVector2 point) const
 return true if given point is inside this IRect
std::string toStr () const
 Return a string representation of this value.
bool operator== (const IRect &right) const
 comparison operator
bool operator!= (const IRect &right) const
 comparison operator

Public Attributes

IVector2 min
 direct access to upper left point
IVector2 max
 direct access to lower right point


Constructor & Destructor Documentation

OpenGUI::IRect::IRect (  )  [inline]

constructor

OpenGUI::IRect::IRect ( const IVector2 min,
const IVector2  max 
) [inline]

constructor

OpenGUI::IRect::IRect ( const int &  left,
const int &  top,
const int &  right,
const int &  bottom 
) [inline]

constructor


Member Function Documentation

int OpenGUI::IRect::getArea (  )  const [inline]

return total area

int OpenGUI::IRect::getHeight (  )  const [inline]

return height

const IVector2& OpenGUI::IRect::getPosition (  )  const [inline]

returns top,left

IVector2 OpenGUI::IRect::getSize (  )  const [inline]

return size as IVector2

int OpenGUI::IRect::getWidth (  )  const [inline]

return width

bool OpenGUI::IRect::inside ( IVector2  point  )  const [inline]

return true if given point is inside this IRect

void OpenGUI::IRect::offset ( const IVector2 offsetVector  )  [inline]

offset position by given IVector2

bool OpenGUI::IRect::operator!= ( const IRect right  )  const [inline]

comparison operator

bool OpenGUI::IRect::operator== ( const IRect right  )  const [inline]

comparison operator

void OpenGUI::IRect::setHeight ( const int &  newHeight  )  [inline]

sets new height

void OpenGUI::IRect::setPosition ( const IVector2 newPosition  )  [inline]

sets new position

void OpenGUI::IRect::setSize ( const IVector2 newSize  )  [inline]

sets new size

void OpenGUI::IRect::setWidth ( const int &  newWidth  )  [inline]

sets new width

std::string OpenGUI::IRect::toStr (  )  const

Return a string representation of this value.


Member Data Documentation

IVector2 OpenGUI::IRect::max

direct access to lower right point

IVector2 OpenGUI::IRect::min

direct access to upper left point


The documentation for this class was generated from the following files:
Copyright © 2006 OpenGUI | OpenGUI.SF.net
Generated: Fri Jan 5 23:05:26 2007