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
qphysicsmaterial_p.h
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
#
ifndef
QPHYSICSMATERIAL_H
6
#
define
QPHYSICSMATERIAL_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
19
#
include
<
QtQuick3DPhysics
/
qtquick3dphysicsglobal
.
h
>
20
#
include
<
QtQml
/
QQmlEngine
>
21
22
QT_BEGIN_NAMESPACE
23
24
class
Q_QUICK3DPHYSICS_EXPORT
QPhysicsMaterial
:
public
QObject
25
{
26
Q_OBJECT
27
Q_PROPERTY(
float
staticFriction READ staticFriction WRITE setStaticFriction NOTIFY
28
staticFrictionChanged)
29
Q_PROPERTY(
float
dynamicFriction READ dynamicFriction WRITE setDynamicFriction NOTIFY
30
dynamicFrictionChanged)
31
Q_PROPERTY(
float
restitution READ restitution WRITE setRestitution NOTIFY restitutionChanged)
32
QML_NAMED_ELEMENT(PhysicsMaterial)
33
public
:
34
explicit
QPhysicsMaterial(QObject *parent =
nullptr
);
35
36
float
staticFriction()
const
;
37
void
setStaticFriction(
float
staticFriction);
38
39
float
dynamicFriction()
const
;
40
void
setDynamicFriction(
float
dynamicFriction);
41
42
float
restitution()
const
;
43
void
setRestitution(
float
restitution);
44
45
static
constexpr
float
defaultStaticFriction = 0.5f;
46
static
constexpr
float
defaultDynamicFriction = 0.5f;
47
static
constexpr
float
defaultRestitution = 0.5f;
48
49
Q_SIGNALS:
50
void
staticFrictionChanged();
51
void
dynamicFrictionChanged();
52
void
restitutionChanged();
53
54
private
:
55
float
m_staticFriction = defaultStaticFriction;
56
float
m_dynamicFriction = defaultDynamicFriction;
57
float
m_restitution = defaultRestitution;
58
};
59
60
QT_END_NAMESPACE
61
62
#
endif
// QPHYSICSMATERIAL_H
QAbstractPhysXNode
Definition
qabstractphysxnode_p.h:58
QAbstractPhysXNode::updateDefaultDensity
virtual void updateDefaultDensity(float density)
Definition
qabstractphysxnode.cpp:49
QAbstractPhysXNode::frontendNode
QAbstractPhysicsNode * frontendNode
Definition
qabstractphysxnode_p.h:98
QAbstractPhysXNode::filtersDirty
bool filtersDirty() const
Definition
qabstractphysxnode.cpp:156
QAbstractPhysXNode::cleanup
virtual void cleanup(QPhysXWorld *)
Definition
qabstractphysxnode.cpp:118
QAbstractPhysXNode::material
physx::PxMaterial * material
Definition
qabstractphysxnode_p.h:95
QAbstractPhysXNode::rebuildDirtyShapes
virtual void rebuildDirtyShapes(QPhysicsWorld *, QPhysXWorld *)
Definition
qabstractphysxnode.cpp:114
QAbstractPhysXNode::shapesDirty
bool shapesDirty() const
Definition
qabstractphysxnode.cpp:146
QAbstractPhysXNode::materialProperties
PhysicsMaterialProperties materialProperties
Definition
qabstractphysxnode_p.h:97
QAbstractPhysXNode::setShapesDirty
void setShapesDirty(bool dirty)
Definition
qabstractphysxnode.cpp:151
QAbstractPhysXNode::debugGeometryCapability
virtual bool debugGeometryCapability()
Definition
qabstractphysxnode.cpp:126
QAbstractPhysXNode::updateFilters
virtual void updateFilters()
Definition
qabstractphysxnode.cpp:116
QAbstractPhysXNode::~QAbstractPhysXNode
virtual ~QAbstractPhysXNode()
Definition
qabstractphysxnode.cpp:29
QAbstractPhysXNode::getGlobalPose
virtual physx::PxTransform getGlobalPose()
Definition
qabstractphysxnode.cpp:131
QAbstractPhysXNode::updateMaterial
bool updateMaterial()
Definition
qabstractphysxnode.cpp:66
QAbstractPhysXNode::releaseMaterial
void releaseMaterial()
Definition
qabstractphysxnode.cpp:96
QAbstractPhysXNode::isRemoved
bool isRemoved
Definition
qabstractphysxnode_p.h:99
QAbstractPhysXNode::markDirtyShapes
virtual void markDirtyShapes()
Definition
qabstractphysxnode.cpp:112
QAbstractPhysXNode::getDebugDrawBodyType
virtual DebugDrawBodyType getDebugDrawBodyType()
Definition
qabstractphysxnode.cpp:141
QAbstractPhysXNode::qtMaterial
virtual QPhysicsMaterial * qtMaterial() const
Definition
qabstractphysxnode.cpp:61
QAbstractPhysXNode::setFiltersDirty
void setFiltersDirty(bool dirty)
Definition
qabstractphysxnode.cpp:161
QAbstractPhysXNode::detachFrontend
virtual void detachFrontend()
Definition
qabstractphysxnode.cpp:167
QAbstractPhysXNode::cleanupIfRemoved
bool cleanupIfRemoved(QPhysXWorld *physX)
Definition
qabstractphysxnode.cpp:39
QAbstractPhysXNode::useTriggerFlag
virtual bool useTriggerFlag()
Definition
qabstractphysxnode.cpp:136
QPhysXWorld
Definition
qphysxworld_p.h:33
QPhysicsMaterial
Definition
qphysicsmaterial_p.h:25
physx
Definition
qphysxactorbody_p.h:22
physx::PxTransform
PxTransformT< float > PxTransform
Definition
qabstractphysicsnode_p.h:28
PHYSX_RELEASE
#define PHYSX_RELEASE(x)
Definition
qabstractphysxnode.cpp:15
propertiesFor
static PhysicsMaterialProperties propertiesFor(const QPhysicsMaterial *qtMaterial)
Definition
qabstractphysxnode.cpp:51
DebugDrawBodyType
DebugDrawBodyType
Definition
qabstractphysxnode_p.h:42
DebugDrawBodyType::Unknown
@ Unknown
Definition
qabstractphysxnode_p.h:48
QT_BEGIN_NAMESPACE
#define QT_BEGIN_NAMESPACE
Definition
qtconfigmacros.h:161
QT_END_NAMESPACE
#define QT_END_NAMESPACE
Definition
qtconfigmacros.h:162
PhysicsMaterialProperties
Definition
qstaticphysxobjects_p.h:40
PhysicsMaterialProperties::dynamicFriction
float dynamicFriction
Definition
qstaticphysxobjects_p.h:42
PhysicsMaterialProperties::operator==
friend bool operator==(const PhysicsMaterialProperties &lhs, const PhysicsMaterialProperties &rhs) noexcept
Definition
qstaticphysxobjects_p.h:49
PhysicsMaterialProperties::staticFriction
float staticFriction
Definition
qstaticphysxobjects_p.h:41
PhysicsMaterialProperties::restitution
float restitution
Definition
qstaticphysxobjects_p.h:43
PhysicsMaterialProperties::none
static constexpr PhysicsMaterialProperties none()
Definition
qstaticphysxobjects_p.h:47
SharedPhysicsMaterial
Definition
qstaticphysxobjects_p.h:65
SharedPhysicsMaterial::nodeCount
int nodeCount
Definition
qstaticphysxobjects_p.h:67
SharedPhysicsMaterial::material
physx::PxMaterial * material
Definition
qstaticphysxobjects_p.h:66
StaticPhysXObjects
Definition
qstaticphysxobjects_p.h:71
StaticPhysXObjects::getReference
static StaticPhysXObjects & getReference()
Definition
qstaticphysxobjects.cpp:14
StaticPhysXObjects::physics
physx::PxPhysics * physics
Definition
qstaticphysxobjects_p.h:75
qtquick3dphysics
src
quick3dphysics
qphysicsmaterial_p.h
Generated on
for Qt by
1.18.0