Qt3DRender::QPickTriangleEvent Class
class Qt3DRender::QPickTriangleEventQPickTriangleEvent 类用于存储选择三角形时的相关信息。更多内容...
| 头文件: | #include <qpicktriangleevent.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| 在 QML 中: | PickTriangleEvent |
| 继承自: | Qt3DRender::QPickEvent |
| 状态: | 已弃用 |
该类已弃用。我们强烈建议不要在新代码中使用它。
属性
|
|
公共函数
| QPickTriangleEvent() | |
| QPickTriangleEvent(const QPointF &position, const QVector3D &worldIntersection, const QVector3D &localIntersection, float distance, uint triangleIndex, uint vertex1Index, uint vertex2Index, uint vertex3Index) | |
| uint | triangleIndex() const |
| QVector3D | uvw() const |
| uint | vertex1Index() const |
| uint | vertex2Index() const |
| uint | vertex3Index() const |
详细说明
当 QPickingSettings::pickMode() 设置为QPickingSettings::TrianglePicking 时,QObjectPicker 上的信号将传递一个 QPickTriangleEvent 实例。
该对象包含被选中的三角形的详细信息。
注意:在 索引渲染的情况下,点索引是相对于坐标数组的,而不是相对于索引数组的。
另请参见 QPickingSettings 、QPickEvent 和QObjectPicker 。
属性文档
[read-only] triangleIndex : const uint
指定事件的三角形索引
访问函数:
| uint | triangleIndex() const |
[read-only] uvw : const QVector3D
访问功能:
| QVector3D | uvw() const |
[read-only] vertex1Index : const uint
指定三角形中第一个顶点的索引
访问函数:
| uint | vertex1Index() const |
[read-only] vertex2Index : const uint
指定三角形中第二个顶点的索引
访问函数:
| uint | vertex2Index() const |
[read-only] vertex3Index : const uint
指定三角形中第三个顶点的索引
访问函数:
| uint | vertex3Index() const |
成员函数文档
QPickTriangleEvent::QPickTriangleEvent()
创建一个新的 QPickEvent。
QPickTriangleEvent::QPickTriangleEvent(const QPointF &position, const QVector3D &worldIntersection, const QVector3D &localIntersection, float distance, uint triangleIndex, uint vertex1Index, uint vertex2Index, uint vertex3Index)
*
QPickTriangleEvent::QPickTriangleEvent 使用给定的参数 *position 、 *worldIntersection 、 *localIntersection 、 *distance 、 *triangleIndex 、 *vertex1Index 、 *vertex2Index 和 * 构建一个新的 QPickEvent *vertex3Index
uint QPickTriangleEvent::triangleIndex() const
QPickTriangleEvent::triangleIndex 返回所选三角形的索引
注意: 这是属性 triangleIndex 的获取 函数。
QVector3D QPickTriangleEvent::uvw() const
返回 3D 坐标 u、v 和 w。
注意: 这是属性 uvw 的获取 函数。
uint QPickTriangleEvent::vertex1Index() const
QPickTriangleEvent::vertex1Index 返回所选三角形中第一个顶点的索引
注: 这是属性 vertex1Index 的获取 函数。
uint QPickTriangleEvent::vertex2Index() const
QPickTriangleEvent::vertex2Index 返回所选三角形中第二个顶点的索引
注意: 这是属性 vertex2Index 的获取 函数。
uint QPickTriangleEvent::vertex3Index() const
QPickTriangleEvent::vertex3Index 返回所选三角形中第三个顶点的索引
注: 这是属性 vertex3Index 的获取 函数。
© 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.