Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qmeshshape_p.h
Go to the documentation of this file.
1
// Copyright (C) 2023 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
#
ifndef
MESHSHAPE_H
6
#
define
MESHSHAPE_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtQuick3DPhysics
/
qtquick3dphysicsglobal
.
h
>
20
#
include
<
QtQuick3DPhysics
/
private
/
qabstractcollisionshape_p
.
h
>
21
#
include
<
QtCore
/
QObject
>
22
#
include
<
QtGui
/
QVector3D
>
23
#
include
<
QtQml
/
QQmlEngine
>
24
#
include
<
QtQuick3D
/
QQuick3DGeometry
>
25
26
namespace
physx
{
27
class
PxBoxGeometry;
28
class
PxConvexMesh;
29
class
PxConvexMeshGeometry;
30
class
PxTriangleMesh;
31
class
PxTriangleMeshGeometry;
32
}
33
34
QT_BEGIN_NAMESPACE
35
class
QQuick3DPhysicsMesh;
36
37
class
Q_QUICK3DPHYSICS_EXPORT
QMeshShape
:
public
QAbstractCollisionShape
38
{
39
Q_OBJECT
40
Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged REVISION(6, 5))
41
Q_PROPERTY(QQuick3DGeometry *geometry READ geometry WRITE setGeometry NOTIFY geometryChanged
42
REVISION(6, 7))
43
QML_NAMED_ELEMENT(MeshShape)
44
QML_UNCREATABLE(
"abstract interface"
)
45
46
public
:
47
~QMeshShape();
48
49
enum
class
MeshType { TRIANGLE, CONVEX };
50
virtual
MeshType shapeType()
const
= 0;
51
52
physx::PxGeometry *getPhysXGeometry() override;
53
54
Q_REVISION(6, 5)
const
QUrl &source()
const
;
55
Q_REVISION(6, 5)
void
setSource(
const
QUrl &newSource);
56
Q_REVISION(6, 7) QQuick3DGeometry *geometry()
const
;
57
Q_REVISION(6, 7)
void
setGeometry(QQuick3DGeometry *newGeometry);
58
59
signals:
60
Q_REVISION(6, 5)
void
sourceChanged();
61
Q_REVISION(6, 7)
void
geometryChanged();
62
63
private
slots:
64
void
geometryDestroyed(QObject *geometry);
65
void
geometryContentChanged();
66
67
private
:
68
void
updatePhysXGeometry();
69
70
bool
m_dirtyPhysx =
false
;
71
quint32 m_physicsGeneration = 0;
72
physx::PxConvexMeshGeometry *m_convexGeometry =
nullptr
;
73
physx::PxTriangleMeshGeometry *m_triangleGeometry =
nullptr
;
74
QUrl m_meshSource;
75
QQuick3DPhysicsMesh *m_mesh =
nullptr
;
76
QQuick3DGeometry *m_geometry =
nullptr
;
77
};
78
79
QT_END_NAMESPACE
80
81
#
endif
// MESHSHAPE_H
QConvexMeshShape
Definition
qconvexmeshshape_p.h:24
QMeshShape
Definition
qmeshshape_p.h:38
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
physx
Definition
qphysxactorbody_p.h:22
qtquick3dphysics
src
quick3dphysics
qmeshshape_p.h
Generated on
for Qt by
1.18.0