12#include "PxMaterial.h"
15#define PHYSX_RELEASE(x)
25 Q_ASSERT(node->m_backendObject ==
nullptr);
26 node->m_backendObject =
this;
54 return { QPhysicsMaterial::defaultStaticFriction, QPhysicsMaterial::defaultDynamicFriction,
55 QPhysicsMaterial::defaultRestitution };
57 return { qtMaterial->staticFriction(), qtMaterial->dynamicFriction(),
58 qtMaterial->restitution() };
79 shared
.material = s_physx.physics->createMaterial(
84 qWarning() <<
"QtQuick3DPhysics: could not create physics material, the body will "
85 "not take part in collisions.";
86 s_physx.materials.remove(properties);
103 if (it != materials.end() && it->material ==
material && --it->nodeCount == 0) {
105 it->material->release();
120 for (
auto *shape : std::as_const(shapes))
virtual void updateDefaultDensity(float density)
QAbstractPhysicsNode * frontendNode
bool filtersDirty() const
virtual void cleanup(QPhysXWorld *)
physx::PxMaterial * material
virtual void rebuildDirtyShapes(QPhysicsWorld *, QPhysXWorld *)
PhysicsMaterialProperties materialProperties
void setShapesDirty(bool dirty)
virtual bool debugGeometryCapability()
virtual void updateFilters()
virtual ~QAbstractPhysXNode()
virtual physx::PxTransform getGlobalPose()
virtual void markDirtyShapes()
virtual DebugDrawBodyType getDebugDrawBodyType()
virtual QPhysicsMaterial * qtMaterial() const
void setFiltersDirty(bool dirty)
bool cleanupIfRemoved(QPhysXWorld *physX)
virtual bool useTriggerFlag()
static PhysicsMaterialProperties propertiesFor(const QPhysicsMaterial *qtMaterial)
#define QT_BEGIN_NAMESPACE
friend bool operator==(const PhysicsMaterialProperties &lhs, const PhysicsMaterialProperties &rhs) noexcept
static constexpr PhysicsMaterialProperties none()
physx::PxMaterial * material
static StaticPhysXObjects & getReference()