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
qquick3dphysicsqueryhit_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 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 QQUICK3DPHYSICSQUERYHIT_H
6#define QQUICK3DPHYSICSQUERYHIT_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 <QtCore/QObject>
20#include <QtCore/QPointer>
21#include <QtGui/QVector3D>
22#include <QtQml/qqmlregistration.h>
23#include <QtQuick3DPhysics/qtquick3dphysicsglobal.h>
24
25namespace physx {
26struct PxActorShape;
27struct PxQueryHit;
28}
29
30QT_BEGIN_NAMESPACE
31
32class QAbstractPhysicsNode;
33class QAbstractCollisionShape;
34
35class Q_QUICK3DPHYSICS_EXPORT QQuick3DPhysicsQueryHit
36{
37 Q_GADGET
38 QML_VALUE_TYPE(queryHit)
39 QML_ADDED_IN_VERSION(6, 13)
40
41 Q_PROPERTY(QAbstractPhysicsNode *body READ body CONSTANT FINAL REVISION(6, 13))
42 Q_PROPERTY(QAbstractCollisionShape *shape READ shape CONSTANT FINAL REVISION(6, 13))
43
44public:
45 QQuick3DPhysicsQueryHit();
46
47 // The hit carries faceIndex, which nothing exposes yet. Taken by reference so that
48 // adding it later does not change this signature.
49 explicit QQuick3DPhysicsQueryHit(const physx::PxQueryHit &hit,
50 const physx::PxActorShape &actorShape);
51
52 Q_REVISION(6, 13) QAbstractPhysicsNode *body() const;
53 Q_REVISION(6, 13) QAbstractCollisionShape *shape() const;
54
55private:
56 QPointer<QAbstractPhysicsNode> m_body;
57 QPointer<QAbstractCollisionShape> m_shape;
58};
59
60QT_END_NAMESPACE
61#endif // QQUICK3DPHYSICSQUERYHIT_H
Combined button and popup list for selecting options.