Main Page   Hardware Class Hierarchy   Hardware API     Mapping Class Hierarchy  Mapping API 

point Class Reference

Represents a point in space with an x and y integer or fixed point coordinate. More...

#include <point.h>


Public Member Functions

 point (POINT_TYPE, POINT_TYPE, MATH_TYPE m=INT_MATH)
 Constructor for x,y.

 point (const point &)
 copy constructor

 point (MATH_TYPE=INT_MATH)
 default constructor

POINT_TYPE x (void) const
 Retruns X coordinate.

POINT_TYPE y (void) const
 Returns Y coordinate.

void set (POINT_TYPE, POINT_TYPE)
 Sets the points x,y coordinate. No scaling.

void FPset (POINT_TYPE ix, POINT_TYPE iy)
 Will scale values of ix,iy to fixed point if needed.

void set (const point &)
 set a point to another point

MATH_TYPE math (void) const
 Return what kind of math is involved.


Private Attributes

POINT_TYPE _x
POINT_TYPE _y
MATH_TYPE _math

Friends

const point operator- (const point &first, const point &second)
const point operator+ (const point &first, const point &second)


Detailed Description

Represents a point in space with an x and y integer or fixed point coordinate.

The default is integer math if nothing is specified. Serves two functions: 1. Allows easy intialization of fixed point like: point(3,4,FIXED_MATH); 2. Allows libraries that use point with fixed point to ensure that the point provided is a fixed point value where required.


Constructor & Destructor Documentation

point POINT_TYPE  ,
POINT_TYPE  ,
MATH_TYPE  m = INT_MATH
 

Constructor for x,y.

point const point &   ) 
 

copy constructor

point MATH_TYPE  = INT_MATH  ) 
 

default constructor


Member Function Documentation

void FPset POINT_TYPE  ix,
POINT_TYPE  iy
 

Will scale values of ix,iy to fixed point if needed.

MATH_TYPE math void   )  const
 

Return what kind of math is involved.

void set const point &   ) 
 

set a point to another point

void set POINT_TYPE  ,
POINT_TYPE 
 

Sets the points x,y coordinate. No scaling.

POINT_TYPE x void   )  const
 

Retruns X coordinate.

POINT_TYPE y void   )  const
 

Returns Y coordinate.


Friends And Related Function Documentation

const point operator+ const point &  first,
const point &  second
[friend]
 

const point operator- const point &  first,
const point &  second
[friend]
 


Field Documentation

MATH_TYPE _math [private]
 

POINT_TYPE _x [private]
 

POINT_TYPE _y [private]
 


Generated on Mon Oct 8 19:32:27 2007 for OOMRM Mapping API by doxygen1.3