Go to the documentation of this file.
11 #ifndef QWT_POINT_POLAR_H
12 #define QWT_POINT_POLAR_H
18 #include <qmetatype.h>
35 void setPoint(
const QPointF& );
36 QPointF toPoint()
const;
41 double radius()
const;
42 double azimuth()
const;
47 void setRadius(
double );
48 void setAzimuth(
double );
63 #ifndef QT_NO_DEBUG_STREAM
84 : m_azimuth( azimuth )
138 double radius,
double angle )
140 const double x = pole.x() + radius * std::cos( angle );
141 const double y = pole.y() - radius * std::sin( angle );
143 return QPoint( qRound(
x ), qRound(
y ) );
147 double radius,
double angle )
153 double radius,
double angle )
155 const double x = pole.x() + radius * std::cos( angle );
156 const double y = pole.y() - radius * std::sin( angle );
158 return QPointF(
x,
y);
162 double radius,
double angle )
168 double radius,
double angle )
170 const double x = pole.x() + radius * qFastCos( angle );
171 const double y = pole.y() - radius * qFastSin( angle );
173 return QPointF(
x,
y);
177 double radius,
double angle )
double qwtSqr(double x)
Return the square of a number.
QwtPointPolar qwtFastPos2Polar(const QPointF &pos)
bool isNull() const
Returns true if radius() >= 0.0.
double qwtFastAtan2(double y, double x)
Approximation of arc tangent ( error below 0,005 radians )
Q_DECLARE_TYPEINFO(QwtPointPolar, Q_MOVABLE_TYPE)
QPoint qwtPolar2Pos(const QPoint &pole, double radius, double angle)
void setRadius(double)
Sets the radius to radius.
A point in polar coordinates.
QWT_EXPORT QDebug operator<<(QDebug, const QwtPointPolar &)
double azimuth() const
Returns the azimuth.
void setAzimuth(double)
Sets the azimuth to azimuth.
QPointF qwtFastDegree2Pos(const QPointF &pole, double radius, double angle)
bool operator==(QwtEventPattern::MousePattern b1, QwtEventPattern::MousePattern b2)
Compare operator.
constexpr bool operator!=(const optional< T > &lhs, const optional< U > &rhs)
\group relop
double & rRadius()
Returns the radius.
double & rAzimuth()
Returns the azimuth.
bool isValid() const
Returns true if radius() >= 0.0.
double radius() const
Returns the radius.
QPoint qwtDegree2Pos(const QPoint &pole, double radius, double angle)
QPointF qwtFastPolar2Pos(const QPointF &pole, double radius, double angle)
bool isValid(int axisPos)
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:46