QRayCasterHit¶
Details of a hit when casting a ray through a model. More…
New in version 5.11.
Synopsis¶
Functions¶
def
distance
()def
entity
()def
entityId
()def
localIntersection
()def
primitiveIndex
()def
toString
()def
type
()def
vertex1Index
()def
vertex2Index
()def
vertex3Index
()def
worldIntersection
()
Detailed Description¶
QRayCasterHit
contains the details of a successful hit when casting a ray through a model using a QRayCaster
or QScreenRayCaster
component.
See also
QRayCaster
QScreenRayCaster
QPickingSettings
- class PySide6.Qt3DRender.Qt3DRender.QRayCasterHit¶
PySide6.Qt3DRender.Qt3DRender.QRayCasterHit(type, id, distance, localIntersect, worldIntersect, primitiveIndex, v1, v2, v3)
PySide6.Qt3DRender.Qt3DRender.QRayCasterHit(other)
- Parameters
worldIntersect –
PySide6.QtGui.QVector3D
v3 –
uint
distance – float
v2 –
uint
type –
HitType
localIntersect –
PySide6.QtGui.QVector3D
primitiveIndex –
uint
v1 –
uint
- PySide6.Qt3DRender.Qt3DRender.QRayCasterHit.HitType¶
Specifies type of hit that was returned. This is controlled using QPickingSettings
.
Constant
Description
Qt3DRender.QRayCasterHit.TriangleHit
The picked primitive was a triangle and the vertex indices refer to the three points making up the triangle
Qt3DRender.QRayCasterHit.LineHit
The picked primitive was a line segment, and the first two vertices refer to the two points making up the line
Qt3DRender.QRayCasterHit.PointHit
The picked primitive was a single point; all 3 vertex indices will be undefined
Qt3DRender.QRayCasterHit.EntityHit
Only the bounding volume was considered; the primitive and vertex indices will be undefined
- PySide6.Qt3DRender.Qt3DRender.QRayCasterHit.distance()¶
- Return type
float
- PySide6.Qt3DRender.Qt3DRender.QRayCasterHit.entity()¶
- Return type
- PySide6.Qt3DRender.Qt3DRender.QRayCasterHit.entityId()¶
- Return type
- PySide6.Qt3DRender.Qt3DRender.QRayCasterHit.localIntersection()¶
- Return type
- PySide6.Qt3DRender.Qt3DRender.QRayCasterHit.primitiveIndex()¶
- Return type
uint
- PySide6.Qt3DRender.Qt3DRender.QRayCasterHit.toString()¶
- Return type
str
- PySide6.Qt3DRender.Qt3DRender.QRayCasterHit.vertex1Index()¶
- Return type
uint
- PySide6.Qt3DRender.Qt3DRender.QRayCasterHit.vertex2Index()¶
- Return type
uint
- PySide6.Qt3DRender.Qt3DRender.QRayCasterHit.vertex3Index()¶
- Return type
uint
- PySide6.Qt3DRender.Qt3DRender.QRayCasterHit.worldIntersection()¶
- Return type
© 2022 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.