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
4
#include "
qphysxtriggerbody_p.h
"
5
6
#include "
qphysicsutils_p.h
"
7
#include "
qtriggerbody_p.h
"
8
9
#include "PxRigidActor.h"
10
11
QT_BEGIN_NAMESPACE
12
13
QPhysXTriggerBody::QPhysXTriggerBody
(
QTriggerBody
*frontEnd) :
QPhysXActorBody
(frontEnd) { }
14
15
DebugDrawBodyType
QPhysXTriggerBody::getDebugDrawBodyType
()
16
{
17
return
DebugDrawBodyType::Trigger
;
18
}
19
20
void
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
29
QT_END_NAMESPACE
QAbstractPhysXNode::frontendNode
QAbstractPhysicsNode * frontendNode
Definition
qabstractphysxnode_p.h:88
QPhysXActorBody
Definition
qphysxactorbody_p.h:28
QPhysXActorBody::actor
physx::PxRigidActor * actor
Definition
qphysxactorbody_p.h:43
QPhysXTriggerBody::QPhysXTriggerBody
QPhysXTriggerBody(QTriggerBody *frontEnd)
Definition
qphysxtriggerbody.cpp:13
QPhysXTriggerBody::getDebugDrawBodyType
DebugDrawBodyType getDebugDrawBodyType() override
Definition
qphysxtriggerbody.cpp:15
QPhysXTriggerBody::sync
void sync(float deltaTime, QHash< QQuick3DNode *, QMatrix4x4 > &transformCache) override
Definition
qphysxtriggerbody.cpp:20
QTriggerBody
Definition
qtriggerbody_p.h:25
QPhysicsUtils::toPhysXTransform
Q_ALWAYS_INLINE physx::PxTransform toPhysXTransform(const QVector3D &position, const QQuaternion &rotation)
Definition
qphysicsutils_p.h:56
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
DebugDrawBodyType
DebugDrawBodyType
Definition
qabstractphysxnode_p.h:38
DebugDrawBodyType::Trigger
@ Trigger
qphysicsutils_p.h
qphysxtriggerbody_p.h
qtriggerbody_p.h
qtquick3dphysics
src
quick3dphysics
physxnode
qphysxtriggerbody.cpp
Generated by
1.10.0