本页内容

Qt3DRender::QPickingProxy Class

class Qt3DRender::QPickingProxy

可用于提供一个仅用于选取操作的备用 QGeometryView。更多内容...

头文件: #include <qpickingproxy.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
自: Qt 6.0
在 QML 中: PickingProxy
继承自: Qt3DCore::QBoundingVolume
状态: 已弃用

该类已弃用。我们强烈建议在新代码中避免使用它。

公共函数

QPickingProxy(Qt3DCore::QNode *parent = nullptr)

详细说明

选择操作可能非常耗时,特别是当网格包含大量顶点时。可以使用 QPickProxy 提供一种替代几何体(通常包含较少的基元),该几何体将用于选择操作,而GeometryRenderer 实例则用于渲染。

注意: 如果应用程序要求拾取坐标与渲染的网格相匹配,请 勿使用 QPickingProxy。

注意: 拾取算法 使用边界体层次结构,以优化剔除那些边界体与拾取光线不相交的实体。对于该层次结构,将使用渲染实体的边界体(或使用 QBoundingVolume 组件显式设置的边界体),而非代理的边界体。

成员函数文档

[explicit] QPickingProxy::QPickingProxy(Qt3DCore::QNode *parent = nullptr)

使用parent 创建一个新的QPickingProxy。

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