QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
QwtPointPolar类 参考

A point in polar coordinates 更多...

#include <qwt_point_polar.h>

Public 成员函数

 QwtPointPolar ()
 Default constructor - constructs a null point with radius and azimuth set to 0.0
 
 QwtPointPolar (double azimuth, double radius)
 Constructs a point with coordinates specified by radius and azimuth
 
 QwtPointPolar (const QPointF &)
 Convert and assign values from a point in Cartesian coordinates
 
void setPoint (const QPointF &)
 Convert and assign values from a point in Cartesian coordinates
 
QPointF toPoint () const
 Convert and return values in Cartesian coordinates
 
bool isValid () const noexcept
 Return true if radius() >= 0.0
 
bool isNull () const noexcept
 Return true if radius() == 0.0
 
double radius () const noexcept
 Return the radius
 
double azimuth () const noexcept
 Return the azimuth
 
double & rRadius () noexcept
 Return a reference to the radius
 
double & rAzimuth () noexcept
 Return a reference to the azimuth
 
void setRadius (double) noexcept
 Set the radius to radius
 
void setAzimuth (double) noexcept
 Set the azimuth to azimuth
 
bool operator== (const QwtPointPolar &) const
 Compare 2 points
 
bool operator!= (const QwtPointPolar &) const
 Compare 2 points
 
QwtPointPolar normalized () const
 Normalize radius and azimuth
 

详细描述

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

构造及析构函数说明

◆ QwtPointPolar() [1/3]

QwtPointPolar::QwtPointPolar ( )
inline

Default constructor - constructs a null point with radius and azimuth set to 0.0

参见
QPointF::isNull()

◆ QwtPointPolar() [2/3]

QwtPointPolar::QwtPointPolar ( double  azimuth,
double  radius 
)
inline

Constructs a point with coordinates specified by radius and azimuth

参数
azimuthAzimuth (angle)
radiusRadius (distance)

◆ QwtPointPolar() [3/3]

QwtPointPolar::QwtPointPolar ( const QPointF &  p)

Convert and assign values from a point in Cartesian coordinates

参数
[in]pPoint in Cartesian coordinates
参见
setPoint(), toPoint()

成员函数说明

◆ normalized()

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.

返回
Normalized point

◆ operator!=()

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).

返回
True if the point is not equal to other; otherwise return false.
参见
normalized()

◆ operator==()

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).

返回
True if the point is equal to other; otherwise return false.
参见
normalized()

◆ setPoint()

void QwtPointPolar::setPoint ( const QPointF &  p)

Convert and assign values from a point in Cartesian coordinates

参数
[in]pPoint in Cartesian coordinates
参见
QwtPointPolar(QPointF), toPoint()

◆ toPoint()

QPointF QwtPointPolar::toPoint ( ) const

Convert and return values in Cartesian coordinates

返回
Converted point in Cartesian coordinates
注解
Invalid or null points will be returned as QPointF(0.0, 0.0)
参见
isValid(), isNull()

该类的文档由以下文件生成: