QScreenRayCaster Class | Qt 3D 5.12.4

Qt 5.12 | Qt 3D | C++ Classes | QScreenRayCaster

Qt 5.12.4 Reference Documentation

# 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

- List of all members, including inherited members
- Obsolete members

## Properties

- position : QPoint

- 3 properties inherited from Qt3DRender::QAbstractRayCaster
- 1 property inherited from Qt3DCore::QComponent
- 3 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject

## Public Functions

| QScreenRayCaster(Qt3DCore::QNode *parent = nullptr)
QPoint | position() const

- 6 public functions inherited from Qt3DRender::QAbstractRayCaster
- 2 public functions inherited from Qt3DCore::QComponent
- 13 public functions inherited from Qt3DCore::QNode
- 31 public functions inherited from QObject

## Public Slots

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

- 2 public slots inherited from Qt3DRender::QAbstractRayCaster
- 1 public slot inherited from Qt3DCore::QComponent
- 3 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject

## Signals

void | positionChanged(const QPoint &position)

- 3 signals inherited from Qt3DRender::QAbstractRayCaster
- 3 signals inherited from Qt3DCore::QComponent
- 4 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject

## Static Public Members

const QMetaObject | staticMetaObject

- 9 static public members inherited from QObject

### Additional Inherited Members

- 2 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject

## Detailed Description

Performe ray casting test based on screen coordinates.

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.

## 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

### QScreenRayCaster::QScreenRayCaster(Qt3DCore::QNode *parent = nullptr)

Default constructs an instance of QScreenRayCaster.

### `[slot]` void QScreenRayCaster::trigger()

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

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

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