11 #ifndef _QWT_POINT_POLAR_H_ 12 #define _QWT_POINT_POLAR_H_ 1 17 #ifndef QT_NO_DEBUG_STREAM 36 void setPoint(
const QPointF & );
37 QPointF toPoint()
const;
42 double radius()
const;
43 double azimuth()
const;
48 void setRadius(
double );
49 void setAzimuth(
double );
141 #ifndef QT_NO_DEBUG_STREAM 146 double radius,
double angle )
148 const double x = pole.x() + radius * qCos( angle );
149 const double y = pole.y() - radius * qSin( angle );
151 return QPoint( qRound( x ), qRound( y ) );
155 double radius,
double angle )
157 return qwtPolar2Pos( pole, radius, angle / 180.0 * M_PI );
161 double radius,
double angle )
163 const double x = pole.x() + radius * qCos( angle );
164 const double y = pole.y() - radius * qSin( angle );
166 return QPointF( x, y);
170 double radius,
double angle )
172 return qwtPolar2Pos( pole, radius, angle / 180.0 * M_PI );
176 double radius,
double angle )
178 #if QT_VERSION < 0x040601 179 const double x = pole.x() + radius * ::cos( angle );
180 const double y = pole.y() - radius * ::sin( angle );
182 const double x = pole.x() + radius *
qFastCos( angle );
183 const double y = pole.y() - radius *
qFastSin( angle );
186 return QPointF( x, y);
190 double radius,
double angle )
void setAzimuth(double)
Sets the atimuth to atimuth.
A point in polar coordinates.
double & rRadius()
Returns the radius.
QPoint qwtPolar2Pos(const QPoint &pole, double radius, double angle)
bool operator==(optional< T > const &x, optional< T > const &y)
QPointF qwtFastPolar2Pos(const QPointF &pole, double radius, double angle)
double radius() const
Returns the radius.
void setRadius(double)
Sets the radius to radius.
bool isNull() const
Returns true if radius() >= 0.0.
double azimuth() const
Returns the azimuth.
TFSIMD_FORCE_INLINE const tfScalar & y() const
QwtPointPolar qwtFastPos2Polar(const QPointF &pos)
TFSIMD_FORCE_INLINE Vector3 normalized() const
QPointF qwtFastDegree2Pos(const QPointF &pole, double radius, double angle)
double & rAzimuth()
Returns the azimuth.
TFSIMD_FORCE_INLINE const tfScalar & x() const
bool isValid() const
Returns true if radius() >= 0.0.
QPoint qwtDegree2Pos(const QPoint &pole, double radius, double angle)
QWT_EXPORT QDebug operator<<(QDebug, const QwtPointPolar &)
double qwtSqr(double x)
Return the square of a number.
double qwtFastAtan2(double y, double x)
Approximation of arc tangent ( error below 0,005 radians )
bool operator!=(optional< T > const &x, optional< T > const &y)