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
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
8
9#include "PxRigidActor.h"
10
12
13QPhysXTriggerBody::QPhysXTriggerBody(QTriggerBody *frontEnd) : QPhysXActorBody(frontEnd) { }
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
physx::PxRigidActor * actor
QPhysXTriggerBody(QTriggerBody *frontEnd)
DebugDrawBodyType getDebugDrawBodyType() override
void sync(float deltaTime, QHash< QQuick3DNode *, QMatrix4x4 > &transformCache) override
DebugDrawBodyType
#define QT_BEGIN_NAMESPACE
#define QT_END_NAMESPACE