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
qquick3dphysicslocationhit_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 QQUICK3DPHYSICSQUERYLOCATIONHIT_H
6#define QQUICK3DPHYSICSQUERYLOCATIONHIT_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
20
21namespace physx {
22struct PxLocationHit;
23}
24
26
27class Q_QUICK3DPHYSICS_EXPORT QQuick3DPhysicsLocationHit : public QQuick3DPhysicsQueryHit
28{
29 Q_GADGET
30 QML_VALUE_TYPE(locationHit)
31 QML_ADDED_IN_VERSION(6, 13)
32
33 Q_PROPERTY(QVector3D position READ position CONSTANT FINAL REVISION(6, 13))
34 Q_PROPERTY(QVector3D normal READ normal CONSTANT FINAL REVISION(6, 13))
35 Q_PROPERTY(float distance READ distance CONSTANT FINAL REVISION(6, 13))
36
37public:
38 QQuick3DPhysicsLocationHit();
39 explicit QQuick3DPhysicsLocationHit(const physx::PxLocationHit &hit,
40 const physx::PxActorShape &actorShape);
41
42 Q_REVISION(6, 13) QVector3D position() const;
43 Q_REVISION(6, 13) QVector3D normal() const;
44 Q_REVISION(6, 13) float distance() const;
45
46private:
47 QVector3D m_position;
48 QVector3D m_normal;
49 float m_distance = 0;
50};
51
52QT_END_NAMESPACE
53#endif // QQUICK3DPHYSICSQUERYLOCATIONHIT_H
Combined button and popup list for selecting options.