5#include <QtQuick3DUtils/private/qssgutils_p.h>
111 QVector3D targetDirection = targetPosition - sourcePosition;
118 rotationAxis = upDirection;
The QQuaternion class represents a quaternion consisting of a vector and scalar.
static QQuaternion fromEulerAngles(const QVector3D &eulerAngles)
static QQuaternion fromAxisAndAngle(const QVector3D &axis, float angle)
Creates a normalized quaternion that corresponds to rotating through angle degrees about the specifie...
static Q_INVOKABLE QQuaternion fromAxesAndAngles(const QVector3D &axis1, float angle1, const QVector3D &axis2, float angle2, const QVector3D &axis3, float angle3)
static Q_INVOKABLE QQuaternion fromAxisAndAngle(float x, float y, float z, float angle)
static Q_INVOKABLE QQuaternion fromEulerAngles(float x, float y, float z)
static Q_INVOKABLE QQuaternion lookAt(const QVector3D &sourcePosition, const QVector3D &targetPosition, const QVector3D &forwardDirection=QVector3D(0, 0, -1), const QVector3D &upDirection=QVector3D(0, 1, 0))
QQuick3DQuaternionUtils(QObject *parent=nullptr)
\qmltype Quaternion \inqmlmodule QtQuick3D
The QVector3D class represents a vector or vertex in 3D space.
QVector3D normalized() const noexcept
Returns the normalized unit vector form of this vector.
constexpr float lengthSquared() const noexcept
Returns the squared length of the vector from the origin.
static constexpr float dotProduct(QVector3D v1, QVector3D v2) noexcept
Returns the dot product of v1 and v2.
static constexpr QVector3D crossProduct(QVector3D v1, QVector3D v2) noexcept
Returns the cross-product of vectors v1 and v2, which is normal to the plane spanned by v1 and v2.
void normalize() noexcept
Normalizes the current vector in place.
Combined button and popup list for selecting options.
bool qFuzzyIsNull(qfloat16 f) noexcept
constexpr float qRadiansToDegrees(float radians)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
static qreal dot(const QPointF &a, const QPointF &b)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent