Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquick3dgeometry_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5
6#ifndef Q_QUICK3D_GEOMETRY_P_H
7#define Q_QUICK3D_GEOMETRY_P_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QtQuick3D/qquick3dgeometry.h>
21#include <QtQuick3D/private/qquick3dobject_p.h>
22#include <QtQuick3DRuntimeRender/private/qssgrendergeometry_p.h>
23
24#include <QtGui/qvector3d.h>
25
27
28class Q_QUICK3D_EXPORT QQuick3DGeometryPrivate : public QQuick3DObjectPrivate
29{
30public:
31 QQuick3DGeometryPrivate();
32 explicit QQuick3DGeometryPrivate(Flags flags);
33
34 struct Subset {
35 QString name;
36 QVector3D boundsMin;
37 QVector3D boundsMax;
38 quint32 offset;
39 quint32 count;
40 };
41
42 static const int MAX_ATTRIBUTE_COUNT = 16;
43 static const int MAX_TARGET_ATTRIBUTE_COUNT = 32;
44 QByteArray m_vertexBuffer;
45 QByteArray m_targetBuffer;
46 QByteArray m_indexBuffer;
47 QQuick3DGeometry::Attribute m_attributes[MAX_ATTRIBUTE_COUNT];
48 QVector<Subset> m_subsets;
49 int m_attributeCount = 0;
50 QQuick3DGeometry::TargetAttribute m_targetAttributes[MAX_TARGET_ATTRIBUTE_COUNT];
51 int m_targetAttributeCount = 0;
52 QQuick3DGeometry::PrimitiveType m_primitiveType = QQuick3DGeometry::PrimitiveType::Triangles;
53 QVector3D m_min;
54 QVector3D m_max;
55 int m_stride = 0;
56 bool m_geometryChanged = true;
57 bool m_geometryBoundsChanged = true;
58 bool m_targetChanged = true;
59 bool m_usesOldTargetSemantics = false;
60
61 static QQuick3DGeometry::Attribute::Semantic semanticFromName(const QByteArray &name);
62 static QQuick3DGeometry::Attribute::ComponentType toComponentType(QSSGMesh::Mesh::ComponentType componentType);
63};
64
65QT_END_NAMESPACE
66
67#endif
static QSSGMesh::Mesh::DrawMode mapPrimitiveType(QQuick3DGeometry::PrimitiveType t)
static QSSGMesh::RuntimeMeshData::Attribute::Semantic mapSemantic(QQuick3DGeometry::Attribute::Semantic s)
static QSSGMesh::Mesh::ComponentType mapComponentType(QQuick3DGeometry::Attribute::ComponentType t)