Rect Class Reference

A rectangle in 2D space. More...

#include <common.h>

List of all members.

Public Member Functions

 Rect ()
 Default constructor.
 Rect (const Point &p, int w, int h)
 Constructor taking parameters.
Point getPoint () const
 Get the point representing the top left corner.
void getGeometry (Point &p, int &w, int &h) const
 Get the geometry of the rectangle.
int getWidth () const
 Get the dimensions of the rectangle.
int getHeight () const
 Get the dimensions of the rectangle.

Private Attributes

Point m_Corner
int m_Width
int m_Height


Detailed Description

A rectangle in 2D space.

The Rectangle class basically consists of a Point object, which represents the top-left corner of the rectangle, along with width and height members that define the dimensions of the rectangle


Constructor & Destructor Documentation

Rect::Rect ( const Point p,
int  w,
int  h 
) [inline]

Constructor taking parameters.

Parameters:
p The top-left corner
w The width
h The height


Member Function Documentation

Point Rect::getPoint (  )  const [inline]

Get the point representing the top left corner.

Returns:
The top-left corner

void Rect::getGeometry ( Point p,
int &  w,
int &  h 
) const [inline]

Get the geometry of the rectangle.

Parameters:
p The top-left corner point
w The width
h The height


The documentation for this class was generated from the following file:
Generated on Fri Feb 22 22:29:23 2008 for Phoenix Wright Case Player API by  doxygen 1.5.3