PySide6.Qt3DRender.Qt3DRender.QPickTriangleEvent

class QPickTriangleEvent

当选择一个三角形时,QPickTriangleEvent 类保存相关信息。更多

PySide6.Qt3DRender.Qt3DRender.QPickTriangleEvent 的继承图

概要

属性

方法

注意

本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。

详细描述

当 QPickingSettings::pickMode() 设置为 TrianglePicking 时,QObjectPicker 上的信号将携带一个 QPickTriangleEvent 的实例。

这包含了被选中的三角形的详细信息。

注意

在索引渲染的情况下,点索引是相对于坐标数组的,而不是索引数组。

另请参阅

QPickingSettings QPickEvent QObjectPicker

注意

当使用from __feature__ import true_property时,属性可以直接使用,否则通过访问器函数使用。

property triangleIndexᅟ: int

指定事件的三角形索引

Access functions:
property uvwᅟ: QVector3D
Access functions:
property vertex1Indexᅟ: int

指定三角形中第一个顶点的索引

Access functions:
property vertex2Indexᅟ: int

指定三角形中第二个顶点的索引

Access functions:
property vertex3Indexᅟ: int

指定三角形中第三个顶点的索引

Access functions:
__init__()

构造一个新的 QPickEvent

__init__(position, worldIntersection, localIntersection, distance, triangleIndex, vertex1Index, vertex2Index, vertex3Index)
Parameters:
  • positionQPointF

  • worldIntersectionQVector3D

  • localIntersectionQVector3D

  • distance – 浮点数

  • triangleIndex – int

  • vertex1Index – int

  • vertex2Index – int

  • vertex3Index – int

*

QPickTriangleEvent 使用给定的参数构造一个新的 QPickEvent * position, * worldIntersection, * localIntersection, * distance, * triangleIndex, * vertex1Index, * vertex2Index 和 * vertex3Index

__init__(position, worldIntersection, localIntersection, distance, triangleIndex, vertex1Index, vertex2Index, vertex3Index, button, buttons, modifiers, uvw)
Parameters:
  • positionQPointF

  • worldIntersectionQVector3D

  • localIntersectionQVector3D

  • distance – 浮点数

  • triangleIndex – int

  • vertex1Index – int

  • vertex2Index – int

  • vertex3Index – int

  • button按钮

  • buttons – int

  • modifiers – int

  • uvwQVector3D

triangleIndex()
Return type:

整数

QPickTriangleEvent::triangleIndex 返回所选三角形的索引

属性 triangleIndexᅟ 的获取器。

uvw()
Return type:

QVector3D

返回3D坐标u、v和w。

属性 uvwᅟ 的获取器。

vertex1Index()
Return type:

整数

QPickTriangleEvent::vertex1Index 返回所选三角形的第一个点的索引

属性 vertex1Indexᅟ 的获取器。

vertex2Index()
Return type:

整数

QPickTriangleEvent::vertex2Index 返回所选三角形的第二个点的索引

属性 vertex2Indexᅟ 的获取器。

vertex3Index()
Return type:

整数

QPickTriangleEvent::vertex3Index 返回选中三角形的第三个点的索引

属性 vertex3Indexᅟ 的获取器。