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
qphysxgravity_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 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 PHYSXGRAVITY_H
6#define PHYSXGRAVITY_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
22
23class QAbstractPhysicsNode;
25
26// Applying a GravityField's gravity to one body. Called
27// once per frame, before the bodies are synced and the next step is simulated.
28namespace QPhysXGravity {
29
30// Contributes what `gravity` says at the body's position to it. A dynamic body
31// gets it as a force, so one that is asleep is woken only when `wake` says the
32// gravity is new to it; a character controller adds it to its own gravity.
33void apply(const QPhysicsGravity &gravity, QPhysicsGravity::Target target,
34 QAbstractPhysicsNode *node, QAbstractPhysXNode *backend, bool wake);
35
36// Wakes a dynamic body that a gravity has started acting on.
37void wake(QAbstractPhysicsNode *node, QAbstractPhysXNode *backend);
38
39} // namespace QPhysXGravity
40
41QT_END_NAMESPACE
42
43#endif
void apply(const QPhysicsGravity &gravity, QPhysicsGravity::Target target, QAbstractPhysicsNode *node, QAbstractPhysXNode *backend, bool wake)
void wake(QAbstractPhysicsNode *node, QAbstractPhysXNode *backend)
Combined button and popup list for selecting options.
static QT_BEGIN_NAMESPACE physx::PxRigidDynamic * simulatedActorOf(QAbstractPhysicsNode *node, QAbstractPhysXNode *backend)
#define QT_BEGIN_NAMESPACE
#define QT_END_NAMESPACE