version 3.3

VRS::Area Class Reference

2D Area. More...

#include <vrs/area.h>

List of all members.

Public Member Functions

 Area (int x=0, int y=0, int width=0, int height=0)
void setX (int x)
 Sets the x coordinate of the origin of the area.
void setY (int y)
 Sets the y coordinate of the origin of the area.
int getX () const
 Returns the x coordinate of the origin of the area.
int getY () const
 Returns the y coordinate of the origin of the area.
void setWidth (int w)
 Sets the width of the area.
void setHeight (int h)
 Sets the height of the area.
int getWidth () const
 Returns the width of the area.
int getHeight () const
 Returns the height of the area.
bool contains (int x, int y) const
 Returns true if point (x,y) lies with in the area, i.e x in [getX(),getX() + getWidth[ ; y analogous.
bool equalSize (const Area &other) const
 Returns true if this and other area have the same widht and height.
bool operator== (const Area &) const
 Compares the area with another area.
bool operator!= (const Area &) const
 Compares the area with another area, see operator==.
 VRS_SERIALIZABLE_NO_SO_CLASS (Area)


Detailed Description

2D Area.

Constructor & Destructor Documentation

VRS::Area::Area ( int  x = 0,
int  y = 0,
int  width = 0,
int  height = 0 
) [explicit]

Two-dimensional area specified by the origin (x,y) and its extension (width, height).


Member Function Documentation

void VRS::Area::setX ( int  x  )  [inline]

Sets the x coordinate of the origin of the area.

void VRS::Area::setY ( int  y  )  [inline]

Sets the y coordinate of the origin of the area.

int VRS::Area::getX (  )  const [inline]

Returns the x coordinate of the origin of the area.

int VRS::Area::getY (  )  const [inline]

Returns the y coordinate of the origin of the area.

void VRS::Area::setWidth ( int  w  )  [inline]

Sets the width of the area.

void VRS::Area::setHeight ( int  h  )  [inline]

Sets the height of the area.

int VRS::Area::getWidth (  )  const [inline]

Returns the width of the area.

int VRS::Area::getHeight (  )  const [inline]

Returns the height of the area.

bool VRS::Area::contains ( int  x,
int  y 
) const

Returns true if point (x,y) lies with in the area, i.e x in [getX(),getX() + getWidth[ ; y analogous.

bool VRS::Area::equalSize ( const Area other  )  const

Returns true if this and other area have the same widht and height.

bool VRS::Area::operator== ( const Area  )  const

Compares the area with another area.

An area equals another area, if the origin and the extensions are the same.

bool VRS::Area::operator!= ( const Area  )  const

Compares the area with another area, see operator==.

VRS::Area::VRS_SERIALIZABLE_NO_SO_CLASS ( Area   ) 


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

Generated on Fri May 18 06:00:17 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact