QRayCaster露
- PyQt5.Qt3DRender.QRayCaster
Inherits from QAbstractRayCaster.
Description露
QRayCaster is used to perform ray casting tests in 3d world coordinates.
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.
Methods露
- __init__(parent: QNode = None)
TODO
- direction() → QVector3D
See also
- length() → float
See also
- origin() → QVector3D
See also
- setDirection(QVector3D)
See also
- setLength(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
- trigger()
Convenience method to enable the component and trigger tests using the current ray.