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

setDirection().


length() → float

See also

setLength().


origin() → QVector3D

See also

setOrigin().


setDirection(QVector3D)

See also

direction().


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

length().


setOrigin(QVector3D)

See also

origin().


trigger()

Convenience method to enable the component and trigger tests using the current ray.


trigger(QVector3D, QVector3D, float)

Convenience method to set the ray details origin, direction, and length, and enable the component to trigger tests.

Signals

directionChanged(QVector3D)

TODO


lengthChanged(float)

TODO


originChanged(QVector3D)

TODO