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
QQuick3DPhysicsLocationHit Class Reference

#include <qquick3dphysicslocationhit_p.h>

Inheritance diagram for QQuick3DPhysicsLocationHit:
Collaboration diagram for QQuick3DPhysicsLocationHit:

Public Member Functions

 QQuick3DPhysicsLocationHit ()
 \qmlvaluetype locationHit \inqmlmodule QtQuick3D.Physics
 QQuick3DPhysicsLocationHit (const physx::PxLocationHit &hit, const physx::PxActorShape &actorShape)
 Q_REVISION (6, 13) QVector3D position() const
 Q_REVISION (6, 13) QVector3D normal() const
 Q_REVISION (6, 13) float distance() const
Public Member Functions inherited from QQuick3DPhysicsQueryHit
 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

QVector3D position
QVector3D normal
float distance
Properties inherited from QQuick3DPhysicsQueryHit
QAbstractPhysicsNode * body
QAbstractCollisionShape * shape

Detailed Description

Definition at line 27 of file qquick3dphysicslocationhit_p.h.

Constructor & Destructor Documentation

◆ QQuick3DPhysicsLocationHit() [1/2]

QT_BEGIN_NAMESPACE QQuick3DPhysicsLocationHit::QQuick3DPhysicsLocationHit ( )
default

\qmlvaluetype locationHit \inqmlmodule QtQuick3D.Physics

Since
6.13 \inherits queryHit

Holds positional and normal information for a physics query hit.

locationHit extends \l queryHit to provide detailed spatial data about an intersection, such as the exact hit point, surface normal, and distance.

This object is usually returned as a result of raycast or sweep queries in the physics scene.

\qmlproperty vector3d locationHit::position \readonly

Since
6.13

This property holds the world position of the intersection point.

\qmlproperty vector3d locationHit::normal \readonly

Since
6.13

This property holds the surface normal vector at the point of impact in world coordinates.

\qmlproperty real locationHit::distance \readonly

Since
6.13

This property holds the distance from the query ray/sweep origin to the intersection point.

Note
For sweep queries this is negative when the swept shape already overlapped the hit body at its starting position, and its magnitude is the penetration depth.

◆ QQuick3DPhysicsLocationHit() [2/2]

QQuick3DPhysicsLocationHit::QQuick3DPhysicsLocationHit ( const physx::PxLocationHit & hit,
const physx::PxActorShape & actorShape )
explicit

Definition at line 52 of file qquick3dphysicslocationhit.cpp.

Member Function Documentation

◆ Q_REVISION() [1/3]

QQuick3DPhysicsLocationHit::Q_REVISION ( 6 ,
13  ) const

◆ Q_REVISION() [2/3]

QQuick3DPhysicsLocationHit::Q_REVISION ( 6 ,
13  ) const

◆ Q_REVISION() [3/3]

QQuick3DPhysicsLocationHit::Q_REVISION ( 6 ,
13  ) const

Property Documentation

◆ distance

float QQuick3DPhysicsLocationHit::distance
read

Definition at line 35 of file qquick3dphysicslocationhit_p.h.

◆ normal

QVector3D QQuick3DPhysicsLocationHit::normal
read

Definition at line 34 of file qquick3dphysicslocationhit_p.h.

◆ position

QVector3D QQuick3DPhysicsLocationHit::position
read

Definition at line 33 of file qquick3dphysicslocationhit_p.h.


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