Point Class Reference

A point in 2D space. More...

#include <common.h>

List of all members.

Public Member Functions

 Point (int x=0, int y=0)
 Constructor.
Point operator+ (const Point &p)
 Add two points together.
void invert ()
 Reverse the signs on the coordinates.
void setX (int x)
 Set the x-coordinate in this point.
void setY (int y)
 Set the y-coordinate in this point.
int x () const
 Get a coordinate in this point.
int y () const
 Get a coordinate in this point.

Private Attributes

int m_X
int m_Y


Detailed Description

A point in 2D space.

Since many functions in the player require a coordinate or two, this class simplifies passing two different parameters as one, unified class object


Constructor & Destructor Documentation

Point::Point ( int  x = 0,
int  y = 0 
) [inline]

Constructor.

Parameters:
x The x-coordinate
y The y-coordinate


Member Function Documentation

Point Point::operator+ ( const Point p  )  [inline]

Add two points together.

Parameters:
p The second point to add
Returns:
New Point representing the sum of the two

void Point::setX ( int  x  )  [inline]

Set the x-coordinate in this point.

Parameters:
x The coordinate

void Point::setY ( int  y  )  [inline]

Set the y-coordinate in this point.

Parameters:
y The coordinate


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