QwtPolarPoint Class Reference

A point in polar coordinates. More...

#include <qwt_polar_point.h>

List of all members.

Public Member Functions

 QwtPolarPoint ()
 QwtPolarPoint (double azimuth, double radius)
 QwtPolarPoint (const QwtPolarPoint &)
 QwtPolarPoint (const QwtDoublePoint &)
void setPoint (const QwtDoublePoint &)
QwtDoublePoint toPoint () const
bool isValid () const
bool isNull () const
double radius () const
double azimuth () const
double & rRadius ()
double & rAzimuth ()
void setRadius (double)
void setAzimuth (double)
bool operator== (const QwtPolarPoint &) const
bool operator!= (const QwtPolarPoint &) const
QwtPolarPoint normalized () const


Detailed Description

A point in polar coordinates.

In polar coordinates a point is determined by an angle and a distance. See http://en.wikipedia.org/wiki/Polar_coordinate_system


Constructor & Destructor Documentation

QwtPolarPoint::QwtPolarPoint (  )  [inline]

Constructs a null point, with a radius and azimuth set to 0.0.

See also:
QwtDoublePoint::isNull

QwtPolarPoint::QwtPolarPoint ( double  azimuth,
double  radius 
) [inline]

Constructs a point with coordinates specified by radius and azimuth.

Parameters:
azimuth Azimuth
radius Radius

QwtPolarPoint::QwtPolarPoint ( const QwtPolarPoint other  )  [inline]

Constructs a point using the values of the point specified.

Parameters:
other Other point

QwtPolarPoint::QwtPolarPoint ( const QwtDoublePoint &  p  ) 

Convert and assign values from a point in Cartesian coordinates

Parameters:
p Point in Cartesian coordinates
See also:
setPoint(), toPoint()


Member Function Documentation

double QwtPolarPoint::azimuth (  )  const [inline]

Returns the azimuth.

bool QwtPolarPoint::isNull (  )  const [inline]

Returns true if radius() >= 0.0.

bool QwtPolarPoint::isValid (  )  const [inline]

Returns true if radius() >= 0.0.

QwtPolarPoint QwtPolarPoint::normalized (  )  const

Normalize radius and azimuth

When the radius is < 0.0 it is set to 0.0. The azimuth is a value >= 0.0 and < 2 * M_PI.

bool QwtPolarPoint::operator!= ( const QwtPolarPoint other  )  const

Returns true if point1 is not equal to point2; otherwise returns false.

Two points are equal to each other if radius and azimuth-coordinates are the same. Points are not equal, when the azimuth differs, but other.azimuth() == azimuth() % (2 * PI).

See also:
normalized()

bool QwtPolarPoint::operator== ( const QwtPolarPoint other  )  const

Returns true if point1 is equal to point2; otherwise returns false.

Two points are equal to each other if radius and azimuth-coordinates are the same. Points are not equal, when the azimuth differs, but other.azimuth() == azimuth() % (2 * PI).

See also:
normalized()

double QwtPolarPoint::radius (  )  const [inline]

Returns the radius.

double & QwtPolarPoint::rAzimuth (  )  [inline]

Returns the azimuth.

double & QwtPolarPoint::rRadius (  )  [inline]

Returns the radius.

void QwtPolarPoint::setAzimuth ( double  azimuth  )  [inline]

Sets the atimuth to atimuth.

void QwtPolarPoint::setPoint ( const QwtDoublePoint &  p  ) 

Convert and assign values from a point in Cartesian coordinates

Parameters:
p Point in Cartesian coordinates

void QwtPolarPoint::setRadius ( double  radius  )  [inline]

Sets the radius to radius.

QwtDoublePoint QwtPolarPoint::toPoint (  )  const

Convert and return values in Cartesian coordinates

Note:
Invalid or null points will be returned as QwtDoublePoint(0.0, 0.0)
See also:
isValid(), isNull()


Generated on Mon May 25 16:01:32 2009 for Qwt Polar User's Guide by  doxygen 1.5.8