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
qtriggerbody_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 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 TRIGGERBODY_H
6#define TRIGGERBODY_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>
21#include <QtQml/QQmlEngine>
22
24
25class Q_QUICK3DPHYSICS_EXPORT QTriggerBody : public QAbstractTriggerRegion
26{
27 Q_OBJECT
28 Q_PROPERTY(int collisionCount READ collisionCount NOTIFY collisionCountChanged)
29 QML_NAMED_ELEMENT(TriggerBody)
30public:
31 QTriggerBody();
32
33 QAbstractPhysXNode *createPhysXBackend() final;
34
35Q_SIGNALS:
36 void bodyEntered(QAbstractPhysicsNode *body);
37 void bodyExited(QAbstractPhysicsNode *body);
38
39protected:
40 void bodyDidEnter(QAbstractPhysicsNode *body) override;
41 void bodyDidExit(QAbstractPhysicsNode *body) override;
42 // A trigger body is what PhysicsNode::enteredTriggerBody and exitedTriggerBody report.
43 bool reportsToBodies() const override;
44};
45
47
48#endif // TRIGGERBODY_H
QPhysXTriggerBody(QTriggerBody *frontEnd)
DebugDrawBodyType getDebugDrawBodyType() override
void sync(float deltaTime, QHash< QQuick3DNode *, QMatrix4x4 > &transformCache) override
bool useTriggerFlag() override
PxTransformT< float > PxTransform
DebugDrawBodyType
#define QT_BEGIN_NAMESPACE
#define QT_END_NAMESPACE