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
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
4#include "qplaneshape_p.h"
5
6#include <QtQuick3D/QQuick3DGeometry>
7#include <extensions/PxExtensionsAPI.h>
8
9//########################################################################################
10// NOTE:
11// Triangle mesh, heightfield or plane geometry shapes configured as eSIMULATION_SHAPE are
12// not supported for non-kinematic PxRigidDynamic instances.
13//########################################################################################
14
16
31QPlaneShape::QPlaneShape() = default;
32
34{
35 delete m_planeGeometry;
36}
37
39{
40 if (!m_planeGeometry) {
41 updatePhysXGeometry();
42 }
43 return m_planeGeometry;
44}
45
46void QPlaneShape::updatePhysXGeometry()
47{
48 delete m_planeGeometry;
49 // TODO: we need only one plane geometry, and it should live in the backend
50 m_planeGeometry = new physx::PxPlaneGeometry();
51}
52
QPlaneShape()
\qmltype PlaneShape \inqmlmodule QtQuick3D.Physics \inherits CollisionShape
physx::PxGeometry * getPhysXGeometry() override
Combined button and popup list for selecting options.