A point in polar coordinates. More...
#include <qwt_point_polar.h>
Public Member Functions | |
double | azimuth () const |
Returns the azimuth. More... | |
bool | isNull () const |
Returns true if radius() >= 0.0. More... | |
bool | isValid () const |
Returns true if radius() >= 0.0. More... | |
QwtPointPolar | normalized () const |
bool | operator!= (const QwtPointPolar &) const |
bool | operator== (const QwtPointPolar &) const |
Compare 2 points. More... | |
QwtPointPolar () | |
QwtPointPolar (double azimuth, double radius) | |
QwtPointPolar (const QwtPointPolar &) | |
QwtPointPolar (const QPointF &) | |
double | radius () const |
Returns the radius. More... | |
double & | rAzimuth () |
Returns the azimuth. More... | |
double & | rRadius () |
Returns the radius. More... | |
void | setAzimuth (double) |
Sets the atimuth to atimuth. More... | |
void | setPoint (const QPointF &) |
void | setRadius (double) |
Sets the radius to radius. More... | |
QPointF | toPoint () const |
Private Attributes | |
double | d_azimuth |
double | d_radius |
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
Definition at line 28 of file qwt_point_polar.h.
|
inline |
Constructs a null point, with a radius and azimuth set to 0.0.
Definition at line 65 of file qwt_point_polar.h.
|
inline |
Constructs a point with coordinates specified by radius and azimuth.
azimuth | Azimuth |
radius | Radius |
Definition at line 77 of file qwt_point_polar.h.
|
inline |
Constructs a point using the values of the point specified.
other | Other point |
Definition at line 87 of file qwt_point_polar.h.
QwtPointPolar::QwtPointPolar | ( | const QPointF & | p | ) |
Convert and assign values from a point in Cartesian coordinates
p | Point in Cartesian coordinates |
Definition at line 22 of file qwt_point_polar.cpp.
|
inline |
Returns the azimuth.
Definition at line 112 of file qwt_point_polar.h.
|
inline |
Returns true if radius() >= 0.0.
Definition at line 100 of file qwt_point_polar.h.
|
inline |
Returns true if radius() >= 0.0.
Definition at line 94 of file qwt_point_polar.h.
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.
Definition at line 96 of file qwt_point_polar.cpp.
bool QwtPointPolar::operator!= | ( | const QwtPointPolar & | other | ) | const |
Compare 2 points
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).
Definition at line 83 of file qwt_point_polar.cpp.
bool QwtPointPolar::operator== | ( | const QwtPointPolar & | other | ) | const |
Compare 2 points.
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).
Definition at line 68 of file qwt_point_polar.cpp.
|
inline |
Returns the radius.
Definition at line 106 of file qwt_point_polar.h.
|
inline |
Returns the azimuth.
Definition at line 124 of file qwt_point_polar.h.
|
inline |
Returns the radius.
Definition at line 118 of file qwt_point_polar.h.
|
inline |
Sets the atimuth to atimuth.
Definition at line 136 of file qwt_point_polar.h.
void QwtPointPolar::setPoint | ( | const QPointF & | p | ) |
Convert and assign values from a point in Cartesian coordinates
p | Point in Cartesian coordinates |
Definition at line 32 of file qwt_point_polar.cpp.
|
inline |
Sets the radius to radius.
Definition at line 130 of file qwt_point_polar.h.
QPointF QwtPointPolar::toPoint | ( | ) | const |
Convert and return values in Cartesian coordinates
Definition at line 46 of file qwt_point_polar.cpp.
|
private |
Definition at line 57 of file qwt_point_polar.h.
|
private |
Definition at line 58 of file qwt_point_polar.h.