Qwt User's Guide: QwtPointPolar Class Reference

Qwt User's Guide 6.0.1

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions

# QwtPointPolar Class Reference

A point in polar coordinates. More...

`#include <qwt_point_polar.h>`

List of all members.

## Public Member Functions
double | azimuth () const
bool | isNull () const
bool | isValid () const
QwtPointPolar | normalized () const
bool | operator!= (const QwtPointPolar &) const
bool | operator== (const QwtPointPolar &) const
| QwtPointPolar (const QwtPointPolar &)
| QwtPointPolar (const QPointF &)
| QwtPointPolar (double azimuth, double radius)
| QwtPointPolar ()
double | radius () const
double & | rAzimuth ()
double & | rRadius ()
void | setAzimuth (double)
void | setPoint (const QPointF &)
void | setRadius (double)
QPointF | toPoint () 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

QwtPointPolar::QwtPointPolar | ( |  | ) | `[inline]`

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

See also:
  QPointF::isNull

QwtPointPolar::QwtPointPolar | ( | double | azimuth,
|  | double | radius
| ) |  | `[inline]`

Constructs a point with coordinates specified by radius and azimuth.

Parameters:

  azimuth | Azimuth
  radius | Radius

QwtPointPolar::QwtPointPolar | ( | const QwtPointPolar & | other | ) | `[inline]`

Constructs a point using the values of the point specified.

Parameters:

  other | Other point

QwtPointPolar::QwtPointPolar | ( | const QPointF & | 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 QwtPointPolar::azimuth | ( |  | ) | const`[inline]`

Returns the azimuth.

bool QwtPointPolar::isNull | ( |  | ) | const`[inline]`

Returns true if radius() >= 0.0.

bool QwtPointPolar::isValid | ( |  | ) | const`[inline]`

Returns true if radius() >= 0.0.

QwtPointPolar QwtPointPolar::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 QwtPointPolar::operator!= | ( | const QwtPointPolar & | 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 QwtPointPolar::operator== | ( | const QwtPointPolar & | 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 QwtPointPolar::radius | ( |  | ) | const`[inline]`

Returns the radius.

double & QwtPointPolar::rAzimuth | ( |  | ) | `[inline]`

Returns the azimuth.

double & QwtPointPolar::rRadius | ( |  | ) | `[inline]`

Returns the radius.

void QwtPointPolar::setAzimuth | ( | double | azimuth | ) | `[inline]`

Sets the atimuth to atimuth.

void QwtPointPolar::setPoint | ( | const QPointF & | p | ) |

Convert and assign values from a point in Cartesian coordinates

Parameters:

  p | Point in Cartesian coordinates

void QwtPointPolar::setRadius | ( | double | radius | ) | `[inline]`

Sets the radius to radius.

QPointF QwtPointPolar::toPoint | ( |  | ) | const

Convert and return values in Cartesian coordinates

Note:
  Invalid or null points will be returned as QPointF(0.0, 0.0)

See also:
  isValid(), isNull()