Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_Point Class Reference

A class for representing a point using floating point coordinates. More...

List of all members.

Public Member Functions

Constructor / Destructor
 CP_Point ()
 Constructor.
 CP_Point (float inHor, float inVer)
 CP_Point (const CP_Point &inFloatPoint)
 ~CP_Point ()
 Destructor.
Comparers
bool operator== (const CP_Point &inPoint) const
bool operator!= (const CP_Point &inPoint) const
bool operator>= (const CP_Point &inPoint) const
bool operator<= (const CP_Point &inPoint) const
bool operator> (const CP_Point &inPoint)
bool operator< (const CP_Point &inPoint)
Getters
float h () const
float v () const
Negative
CP_Point operator- () const
Math
CP_Pointoperator+= (const CP_Point &inPoint)
CP_Pointoperator-= (const CP_Point &inPoint)
CP_Pointoperator *= (const CP_Point &inPoint)
CP_Pointoperator/= (const CP_Point &inPoint)
CP_Pointoperator+= (const CP_Size &inSize)
CP_Pointoperator-= (const CP_Size &inSize)
CP_Point operator+ (const CP_Point &inPoint) const
CP_Point operator- (const CP_Point &inPoint) const
CP_Point operator * (const CP_Point &inPoint) const
CP_Point operator/ (const CP_Point &inPoint) const
CP_Pointoperator= (const CP_Point &)
Movement
void Offset (const float horAmt, const float verAmt)
Selectors
float operator[] (CP_VHSelector sel)
const float operator[] (CP_VHSelector sel) const
Setters
void Set (const float inHor, const float inVer)
void Set (const CP_Point &inPoint)
void SetH (const float inHor)
void SetV (const float inVer)
Utility
void MakeEmpty ()
Point
 CP_Point (const Point &inPoint)
 operator Point ()
 operator const Point () const
 operator Point * ()
 operator const Point * () const
CP_Pointoperator= (Point inPoint)

Protected Attributes

float fHorizontalCoord
float fVerticalCoord


Detailed Description

This class is used to express all coordinates in CPLAT.


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_Point::CP_Point  ) 
 

Constructor. This creates a point with all coordinates at 0.

CP_Point::CP_Point float  inHor,
float  inVerticalCoordticalCoord
 

Constructor. This constructs the point from the passed in floating point horizontal and fVerticalCoordertical coordinates.

Parameters:
inHor horizontal coordinate as a floating point.
inVerticalCoord vertical coordinate as a floating point.

CP_Point::CP_Point const CP_Point inFloatPoint  ) 
 

Copy constructor.

Parameters:
inFloatPoint CP_Point to copy coordinates from.

CP_Point::~CP_Point  ) 
 

Destructor.

CP_Point::CP_Point const Point &  inPoint  ) 
 

Constructor. This constructor assigns the coordinates from the passed in MacOS Point structure.

Parameters:
inPoint MacOS Point.


Member Function Documentation

bool CP_Point::operator== const CP_Point inPoint  )  const
 

Comparison operator. Compares the coordinates of this class with that of the passed in point.

Parameters:
inPoint Point to compare the coordinates against.
Returns:
bool const True if the passed in point matches the coordinates of this point.

bool CP_Point::operator!= const CP_Point inPoint  )  const
 

Inequality operator. Compares the coordinates of this class with that of the passed in point and returns true if they are not equal.

Parameters:
inPoint Point to compare the coordinates against.
Returns:
bool const True if the passed in point does not match the coordinates of this point.

bool CP_Point::operator>= const CP_Point inPoint  )  const
 

Greater than or equal to operator.

Parameters:
inPoint Point to compare the coordinates against.
Returns:
bool const True if either coordinate is greater than or equal to this points coordinates.

bool CP_Point::operator<= const CP_Point inPoint  )  const
 

Less than or equal to operator.

Parameters:
inPoint Point to compare the coordinates against.
Returns:
bool const True if either coordinate is less than or equal to this points coordinates.

bool CP_Point::operator> const CP_Point inPoint  ) 
 

Greater than operator.

Parameters:
inPoint Point to compare the coordinates against.
Returns:
bool True if either coordinate is greater than this points coordinates.

bool CP_Point::operator< const CP_Point inPoint  ) 
 

Less than operator.

Parameters:
inPoint Point to compare the coordinates against.
Returns:
bool True if either coordinate is less than this points coordinates.

float CP_Point::h  )  const
 

Return the horizontal or x coordinate.

Returns:
float const Horizontal coordinate

float CP_Point::v  )  const
 

Return the vertical or y coordinate.

Returns:
float const Vertical coordinate

CP_Point CP_Point::operator-  )  const
 

Negation operator. Returns a CP_point containing the negative coordinates of this point.

Returns:
CP_Point const Returns a new CP_Point with negative coordinates.

CP_Point & CP_Point::operator+= const CP_Point inPoint  ) 
 

Plus equals operator. Adds the coordinates of the passed in point to those of this object.

Parameters:
inPoint Point to add coordinates from.
Returns:
CP_Point& Returns a reference to this object.

CP_Point & CP_Point::operator-= const CP_Point inPoint  ) 
 

Minux equals operator. Subtracts the coordinates of the passed in point to those of this object.

