1// Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QT3DEXTRAS_QABSTRACTSPRITESHEET_P_H
5#define QT3DEXTRAS_QABSTRACTSPRITESHEET_P_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 for the convenience
12// of other Qt classes. 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 <Qt3DCore/private/qnode_p.h>
19#include <QMatrix3x3>
20#include <QSize>
21
22QT_BEGIN_NAMESPACE
23
24namespace Qt3DRender {
25
26class QFilterKey;
27class QEffect;
28class QAbstractTexture;
29class QTechnique;
30class QParameter;
31class QShaderProgram;
32class QRenderPass;
33
34} // namespace Qt3DRender
35
36namespace Qt3DExtras {
37
38class QAbstractSpriteSheet;
39
40class QAbstractSpriteSheetPrivate : public Qt3DCore::QNodePrivate
41{
42public:
43 QAbstractSpriteSheetPrivate();
44
45 virtual void init();
46 void updateTexture(Qt3DRender::QAbstractTexture *texture);
47 void updateIndex(int newIndex);
48 virtual int maxIndex() const = 0;
49 virtual void updateSizes() = 0;
50 virtual void updateTransform() = 0;
51
52 Qt3DRender::QAbstractTexture *m_texture;
53 QMatrix3x3 m_textureTransform;
54 QSize m_textureSize;
55 int m_currentIndex;
56
57 Q_DECLARE_PUBLIC(QAbstractSpriteSheet)
58};
59
60} // Qt3DExtras
61
62QT_END_NAMESPACE
63
64#endif // QT3DEXTRAS_QABSTRACTSPRITESHEET_P_H
65
66

source code of qt3d/src/extras/defaults/qabstractspritesheet_p.h