Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qplaneshape.cpp
Go to the documentation of this file.
1
// Copyright (C) 2021 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
#
include
"qplaneshape_p.h"
6
7
#
include
<
QtQuick3D
/
QQuick3DGeometry
>
8
#
include
<
extensions
/
PxExtensionsAPI
.
h
>
9
10
//########################################################################################
11
// NOTE:
12
// Triangle mesh, heightfield or plane geometry shapes configured as eSIMULATION_SHAPE are
13
// not supported for non-kinematic PxRigidDynamic instances.
14
//########################################################################################
15
16
QT_BEGIN_NAMESPACE
17
18
/*!
19
\qmltype PlaneShape
20
\inqmlmodule QtQuick3D.Physics
21
\inherits CollisionShape
22
\since 6.4
23
\brief A collision shape that defines an infinite plane.
24
25
The PlaneShape type defines an infinite plane. The plane divides space into "above" and "below"
26
it. Everything "below" the plane will collide with it and be pushed above it. The orientation of
27
the plane is vertical: The Plane lies on the XY plane with "above" pointing sideways towards positive Z.
28
29
PlaneShape can only be used with \l StaticRigidBody and \l {DynamicRigidBody::isKinematic}{kinematic bodies}.
30
*/
31
32
QPlaneShape::QPlaneShape() =
default
;
33
34
QPlaneShape::~QPlaneShape()
35
{
36
delete
m_planeGeometry;
37
}
38
39
physx::PxGeometry *QPlaneShape::getPhysXGeometry()
40
{
41
if
(!m_planeGeometry) {
42
updatePhysXGeometry();
43
}
44
return
m_planeGeometry;
45
}
46
47
void
QPlaneShape::updatePhysXGeometry()
48
{
49
delete
m_planeGeometry;
50
// TODO: we need only one plane geometry, and it should live in the backend
51
m_planeGeometry =
new
physx::PxPlaneGeometry();
52
}
53
54
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtquick3dphysics
src
quick3dphysics
qplaneshape.cpp
Generated on
for Qt by
1.18.0