Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QQuick3DPhysicsQueryHit Class Reference

#include <qquick3dphysicsqueryhit_p.h>

Inheritance diagram for QQuick3DPhysicsQueryHit:
Collaboration diagram for QQuick3DPhysicsQueryHit:

Public Member Functions

 QQuick3DPhysicsQueryHit ()
 \qmlvaluetype queryHit \inqmlmodule QtQuick3D.Physics
 QQuick3DPhysicsQueryHit (const physx::PxQueryHit &hit, const physx::PxActorShape &actorShape)
 Q_REVISION (6, 13) QAbstractPhysicsNode *body() const
 Q_REVISION (6, 13) QAbstractCollisionShape *shape() const

Properties

QAbstractPhysicsNode * body
QAbstractCollisionShape * shape

Detailed Description

Definition at line 34 of file qquick3dphysicsqueryhit_p.h.

Constructor & Destructor Documentation

◆ QQuick3DPhysicsQueryHit() [1/2]

QT_BEGIN_NAMESPACE QQuick3DPhysicsQueryHit::QQuick3DPhysicsQueryHit ( )
default

\qmlvaluetype queryHit \inqmlmodule QtQuick3D.Physics

Since
6.13

Represents the result of a spatial physics query hit (raycast, sweep, or overlap).

The queryHit struct provides hit information returned by spatial queries in the physics world.

See also
PhysicsNode, CollisionShape

\qmlproperty PhysicsNode queryHit::body \readonly

Since
6.13

Holds the physical body (PhysicsNode) intersected by the spatial query.

\qmlproperty CollisionShape queryHit::shape \readonly

Since
6.13

Holds the specific collision shape (CollisionShape) intersected by the spatial query. Returns null if the underlying PhysX shape has no associated Qt collision shape.

Note
When a query intersects a \l CharacterController, the body property is populated, but the shape property will be null because character controllers do not assign individual shape metadata.

◆ QQuick3DPhysicsQueryHit() [2/2]

QQuick3DPhysicsQueryHit::QQuick3DPhysicsQueryHit ( const physx::PxQueryHit & hit,
const physx::PxActorShape & actorShape )
explicit

Definition at line 46 of file qquick3dphysicsqueryhit.cpp.

Member Function Documentation

◆ Q_REVISION() [1/2]

QQuick3DPhysicsQueryHit::Q_REVISION ( 6 ,
13  ) const

◆ Q_REVISION() [2/2]

QQuick3DPhysicsQueryHit::Q_REVISION ( 6 ,
13  ) const

Property Documentation

◆ body

QAbstractPhysicsNode * QQuick3DPhysicsQueryHit::body
read

Definition at line 40 of file qquick3dphysicsqueryhit_p.h.

◆ shape

QAbstractCollisionShape * QQuick3DPhysicsQueryHit::shape
read

Definition at line 41 of file qquick3dphysicsqueryhit_p.h.


The documentation for this class was generated from the following files: