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