1// Copyright (C) 2014 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 QT3DRENDER_QMESH_H
5#define QT3DRENDER_QMESH_H
6
7#include <Qt3DRender/qt3drender_global.h>
8#include <Qt3DRender/qgeometryrenderer.h>
9#include <QtCore/QUrl>
10
11QT_BEGIN_NAMESPACE
12
13namespace Qt3DRender {
14
15class QMeshPrivate;
16
17/**
18* @brief Simple static mesh
19*
20*/
21class Q_3DRENDERSHARED_EXPORT QMesh : public QGeometryRenderer
22{
23 Q_OBJECT
24 Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
25 Q_PROPERTY(QString meshName READ meshName WRITE setMeshName NOTIFY meshNameChanged)
26 Q_PROPERTY(Status status READ status NOTIFY statusChanged REVISION 11)
27public:
28 explicit QMesh(Qt3DCore::QNode *parent = nullptr);
29 ~QMesh();
30
31 enum Status {
32 None = 0,
33 Loading,
34 Ready,
35 Error
36 };
37 Q_ENUM(Status) // LCOV_EXCL_LINE
38
39
40 QUrl source() const;
41 QString meshName() const;
42 Status status() const;
43
44public Q_SLOTS:
45 void setSource(const QUrl &source);
46 void setMeshName(const QString &meshName);
47
48Q_SIGNALS:
49 void sourceChanged(const QUrl &source);
50 void meshNameChanged(const QString &meshName);
51 void statusChanged(Status status);
52
53protected:
54 explicit QMesh(QMeshPrivate &dd, Qt3DCore::QNode *parent = nullptr);
55
56private:
57 Q_DECLARE_PRIVATE(QMesh)
58};
59
60}
61
62QT_END_NAMESPACE
63
64#endif // of QT3DRENDER_QMESH_H
65

source code of qt3d/src/render/geometry/qmesh.h