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
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
QPhysXActorBody
Definition
qphysxactorbody_p.h:28
QPhysXActorBody::actor
physx::PxRigidActor * actor
Definition
qphysxactorbody_p.h:43
QPhysXTriggerBody
Definition
qphysxtriggerbody_p.h:26
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
physx
Definition
qabstractphysxnode_p.h:23
DebugDrawBodyType
DebugDrawBodyType
Definition
qabstractphysxnode_p.h:38
DebugDrawBodyType::Trigger
@ Trigger
Definition
qabstractphysxnode_p.h:42
QT_BEGIN_NAMESPACE
#define QT_BEGIN_NAMESPACE
Definition
qtconfigmacros.h:160
QT_END_NAMESPACE
#define QT_END_NAMESPACE
Definition
qtconfigmacros.h:161
qtquick3dphysics
src
quick3dphysics
physxnode
qphysxtriggerbody.cpp
Generated on
for Qt by
1.14.0