Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qphysxtriggerbody.cpp
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
5
6#include "qphysicsutils_p.h"
7#include "qtriggerbody_p.h"
8
9#include "PxRigidActor.h"
10
12
14
19
20void QPhysXTriggerBody::sync(float /*deltaTime*/,
21 QHash<QQuick3DNode *, QMatrix4x4> & /*transformCache*/)
22{
23 auto *triggerBody = static_cast<QTriggerBody *>(frontendNode);
24 const physx::PxTransform trf = QPhysicsUtils::toPhysXTransform(triggerBody->scenePosition(),
25 triggerBody->sceneRotation());
26 actor->setGlobalPose(trf);
27}
28
QAbstractPhysicsNode * frontendNode
physx::PxRigidActor * actor
QPhysXTriggerBody(QTriggerBody *frontEnd)
DebugDrawBodyType getDebugDrawBodyType() override
void sync(float deltaTime, QHash< QQuick3DNode *, QMatrix4x4 > &transformCache) override
Q_ALWAYS_INLINE physx::PxTransform toPhysXTransform(const QVector3D &position, const QQuaternion &rotation)
Combined button and popup list for selecting options.
DebugDrawBodyType