oaPoint Class Reference


Public Methods

 oaPoint ()
 oaPoint (oaCoord xValIn, oaCoord yValIn)
 oaPoint (const oaPoint &point, const oaTransform &xform)
oaCoordx ()
oaCoordy ()
oaCoord x () const
oaCoord y () const
void set (oaCoord x, oaCoord y)
void transform (const oaTransform &xform, oaPoint &result) const
void transform (const oaTransform &xform)
void transform (oaDouble scale, oaDouble angle, oaPoint &result) const
void transform (oaDouble scale, oaDouble angle)
oaDouble distanceFrom2 (const oaPoint &point) const
oaPoint & operator+= (const oaPoint &pt)
oaPoint & operator-= (const oaPoint &pt)
oaPoint operator- () const
oaPoint operator- (const oaPoint &pt) const
oaPoint operator+ (const oaPoint &pt) const
oaBoolean operator== (const oaPoint &pt) const
oaBoolean operator!= (const oaPoint &pt) const

Friends

class oaChecker< oaPoint >

Detailed Description

The oaPoint class specifies a location in a two-dimensional grid with 32-bit integer coordinates. It is used to specify locations and extents for all classes derived from oaFig. An oaPoint is a utility object that is always constructed and destroyed by application code. It can be used for purposes unrelated to OA databases.

A sequence of oaPoints is often specified with the oaPointArray class.


Constructor & Destructor Documentation

oaPoint oaPoint::oaPoint   [inline]
 

This function constructs an uninitialized oaPoint object. Accessing the coordinates at this point has indeterminate results.

oaPoint oaPoint::oaPoint oaCoord    xValIn,
oaCoord    yValIn
[inline]
 

This function constructs an oaPoint object containing the specified X,Y coordinates.

Parameters:
xValIn The x value of the point coordinate
yValIn The y value of the point coordinate

oaPoint oaPoint::oaPoint const oaPoint &    point,
const oaTransform &    xform
[inline]
 

This function constructs an oaPoint object that is a transformed copy of the specified point.

Parameters:
point The point to transform
xform The transform value


Member Function Documentation

oaDouble oaPoint::distanceFrom2 const oaPoint &    point const
 

This function returns the square of the distance from this point to the specified point.

Parameters:
point The reference point
Returns:
The square of the distance from this point to the specified point

oaBoolean oaPoint::operator!= const oaPoint &    pt const [inline]
 

This operator compares this oaPoint with the specified oaPoint pt, and returns true if the points are not equal.

oaPoint oaPoint::operator+ const oaPoint &    pt const [inline]
 

This operator increments this point by the specified oaPoint pt and returns a new point with the result.

oaPoint & oaPoint::operator+= const oaPoint &    pt [inline]
 

This operator increments the point by the specified value.

Parameters:
pt The reference point
Returns:
The incremented value

oaPoint oaPoint::operator- const oaPoint &    pt const [inline]
 

This operator decrements this oaPoint by the specified oaPoint pt, and returns a new point with the result.

oaPoint oaPoint::operator-   const [inline]
 

This operator returns the negative of this oaPoint.

oaPoint & oaPoint::operator-= const oaPoint &    pt [inline]
 

This operator decrements the point by the specified value.

Parameters:
pt The reference point
Returns:
The decremented value

oaBoolean oaPoint::operator== const oaPoint &    pt const [inline]
 

This operator compares this oaPoint with the specified oaPoint pt, and returns true if the specified points are equal.

void oaPoint::set oaCoord    x,
oaCoord    y
[inline]
 

This function sets both coordinates of the point at once.

Parameters:
x x-coordinate
y y-coordinate

void oaPoint::transform oaDouble    scale,
oaDouble    angle
[inline]
 

This function transforms this point by the specified scale factor and rotation angle. The point is rotated about the origin.

void oaPoint::transform oaDouble    scale,
oaDouble    angle,
oaPoint &    result
const
 

This function transforms this point by the specified scale factor and rotation angle. The point is rotated about the origin. The result is stored in 'result', which can be the same point.

void oaPoint::transform const oaTransform &    xform [inline]
 

This function transforms a point by the specified transform value and replaces the original point with the result.

Parameters:
xform The transform value

void oaPoint::transform const oaTransform &    xform,
oaPoint &    result
const
 

This function transforms this point with the specified transform. The result is stored in result, which can be the same point.

Parameters:
xform The transform value
result The resulting transformation value
Returns:
The transformation value

oaInt4 oaPoint::x   const [inline]
 

This function returns the X value of this point.

oaInt4 & oaPoint::x   [inline]
 

This function returns the reference of the X value of this point.

oaInt4 oaPoint::y   const [inline]
 

This function returns the Y value of this point.

oaInt4 & oaPoint::y   [inline]
 

This function returns the reference of the Y value of this point.


Friends And Related Function Documentation

friend class oaChecker< oaPoint > [friend]
 


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

Return to top of page