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 QAbstractPhysicsNode
26{
27 Q_OBJECT
28 Q_PROPERTY(int collisionCount READ collisionCount NOTIFY collisionCountChanged)
29 QML_NAMED_ELEMENT(TriggerBody)
30public:
31 QTriggerBody();
32
33 void registerCollision(QAbstractPhysicsNode *collision);
34 void deregisterCollision(QAbstractPhysicsNode *collision);
35
36 int collisionCount() const;
37 QAbstractPhysXNode *createPhysXBackend() final;
38
39Q_SIGNALS:
40 void bodyEntered(QAbstractPhysicsNode *body);
41 void bodyExited(QAbstractPhysicsNode *body);
42 void collisionCountChanged();
43
44private:
45 QSet<QAbstractPhysicsNode *> m_collisions;
46};
47
49
50#endif // TRIGGERBODY_H
QPhysXTriggerBody(QTriggerBody *frontEnd)
DebugDrawBodyType getDebugDrawBodyType() override
void sync(float deltaTime, QHash< QQuick3DNode *, QMatrix4x4 > &transformCache) override
bool useTriggerFlag() override
DebugDrawBodyType
#define QT_BEGIN_NAMESPACE
#define QT_END_NAMESPACE