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
4#ifndef TRIGGERBODY_H
5#define TRIGGERBODY_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuick3DPhysics/qtquick3dphysicsglobal.h>
20#include <QtQml/QQmlEngine>
21
23
24class Q_QUICK3DPHYSICS_EXPORT QTriggerBody : public QAbstractPhysicsNode
25{
26 Q_OBJECT
27 Q_PROPERTY(int collisionCount READ collisionCount NOTIFY collisionCountChanged)
28 QML_NAMED_ELEMENT(TriggerBody)
29public:
30 QTriggerBody();
31
32 void registerCollision(QAbstractPhysicsNode *collision);
33 void deregisterCollision(QAbstractPhysicsNode *collision);
34
35 int collisionCount() const;
36 QAbstractPhysXNode *createPhysXBackend() final;
37
38Q_SIGNALS:
39 void bodyEntered(QAbstractPhysicsNode *body);
40 void bodyExited(QAbstractPhysicsNode *body);
41 void collisionCountChanged();
42
43private:
44 QSet<QAbstractPhysicsNode *> m_collisions;
45};
46
48
49#endif // TRIGGERBODY_H
physx::PxRigidActor * actor
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