Qt3DRender::QPickTriangleEvent Class

class Qt3DRender::QPickTriangleEvent

QPickTriangleEvent 类用于保存选取三角形时的信息。更多

头文件: #include <QPickTriangleEvent>
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

返回三维坐标 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 的获取函数。

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