58 #ifndef QT_NO_VECTOR2D
67 #ifndef QT_NO_VECTOR3D
68 explicit QVector2D(
const QVector3D& vector);
70 #ifndef QT_NO_VECTOR4D
71 explicit QVector2D(
const QVector4D& vector);
83 qreal lengthSquared()
const;
108 #ifndef QT_NO_VECTOR3D
109 QVector3D toVector3D()
const;
111 #ifndef QT_NO_VECTOR4D
112 QVector4D toVector4D()
const;
118 operator QVariant()
const;
123 QVector2D(
float xpos,
float ypos,
int dummy);
125 friend class QVector3D;
126 friend class QVector4D;
143 return qIsNull(xp) && qIsNull(yp);
189 return v1.xp == v2.xp && v1.yp == v2.yp;
194 return v1.xp != v2.xp || v1.yp != v2.yp;
199 return QVector2D(v1.xp + v2.xp, v1.yp + v2.yp, 1);
204 return QVector2D(v1.xp - v2.xp, v1.yp - v2.yp, 1);
209 return QVector2D(vector.xp * factor, vector.yp * factor, 1);
214 return QVector2D(vector.xp * factor, vector.yp * factor, 1);
219 return QVector2D(v1.xp * v2.xp, v1.yp * v2.yp, 1);
224 return QVector2D(-vector.xp, -vector.yp, 1);
229 return QVector2D(vector.xp / divisor, vector.yp / divisor, 1);
239 return QPoint(qRound(xp), qRound(yp));
244 return QPointF(qreal(xp), qreal(yp));
247 #ifndef QT_NO_DEBUG_STREAM
251 #ifndef QT_NO_DATASTREAM
const QVector2D operator-(const QVector2D &v1, const QVector2D &v2)
Q_GUI_EXPORT QDataStream & operator>>(QDataStream &, QVector2D &)
QVector2D & operator+=(const QVector2D &vector)
QByteArray & operator+=(QByteArray &a, const QStringBuilder< A, B > &b)
GLfloat GLfloat GLfloat v2
QVector2D & operator-=(const QVector2D &vector)
Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QVector2D &vector)
bool operator==(const QVector2D &v1, const QVector2D &v2)
#define QT_BEGIN_NAMESPACE
Q_DECLARE_TYPEINFO(QVector2D, Q_MOVABLE_TYPE)
const QVector2D operator+(const QVector2D &v1, const QVector2D &v2)
GLuint GLsizei GLsizei * length
bool operator!=(const QVector2D &v1, const QVector2D &v2)
const QVector2D operator/(const QVector2D &vector, qreal divisor)
bool qFuzzyCompare(const QVector2D &v1, const QVector2D &v2)
GLint GLenum GLboolean normalized
const QVector2D operator*(qreal factor, const QVector2D &vector)
GLXDrawable int64_t int64_t divisor
QVector2D & operator*=(qreal factor)
QVector2D & operator/=(qreal divisor)