QRayCaster Class
class Qt3DRender::QRayCasterQt3DRender::QRayCaster は、3Dワールド座標でレイキャスティングテストを実行するために使用されます。詳細...
ヘッダー | #include <QRayCaster> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake | QT += 3drender |
QML で | RayCaster |
を継承しています: | Qt3DRender::QAbstractRayCaster |
ステータス | 非推奨 |
プロパティ
パブリック機能
パブリックスロット
void | setDirection(const QVector3D &direction) |
void | setLength(float length) |
void | setOrigin(const QVector3D &origin) |
void | trigger() |
void | trigger(const QVector3D &origin, const QVector3D &direction, float length) |
シグナル
void | directionChanged(const QVector3D &direction) |
void | lengthChanged(float length) |
void | originChanged(const QVector3D &origin) |
詳細説明
3dレイは、その原点、方向、長さによって定義されます。それは、それが属するエンティティに適用される変換の影響を受けます。
コンポーネントが有効である限り、レイキャストテストは毎フレーム実行されます。ヒットプロパティは、交差のリストで更新されます。
QAbstractRayCaster 、QScreenRayCaster 、QNoPickingも参照してください 。
プロパティのドキュメント
direction : QVector3D
3Dレイの方向を保持します。単位ベクトルでなければならない。
アクセス関数:
QVector3D | direction() const |
void | setDirection(const QVector3D &direction) |
通知シグナル:
void | directionChanged(const QVector3D &direction) |
length : float
3D 光線の長さを保持します。
アクセス関数:
float | length() const |
void | setLength(float length) |
通知シグナル:
void | lengthChanged(float length) |
origin : QVector3D
3D 光線の原点をローカル座標で保持します。
アクセス関数:
QVector3D | origin() const |
void | setOrigin(const QVector3D &origin) |
通知シグナル:
void | originChanged(const QVector3D &origin) |
メンバ関数ドキュメント
[slot]
void QRayCaster::setLength(float length)
レイの長さをlength に設定します。
この値が 0 以下の場合、レイは無限とみなされます。
注意: プロパティlength のセッター関数です。
length()も参照してください 。
[slot]
void QRayCaster::trigger()
コンポーネントを有効にし、現在のレイを使用してテストをトリガするための便利なメソッド。
[slot]
void QRayCaster::trigger(const QVector3D &origin, const QVector3D &direction, float length)
レイの詳細origin 、direction 、length を設定し、コンポーネントがテストをトリガーできるようにするための便利なメソッド。
© 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.