QRayCasterHit Class

class Qt3DRender::QRayCasterHit

モデルを通してレイをキャストする際のヒットの詳細。詳細...

ヘッダー #include <QRayCasterHit>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
ステータス非推奨

パブリックな型

enum HitType { TriangleHit, LineHit, PointHit, EntityHit }

パブリック関数

float distance() const
Qt3DCore::QEntity *entity() const
Qt3DCore::QNodeId entityId() const
QVector3D localIntersection() const
uint primitiveIndex() const
Qt3DRender::QRayCasterHit::HitType type() const
uint vertex1Index() const
uint vertex2Index() const
uint vertex3Index() const
QVector3D worldIntersection() const

詳細な説明

Qt3DRender::QRayCasterHit Qt3DRender::QRayCaster または コンポーネントを使用してモデルを通してレイをキャストしたときに、ヒットに成功した詳細を含みます。Qt3DRender::QScreenRayCaster

Qt3DRender::QRayCasterQt3DRender::QScreenRayCasterQt3DRender::QPickingSettingsも参照して ください。

メンバ型のドキュメント

enum QRayCasterHit::HitType

返されたヒットのタイプを指定する。これはQPickingSettings を使用して制御します。

定数説明
Qt3DRender::QRayCasterHit::TriangleHit0ピックされたプリミティブが三角形で、頂点インデックスが三角形を構成する3点を指す。
Qt3DRender::QRayCasterHit::LineHit1選択されたプリミティブは線分であり、最初の2つの頂点は線を構成する2つの点を指します。
Qt3DRender::QRayCasterHit::PointHit2ピックしたプリミティブは1点で、3つの頂点インデックスはすべて未定義になります。
Qt3DRender::QRayCasterHit::EntityHit3プリミティブと頂点のインデックスは未定義になります。

メンバ関数ドキュメント

float QRayCasterHit::distance() const

レイの原点から交点までの距離を返します。

注意: 距離プロパティのゲッター関数です。

Qt3DCore::QEntity *QRayCasterHit::entity() const

ヒットしたエンティティへのポインタを返します。

注: プロパティ・エンティティのゲッター関数。

Qt3DCore::QNodeId QRayCasterHit::entityId() const

ヒットしたエンティティの ID を返します。

注: プロパティentityIdのゲッター関数です。

QVector3D QRayCasterHit::localIntersection() const

エンティティの座標系における交点の座標を返す。

注: プロパティ localIntersection のゲッター関数です。

uint QRayCasterHit::primitiveIndex() const

ピックしたプリミティブのインデックスを返します。

注: primitiveIndexプロパティのゲッター関数です。

Qt3DRender::QRayCasterHit::HitType QRayCasterHit::type() const

ヒットのタイプを返す

注: プロパティタイプのゲッター関数です。

uint QRayCasterHit::vertex1Index() const

ピックしたプリミティブの最初の頂点のインデックスを返します。

注: プロパティ vertex1Index のゲッター関数です。

uint QRayCasterHit::vertex2Index() const

ピックしたプリミティブの2番目の頂点のインデックスを返します。

注: プロパティ vertex2Index のゲッター関数です。

uint QRayCasterHit::vertex3Index() const

ピックしたプリミティブの3番目の頂点のインデックスを返します。

注: プロパティ vertex3Index のゲッター関数です。

QVector3D QRayCasterHit::worldIntersection() const

モデルの座標系における交点の座標を返す。

注: プロパティ worldIntersection のゲッター関数です。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.