QRayCasterHit Class

class Qt3DRender::QRayCasterHit

Details of a hit when casting a ray through a model. More...

Header: #include <QRayCasterHit>
qmake: QT += 3drender
Since: Qt 5.11

This class was introduced in Qt 5.11.

Public Types

enum HitType { TriangleHit, LineHit, PointHit, EntityHit }

Detailed Description

Qt3DRender::QRayCasterHit contains the details of a successful hit when casting a ray through a model using a Qt3DRender::QRayCaster or Qt3DRender::QScreenRayCaster component.

See also Qt3DRender::QRayCaster, Qt3DRender::QScreenRayCaster, and Qt3DRender::QPickingSettings.

Member Type Documentation

enum QRayCasterHit::HitType

Specifies type of hit that was returned. This is controlled using QPickingSettings.

ConstantValueDescription
Qt3DRender::QRayCasterHit::TriangleHit0The picked primitive was a triangle and the vertex indices refer to the three points making up the triangle
Qt3DRender::QRayCasterHit::LineHit1The picked primitive was a line segment, and the first two vertices refer to the two points making up the line
Qt3DRender::QRayCasterHit::PointHit2The picked primitive was a single point; all 3 vertex indices will be undefined
Qt3DRender::QRayCasterHit::EntityHit3Only the bounding volume was considered; the primitive and vertex indices will be undefined