Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquick3dquaternionutils_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QQUICK3DQUATERNIONUTILS_H
5#define QQUICK3DQUATERNIONUTILS_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuick3D/private/qtquick3dglobal_p.h>
19
20#include <QtCore/QObject>
21#include <QtGui/QQuaternion>
22#include <QtGui/QVector3D>
23#include <QtQml/qqml.h>
24
26
27class Q_QUICK3D_EXPORT QQuick3DQuaternionUtils : public QObject
28{
30
31 QML_NAMED_ELEMENT(Quaternion)
33
34public:
35 explicit QQuick3DQuaternionUtils(QObject *parent = nullptr);
36
37 Q_INVOKABLE static QQuaternion fromAxesAndAngles(const QVector3D &axis1,
38 float angle1,
39 const QVector3D &axis2,
40 float angle2,
41 const QVector3D &axis3,
42 float angle3);
43 Q_INVOKABLE static QQuaternion fromAxesAndAngles(const QVector3D &axis1,
44 float angle1,
45 const QVector3D &axis2,
46 float angle2);
47 Q_INVOKABLE static QQuaternion fromAxisAndAngle(float x, float y, float z, float angle);
48 Q_INVOKABLE static QQuaternion fromAxisAndAngle(const QVector3D &axis, float angle);
49 Q_INVOKABLE static QQuaternion fromEulerAngles(float x, float y, float z);
50 Q_INVOKABLE static QQuaternion fromEulerAngles(const QVector3D &eulerAngles);
51
52 Q_INVOKABLE static QQuaternion lookAt(const QVector3D &sourcePosition,
53 const QVector3D &targetPosition,
54 const QVector3D &forwardDirection = QVector3D(0, 0, -1),
55 const QVector3D &upDirection = QVector3D(0, 1, 0));
56
57};
58
60
61#endif // QQUICK3DQUATERNIONUTILS_H
\inmodule QtCore
Definition qobject.h:103
The QQuaternion class represents a quaternion consisting of a vector and scalar.
The QVector3D class represents a vector or vertex in 3D space.
Definition qvectornd.h:171
Combined button and popup list for selecting options.
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
GLfloat angle
GLint y
#define QML_NAMED_ELEMENT(NAME)
#define QML_SINGLETON
#define Q_OBJECT
#define Q_INVOKABLE