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
状态:已废弃

属性

公共功能

QPoint position() const

公共插槽

void setPosition(const QPoint &position)
void trigger()
void trigger(const QPoint &position)

信号

void positionChanged(const QPoint &position)

详细说明

QScreenRayCaster 可通过指定屏幕空间中的坐标来执行光线投射测试,这些坐标将用于在近平面和远平面之间构建实际的 3D 光线。

另请参阅 QRayCasterQNoPicking

属性文档

position : QPoint

保存屏幕空间位置,用于计算交集测试的实际 3D 射线。

注意:只要坐标在有效范围内,每个可用的渲染曲面都会使用这些坐标。

访问功能:

QPoint position() const
void setPosition(const QPoint &position)

Notifier 信号:

void positionChanged(const QPoint &position)

成员函数 文档

[slot] void QScreenRayCaster::trigger()

便捷方法,用于启用组件并使用当前坐标值触发测试。

[slot] void QScreenRayCaster::trigger(const QPoint &position)

方便的方法,用于设置坐标值position 并使组件能够触发测试。

© 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.