# QQuaternion Class Reference

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

### Constructor

- void QQuaternion()
- void QQuaternion(QVector4D vector)
- void QQuaternion(qreal scalar, QVector3D vector)
- void QQuaternion(qreal scalar, qreal xpos, qreal ypos, qreal zpos)

### Constructor Properties

- prototype: The QQuaternion prototype object
- QQuaternion fromAxisAndAngle(QVector3D axis, qreal angle)
- QQuaternion nlerp(QQuaternion q1, QQuaternion q2, qreal t)
- QQuaternion slerp(QQuaternion q1, QQuaternion q2, qreal t)

### Prototype Object Properties

- QQuaternion conjugate()
- bool isIdentity()
- bool isNull()
- qreal length()
- qreal lengthSquared()
- void normalize()
- QQuaternion normalized()
- QQuaternion operator_add_assign(QQuaternion quaternion)
- QQuaternion operator_divide_assign(qreal divisor)
- bool operator_equal(QQuaternion q2)
- QQuaternion operator_multiply_assign(QQuaternion quaternion)
- QQuaternion operator_subtract_assign(QQuaternion quaternion)
- void readFrom(QDataStream arg__1)
- QVector3D rotatedVector(QVector3D vector)
- qreal scalar()
- void setScalar(qreal scalar)
- void setVector(QVector3D vector)
- void setX(qreal x)
- void setY(qreal y)
- void setZ(qreal z)
- QVector4D toVector4D()
- QVector3D vector()
- void writeTo(QDataStream arg__1)
- qreal x()
- qreal y()
- qreal z()

### Instance Properties

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