QScreenRayCaster Class

(Qt3DRender::QScreenRayCaster)

Performe ray casting test based on screen coordinates. More...

Header: #include <QScreenRayCaster>
qmake: QT += 3drender
Since: Qt 5.11
Instantiated By: ScreenRayCaster
Inherits: Qt3DRender::QAbstractRayCaster

This class was introduced in Qt 5.11.

Properties

Public Functions

QPoint position() const

Public Slots

void setPosition(const QPoint &position)
void trigger(const QPoint &position)
void trigger()

Signals

void positionChanged(const QPoint &position)

Detailed Description

QScreenRayCaster can be used to perform ray casting tests by specifying coordinates in screen space, which will be used to construct an actual 3D ray between the near and far planes.

See also QRayCaster and QNoPicking.

Property Documentation

position : QPoint

Holds the screen space position used to compute the actual 3D ray for intersection tests.

Note: the coordinates will be used for every available render surface as long as they are in the valid range.

Access functions:

QPoint position() const
void setPosition(const QPoint &position)

Notifier signal:

void positionChanged(const QPoint &position)

Member Function Documentation

[slot] void QScreenRayCaster::trigger(const QPoint &position)

Convenience method to set the coordinate value position and enable the component to trigger tests.

[slot] void QScreenRayCaster::trigger()

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

© 2020 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.