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
qquick3dquaternionanimation_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 QQUICK3DQUATERNIONANIMATION_H
5#define QQUICK3DQUATERNIONANIMATION_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 <QtGui/qquaternion.h>
19
20#include <QtQuick3D/private/qquick3dobject_p.h>
21#include <QtQuick/private/qquickanimation_p.h>
22
24
26
28{
30 Q_DECLARE_PRIVATE(QQuick3DQuaternionAnimation)
31 Q_PROPERTY(QQuaternion from READ from WRITE setFrom)
32 Q_PROPERTY(QQuaternion to READ to WRITE setTo)
33 Q_PROPERTY(Type type READ type WRITE setType NOTIFY typeChanged)
34
35 Q_PROPERTY(float fromXRotation READ fromXRotation WRITE setFromXRotation NOTIFY fromXRotationChanged)
36 Q_PROPERTY(float fromYRotation READ fromYRotation WRITE setFromYRotation NOTIFY fromYRotationChanged)
37 Q_PROPERTY(float fromZRotation READ fromZRotation WRITE setFromZRotation NOTIFY fromZRotationChanged)
38 Q_PROPERTY(float toXRotation READ toXRotation WRITE setToXRotation NOTIFY toXRotationChanged)
39 Q_PROPERTY(float toYRotation READ toYRotation WRITE setToYRotation NOTIFY toYRotationChanged)
40 Q_PROPERTY(float toZRotation READ toZRotation WRITE setToZRotation NOTIFY toZRotationChanged)
41
42 QML_NAMED_ELEMENT(QuaternionAnimation)
43
44public:
45 enum Type {
46 Slerp = 0,
47 Nlerp
48 };
50
51 QQuick3DQuaternionAnimation(QObject *parent = nullptr);
52
53 QQuaternion from() const;
54 void setFrom(const QQuaternion &f);
55
56 QQuaternion to() const;
57 void setTo(const QQuaternion &t);
58
59 Type type() const;
60 void setType(Type type);
61
62 float fromXRotation() const;
63 void setFromXRotation(float f);
64
65 float fromYRotation() const;
66 void setFromYRotation(float f);
67
68 float fromZRotation() const;
69 void setFromZRotation(float f);
70
71 float toXRotation() const;
72 void setToXRotation(float f);
73
74 float toYRotation() const;
75 void setToYRotation(float f);
76
77 float toZRotation() const;
78 void setToZRotation(float f);
79
88};
89
90Q_QUICK3D_EXPORT QVariant q_quaternionInterpolator(const QQuaternion &from, const QQuaternion &to, qreal progress);
91
93
94#endif // QQUICK3DQUATERNIONANIMATION_H
\inmodule QtCore
Definition qobject.h:103
The QQuaternion class represents a quaternion consisting of a vector and scalar.
\qmltype QuaternionAnimation \inherits PropertyAnimation \inqmlmodule QtQuick3D
void toXRotationChanged(float value)
void typeChanged(QQuick3DQuaternionAnimation::Type type)
void toZRotationChanged(float value)
void fromZRotationChanged(float value)
void toYRotationChanged(float value)
void fromXRotationChanged(float value)
void fromYRotationChanged(float value)
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLfloat GLfloat f
GLenum type
GLdouble GLdouble t
Definition qopenglext.h:243
#define QML_NAMED_ELEMENT(NAME)
Q_QUICK3D_EXPORT QVariant q_quaternionInterpolator(const QQuaternion &from, const QQuaternion &to, qreal progress)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
double qreal
Definition qtypes.h:187
proxy setType(QNetworkProxy::Socks5Proxy)
Definition moc.h:23