58 #ifndef QT_NO_VECTOR3D
64 QVector3D(qreal xpos, qreal ypos, qreal zpos);
67 #ifndef QT_NO_VECTOR2D
69 QVector3D(
const QVector2D& vector, qreal zpos);
71 #ifndef QT_NO_VECTOR4D
72 explicit QVector3D(
const QVector4D& vector);
86 qreal lengthSquared()
const;
119 #ifndef QT_NO_VECTOR2D
120 QVector2D toVector2D()
const;
122 #ifndef QT_NO_VECTOR4D
123 QVector4D toVector4D()
const;
134 QVector3D(
float xpos,
float ypos,
float zpos,
int dummy);
136 friend class QVector2D;
137 friend class QVector4D;
138 #ifndef QT_NO_MATRIX4X4
150 inline QVector3D::QVector3D(
float xpos,
float ypos,
float zpos,
int) : xp(xpos), yp(ypos), zp(zpos) {}
158 return qIsNull(xp) && qIsNull(yp) && qIsNull(zp);
211 return v1.xp == v2.xp && v1.yp == v2.yp && v1.zp == v2.zp;
216 return v1.xp != v2.xp || v1.yp != v2.yp || v1.zp != v2.zp;
221 return QVector3D(v1.xp + v2.xp, v1.yp + v2.yp, v1.zp + v2.zp, 1);
226 return QVector3D(v1.xp - v2.xp, v1.yp - v2.yp, v1.zp - v2.zp, 1);
231 return QVector3D(vector.xp * factor, vector.yp * factor, vector.zp * factor, 1);
236 return QVector3D(vector.xp * factor, vector.yp * factor, vector.zp * factor, 1);
241 return QVector3D(v1.xp * v2.xp, v1.yp * v2.yp, v1.zp * v2.zp, 1);
246 return QVector3D(-vector.xp, -vector.yp, -vector.zp, 1);
251 return QVector3D(vector.xp / divisor, vector.yp / divisor, vector.zp / divisor, 1);
263 return QPoint(qRound(xp), qRound(yp));
268 return QPointF(qreal(xp), qreal(yp));
271 #ifndef QT_NO_DEBUG_STREAM
275 #ifndef QT_NO_DATASTREAM
QByteArray & operator+=(QByteArray &a, const QStringBuilder< A, B > &b)
GLfloat GLfloat GLfloat v2
bool qFuzzyCompare(const QVector3D &v1, const QVector3D &v2)
const QVector3D operator/(const QVector3D &vector, qreal divisor)
QVector3D & operator/=(qreal divisor)
bool operator!=(const QVector3D &v1, const QVector3D &v2)
QVector3D & operator-=(const QVector3D &vector)
Q_DECLARE_TYPEINFO(QVector3D, Q_MOVABLE_TYPE)
QVector3D & operator*=(qreal factor)
#define QT_BEGIN_NAMESPACE
QVector3D & operator+=(const QVector3D &vector)
bool operator==(const QVector3D &v1, const QVector3D &v2)
const QVector3D operator-(const QVector3D &v1, const QVector3D &v2)
GLuint GLsizei GLsizei * length
const QVector3D operator+(const QVector3D &v1, const QVector3D &v2)
const QVector3D operator*(qreal factor, const QVector3D &vector)
GLint GLenum GLboolean normalized
Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QVector3D &vector)
GLXDrawable int64_t int64_t divisor
GLfloat GLfloat GLfloat GLfloat v3
Q_GUI_EXPORT QDataStream & operator>>(QDataStream &, QVector3D &)