1// Copyright (C) 2015 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 QT3DCORE_QGEOMETRY_H
5#define QT3DCORE_QGEOMETRY_H
6
7#include <Qt3DCore/qnode.h>
8#include <Qt3DCore/qt3dcore_global.h>
9#include <Qt3DCore/qattribute.h>
10
11QT_BEGIN_NAMESPACE
12
13namespace Qt3DCore {
14
15class QGeometryPrivate;
16
17class Q_3DCORESHARED_EXPORT QGeometry : public Qt3DCore::QNode
18{
19 Q_OBJECT
20 Q_PROPERTY(Qt3DCore::QAttribute *boundingVolumePositionAttribute READ boundingVolumePositionAttribute WRITE setBoundingVolumePositionAttribute NOTIFY boundingVolumePositionAttributeChanged)
21 Q_PROPERTY(QVector3D minExtent READ minExtent NOTIFY minExtentChanged QT3D_PROPERTY_REVISION(2, 13))
22 Q_PROPERTY(QVector3D maxExtent READ maxExtent NOTIFY maxExtentChanged QT3D_PROPERTY_REVISION(2, 13))
23public:
24 explicit QGeometry(Qt3DCore::QNode *parent = nullptr);
25 ~QGeometry();
26
27 QList<QAttribute *> attributes() const;
28 Q_INVOKABLE void addAttribute(Qt3DCore::QAttribute *attribute);
29 Q_INVOKABLE void removeAttribute(Qt3DCore::QAttribute *attribute);
30
31 QAttribute *boundingVolumePositionAttribute() const;
32 QVector3D minExtent() const;
33 QVector3D maxExtent() const;
34
35public Q_SLOTS:
36 void setBoundingVolumePositionAttribute(QAttribute *boundingVolumePositionAttribute);
37
38Q_SIGNALS:
39 void boundingVolumePositionAttributeChanged(QAttribute *boundingVolumePositionAttribute);
40 QT3D_REVISION(2, 13) void minExtentChanged(const QVector3D &minExtent);
41 QT3D_REVISION(2, 13) void maxExtentChanged(const QVector3D &maxExtent);
42protected:
43 explicit QGeometry(QGeometryPrivate &dd, Qt3DCore::QNode *parent = nullptr);
44
45private:
46 Q_DECLARE_PRIVATE(QGeometry)
47};
48
49} // namespace Qt3DCore
50
51QT_END_NAMESPACE
52
53#endif // QT3DCORE_QGEOMETRY_H
54

source code of qt3d/src/core/geometry/qgeometry.h