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
qquick3dmorphtarget_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 QSSGMORPHTARGET_H
5#define QSSGMORPHTARGET_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/qquick3dobject_p.h>
19
20#include <QtQml/QQmlListProperty>
21
22#include <QtCore/QVector>
23#include <QtCore/QUrl>
24
26class QQuick3DModel;
27
28class Q_QUICK3D_EXPORT QQuick3DMorphTarget : public QQuick3DObject
29{
31 Q_PROPERTY(float weight READ weight WRITE setWeight NOTIFY weightChanged)
32 Q_PROPERTY(MorphTargetAttributes attributes READ attributes WRITE setAttributes NOTIFY attributesChanged)
33 QML_NAMED_ELEMENT(MorphTarget)
35
36public:
38 Position = 0x01,
39 Normal = 0x02,
40 Tangent = 0x04,
41 Binormal = 0x08,
42 TexCoord0 = 0x10,
43 TexCoord1 = 0x20,
44 Color = 0x40
45 };
46 Q_ENUM(MorphTargetAttribute)
47 Q_DECLARE_FLAGS(MorphTargetAttributes , MorphTargetAttribute)
48 Q_FLAG(MorphTargetAttributes)
49
50 explicit QQuick3DMorphTarget(QQuick3DObject *parent = nullptr);
51 ~QQuick3DMorphTarget() override;
52
53 float weight() const;
54 MorphTargetAttributes attributes() const;
55
56public Q_SLOTS:
57 void setWeight(float castsShadows);
58 void setAttributes(QQuick3DMorphTarget::MorphTargetAttributes attributes);
62
63private:
64 friend QQuick3DModel;
65 QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *node) override;
66 void markAllDirty() override;
67 size_t numAttribs();
68
69 enum QSSGMorphTargetDirtyType {
70 WeightDirty = 0x00000001,
71 MorphTargetAttributesDirty = 0x00000002,
72 };
73
74 quint32 m_dirtyAttributes = 0xffffffff; // all dirty by default
75 void markDirty(QSSGMorphTargetDirtyType type);
76
77 float m_weight = 0.0;
78 MorphTargetAttributes m_attributes = MorphTargetAttribute::Position;
79 size_t m_numAttribs = 1;
80};
81
83
84#endif // QSSGMORPHTARGET_H
\qmltype Object3D \inqmlmodule QtQuick3D \instantiates QQuick3DObject \inherits QtObject
Combined button and popup list for selecting options.
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
GLuint GLuint GLfloat weight
GLenum type
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_FLAG(x)
#define Q_SLOTS
#define Q_SIGNALS
unsigned int quint32
Definition qtypes.h:50