Qt3DRender.QRayCaster¶
QRayCaster
is used to perform ray casting tests in 3d world coordinates. More…
New in version 5.11.
Synopsis¶
Slots¶
def
setDirection
(direction)def
setLength
(length)def
setOrigin
(origin)def
trigger
()def
trigger
(origin, direction, length)
Signals¶
def
directionChanged
(direction)def
lengthChanged
(length)def
originChanged
(origin)
Detailed Description¶
The 3d ray is defined by its origin, direction and length. It will be affected by the transformations applied to the entity it belongs to.
Ray casting tests will be performed every frame as long as the component is enabled. The hits property will be updated with the list of intersections.
See also
QAbstractRayCaster
QScreenRayCaster
-
class
PySide2.Qt3DRender.Qt3DRender.
QRayCaster
([parent=None])¶ - Parameters
parent –
QNode
-
PySide2.Qt3DRender.Qt3DRender.QRayCaster.
direction
()¶ - Return type
QVector3D
See also
setDirection()
-
PySide2.Qt3DRender.Qt3DRender.QRayCaster.
directionChanged
(direction)¶ - Parameters
direction –
QVector3D
-
PySide2.Qt3DRender.Qt3DRender.QRayCaster.
length
()¶ - Return type
float
See also
setLength()
-
PySide2.Qt3DRender.Qt3DRender.QRayCaster.
lengthChanged
(length)¶ - Parameters
length –
float
-
PySide2.Qt3DRender.Qt3DRender.QRayCaster.
origin
()¶ - Return type
QVector3D
See also
setOrigin()
-
PySide2.Qt3DRender.Qt3DRender.QRayCaster.
originChanged
(origin)¶ - Parameters
origin –
QVector3D
-
PySide2.Qt3DRender.Qt3DRender.QRayCaster.
setDirection
(direction)¶ - Parameters
direction –
QVector3D
See also
direction()
-
PySide2.Qt3DRender.Qt3DRender.QRayCaster.
setLength
(length)¶ - Parameters
length –
float
Sets the length of the ray to
length
.If the value is less than or equal to zero, the ray is concidered to be infinite.
See also
length()
-
PySide2.Qt3DRender.Qt3DRender.QRayCaster.
setOrigin
(origin)¶ - Parameters
origin –
QVector3D
See also
origin()
-
PySide2.Qt3DRender.Qt3DRender.QRayCaster.
trigger
()¶ Convenience method to enable the component and trigger tests using the current ray.
-
PySide2.Qt3DRender.Qt3DRender.QRayCaster.
trigger
(origin, direction, length) - Parameters
origin –
QVector3D
direction –
QVector3D
length –
float
Convenience method to set the ray details
origin
,direction
, andlength
, and enable the component to trigger tests.
© 2018 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.