19#include <QtQuick3DPhysics/qtquick3dphysicsglobal.h>
20#include <QtQuick3DPhysics/private/qabstractcollisionshape_p.h>
21#include <QtQml/QQmlEngine>
24class PxCapsuleGeometry;
29class Q_QUICK3DPHYSICS_EXPORT
QCapsuleShape :
public QAbstractCollisionShape
32 QML_NAMED_ELEMENT(CapsuleShape)
33 Q_PROPERTY(
float diameter READ diameter WRITE setDiameter NOTIFY diameterChanged)
34 Q_PROPERTY(
float height READ height WRITE setHeight NOTIFY heightChanged)
39 float diameter()
const;
40 void setDiameter(
float newDiameter);
43 void setHeight(
float newHeight);
45 physx::PxGeometry *getPhysXGeometry() override;
46 bool isStaticShape()
const override {
return false; }
49 void diameterChanged();
53 void updatePhysXGeometry();
54 physx::PxCapsuleGeometry *m_physXGeometry =
nullptr;
55 float m_diameter = 100.0f;
56 float m_height = 100.0f;
virtual void cleanup(QPhysXWorld *)
void createMaterialFromQtMaterial(QPhysXWorld *physX, QPhysicsMaterial *qtMaterial)
QPhysXCharacterController(QCharacterController *frontEnd)
bool debugGeometryCapability() override
DebugDrawBodyType getDebugDrawBodyType() override
void init(QPhysicsWorld *world, QPhysXWorld *physX) override
void cleanup(QPhysXWorld *physX) override
void createMaterial(QPhysXWorld *physX) override
void sync(float deltaTime, QHash< QQuick3DNode *, QMatrix4x4 > &transformCache) override
#define QT_BEGIN_NAMESPACE