# QVector3D Class Reference

### [com.trolltech.qt.gui package]

### Constructor

- void QVector3D()
- void QVector3D(QPoint point)
- void QVector3D(QPointF point)
- void QVector3D(QVector2D vector)
- void QVector3D(QVector2D vector, qreal zpos)
- void QVector3D(QVector4D vector)
- void QVector3D(qreal xpos, qreal ypos, qreal zpos)

### Constructor Properties

- prototype: The QVector3D prototype object
- QVector3D crossProduct(QVector3D v1, QVector3D v2)
- qreal dotProduct(QVector3D v1, QVector3D v2)
- QVector3D normal(QVector3D v1, QVector3D v2)

### Prototype Object Properties

- qreal distanceToLine(QVector3D point, QVector3D direction)
- qreal distanceToPlane(QVector3D plane, QVector3D normal)
- bool isNull()
- qreal length()
- qreal lengthSquared()
- void normalize()
- QVector3D normalized()
- QVector3D operator_add_assign(QVector3D vector)
- QVector3D operator_divide_assign(qreal divisor)
- bool operator_equal(QVector3D v2)
- QVector3D operator_multiply_assign(QVector3D vector)
- QVector3D operator_subtract_assign(QVector3D vector)
- void readFrom(QDataStream arg__1)
- void setX(qreal x)
- void setY(qreal y)
- void setZ(qreal z)
- QPoint toPoint()
- QPointF toPointF()
- QVector2D toVector2D()
- QVector4D toVector4D()
- void writeTo(QDataStream arg__1)
- qreal x()
- qreal y()
- qreal z()

### Instance Properties

QVector3D objects have no special properties beyond those inherited from the QVector3D prototype object.