Parameters:
inPoint Point to subtract coordinates from.
Returns:
CP_Point& Returns a reference to this object.

CP_Point & CP_Point::operator *= const CP_Point inPoint  ) 
 

Times equals operator. Multiples the coordinates of the passed in point to those of this object.

Parameters:
inPoint CP_Point to multiply coordinates with.
Returns:
CP_Point& Returns a reference to this object.

CP_Point & CP_Point::operator/= const CP_Point inPoint  ) 
 

Divide equals operator. Divides the coordinates of the passed in point to those of this object.

Parameters:
inPoint CP_Point to divide coordinates with.
Returns:
CP_Point& Returns a reference to this object.

CP_Point & CP_Point::operator+= const CP_Size inSize  ) 
 

Plus equals operator. Adds the coordinates of the passed in size to those of this object.

Parameters:
inSize CP_Size to add dimensions from.
Returns:
CP_Point& Returns a reference to this object.

CP_Point & CP_Point::operator-= const CP_Size inSize  ) 
 

Minus equals operator. Subtracts the coordinates of the passed in size to those of this object.

Parameters:
inSize CP_Size to subtract coordinates from.
Returns:
CP_Point& Returns a reference to this object.

CP_Point CP_Point::operator+ const CP_Point inPoint  )  const
 

Addition operator. Adds the coordinates of the passed in point to those of this object.

Parameters:
inPoint CP_Point to add coordinates with.
Returns:
CP_Point const Returns a new CP_Point object.

CP_Point CP_Point::operator- const CP_Point inPoint  )  const
 

Subtraction operator. Subtracts the coordinates of the passed in point to those of this object.

Parameters:
inPoint CP_Point to subtract coordinates from.
Returns:
CP_Point const Returns a new CP_Point object.

CP_Point CP_Point::operator * const CP_Point inPoint  )  const
 

Multiplication operator. Multiples the coordinates of the passed in point to those of this object.

Parameters:
inPoint CP_Point to multiple coordinates with.
Returns:
CP_Point const Returns a new CP_Point object.

CP_Point CP_Point::operator/ const CP_Point inPoint  )  const
 

Division operator. Divides the coordinates of the passed in point to those of this object.

Parameters:
inPoint CP_Point to divide coordinates with.
Returns:
CP_Point const Returns a new CP_Point object.

CP_Point & CP_Point::operator= const CP_Point inPoint  ) 
 

Equality operator. Assigns the values to this point from the passed in point.

Parameters:
inPoint CP_Point to assign coordinates from.
Returns:
CP_Point& Returns a reference to this object.

void CP_Point::Offset const float  horAmt,
const float  verAmt
 

Offset the point by the passed in amounts.

Parameters:
inHorAmt Horizontal amount to offset point by.
inVerAmt Vertical amount to offset point by.
Returns:
void

float CP_Point::operator[] CP_VHSelector  selector  ) 
 

Return the coordinate based on the CP_VHSelector we pass in.

Parameters:
inSelector Selector to determine if we return the horizontal or vertical coordinate.
Returns:
float The returned coordinate.

const float CP_Point::operator[] CP_VHSelector  selector  )  const
 

Return the coordinate based on the CP_VHSelector we pass in.

Parameters:
inSelector Selector to determine if we return the horizontal or vertical coordinate.
Returns:
float const The returned coordinate.

void CP_Point::Set const float  inHor,
const float  inVer
 

Sets the coordinates from the passed in parameters.

Parameters:
inHor Horizontal coordinate as a floating point.
inVer Vertical coordinate as a floating point.
Returns:
void

void CP_Point::Set const CP_Point inPoint  ) 
 

Sets the coordinates from the passed in CP_Point.

Parameters:
inPoint CP_Point to copy coordinates from.
Returns:
void

void CP_Point::SetH const float  inHor  ) 
 

void CP_Point::SetV const float  inVer  ) 
 

void CP_Point::MakeEmpty  ) 
 

Makes this point empty by setting the coordinates to 0.

Returns:
void

CP_Point::operator Point  ) 
 

operator Point to confVerticalCoordert this objects coordinates to SInt16s and return as a MacOS Point.

Returns:
Point MacOS Point.

CP_Point::operator const Point  )  const
 

operator Point to confVerticalCoordert this objects coordinates to SInt16s and return as a MacOS Point. Const fVerticalCoordersion.

Returns:
Point const MacOS Point.

CP_Point::operator Point *  ) 
 

operator Point to confVerticalCoordert this objects coordinates to SInt16s and return as a MacOS Point.

Returns:
Point MacOS Point.

CP_Point::operator const Point *  )  const
 

operator Point to confVerticalCoordert this objects coordinates to SInt16s and return as a MacOS Point. Const fVerticalCoordersion.

Returns:
Point * const MacOS Point.

CP_Point & CP_Point::operator= Point  inPoint  ) 
 

Assignment operator. Assigns the coordines from the passed in MacOS Point.

Parameters:
inPoint MacOS Point to assign the coordinates from.
Returns:
CP_Point& Returns a reference to ourselfVerticalCoordes.


Member Data Documentation

float CP_Point::fHorizontalCoord [protected]
 

float CP_Point::fVerticalCoord [protected]
 

Horizontal coordinate.


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:21:56 2005 for CPLAT_MacOS by  doxygen 1.4.0