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
qphysxcharactercontroller_p.h
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// Qt-Security score:significant reason:default
4
5#ifndef PHYSXCHARACTERCONTROLLER_H
6#define PHYSXCHARACTERCONTROLLER_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
20#include "qtconfigmacros.h"
21
22namespace physx {
23class PxCapsuleController;
24}
25
27
28class QCharacterController;
31
33{
34public:
35 QPhysXCharacterController(QCharacterController *frontEnd);
36 void cleanup(QPhysXWorld *physX) override;
37 void init(QPhysicsWorld *world, QPhysXWorld *physX) override;
38 void sync(float deltaTime, QHash<QQuick3DNode *, QMatrix4x4> &transformCache) override;
39 QPhysicsMaterial *qtMaterial() const override;
40 bool debugGeometryCapability() override;
42 void detachFrontend() override;
43 void updateFilters(QPhysXWorld *physX) override;
44
45private:
46 void applyFilterData();
47
48 physx::PxCapsuleController *controller = nullptr;
49 ControllerCallback *reportCallback = nullptr;
50 ControllerFilter *filter = nullptr;
51};
52
54
55#endif
void onShapeHit(const physx::PxControllerShapeHit &hit) override
void onControllerHit(const physx::PxControllersHit &) override
ControllerCallback(QPhysicsWorld *worldIn)
void onObstacleHit(const physx::PxControllerObstacleHit &) override
physx::PxQueryHitType::Enum preFilter(const physx::PxFilterData &, const physx::PxShape *shape, const physx::PxRigidActor *, physx::PxHitFlags &) override
physx::PxQueryHitType::Enum postFilter(const physx::PxFilterData &, const physx::PxQueryHit &, const physx::PxShape *, const physx::PxRigidActor *) override
bool filter(const physx::PxController &a, const physx::PxController &b) override
virtual void cleanup(QPhysXWorld *)
void setFiltersDirty(bool dirty)
virtual void detachFrontend()
QPhysXCharacterController(QCharacterController *frontEnd)
QPhysicsMaterial * qtMaterial() const override
DebugDrawBodyType getDebugDrawBodyType() override
void init(QPhysicsWorld *world, QPhysXWorld *physX) override
void cleanup(QPhysXWorld *physX) override
void updateFilters(QPhysXWorld *physX) override
void sync(float deltaTime, QHash< QQuick3DNode *, QMatrix4x4 > &transformCache) override
#define PHYSX_RELEASE(x)
DebugDrawBodyType
static float resolveStepOffset(float maximumStepHeight, float height, float radius, float current=-1.f)
static float toPhysXSlopeLimit(float degrees)
static physx::PxShape * shapeOf(const physx::PxController &controller)
#define QT_BEGIN_NAMESPACE
#define QT_END_NAMESPACE