Qt3DRender::QScreenRayCaster Class
class Qt3DRender::QScreenRayCaster基于屏幕坐标的 Performe 射线铸造测试。更多
头文件: | #include <QScreenRayCaster> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake: | QT += 3drender |
在 QML 中: | ScreenRayCaster |
继承: | Qt3DRender::QAbstractRayCaster |
状态: | 已废弃 |
属性
- position : QPoint
公共功能
QPoint | position() const |
公共插槽
void | setPosition(const QPoint &position) |
void | trigger() |
void | trigger(const QPoint &position) |
信号
void | positionChanged(const QPoint &position) |
另请参阅 QRayCaster 和QNoPicking 。
属性文档
position : QPoint
保存屏幕空间位置,用于计算交集测试的实际 3D 射线。
注意:只要坐标在有效范围内,每个可用的渲染表面都将使用该坐标。
访问功能:
QPoint | position() const |
void | setPosition(const QPoint &position) |
Notifier 信号:
void | positionChanged(const QPoint &position) |
成员函数 文档
[slot]
void QScreenRayCaster::trigger()
使用当前坐标值启用组件并触发测试的方便方法。
注: 此槽已超载。要连接到此槽:
// Connect using qOverload: connect(screenRayCaster, qOverload<>(&QScreenRayCaster::trigger), receiver, &ReceiverClass::slot); // Or using a lambda: connect(screenRayCaster, qOverload<>(&QScreenRayCaster::trigger), this, []() { /* handle trigger */ });
[slot]
void QScreenRayCaster::trigger(const QPoint &position)
方便方法,用于设置坐标值position 并使组件触发测试。
注: 此槽已超载。要连接到此槽,请使用
// Connect using qOverload: connect(screenRayCaster, qOverload(&QScreenRayCaster::trigger), receiver, &ReceiverClass::slot); // Or using a lambda: connect(screenRayCaster, qOverload (&QScreenRayCaster::trigger), this, [](const QPoint &position) { /* handle trigger */ });
© 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.