Qt 5.6 | Qt 3D | C++ Classes | QObjectPicker

Qt 5.6.3 Reference Documentation

# QObjectPicker Class

(Qt3DRender::QObjectPicker)

The QObjectPicker class instantiates a component that can be used to interact with a QEntity by a process known as picking. More...

Header: | #include <QObjectPicker>
qmake: | QT += 3drender
Since: | Qt 5.6
Inherits: | Qt3DCore::QComponent

- List of all members, including inherited members

## Properties

- containsMouse : const bool
- hoverEnabled : bool
- pressed : const bool

- 1 property inherited from Qt3DCore::QComponent
- 2 properties inherited from Qt3DCore::QNode

## Public Functions

| QObjectPicker(QNode *parent = Q_NULLPTR)
| ~QObjectPicker()
bool | containsMouse() const
bool | hoverEnabled() const
bool | isPressed() const

- 2 public functions inherited from Qt3DCore::QComponent
- 6 public functions inherited from Qt3DCore::QNode

## Public Slots

void | setHoverEnabled(bool hoverEnabled)

- 1 public slot inherited from Qt3DCore::QComponent
- 2 public slots inherited from Qt3DCore::QNode

## Signals

void | clicked(Qt3DRender::QPickEvent *event)
void | containsMouseChanged(bool containsMouse)
void | entered()
void | exited()
void | hoverEnabledChanged(bool hoverEnabled)
void | pressed(Qt3DRender::QPickEvent *event)
void | pressedChanged(bool pressed)
void | released(Qt3DRender::QPickEvent *event)

- 2 signals inherited from Qt3DCore::QComponent
- 2 signals inherited from Qt3DCore::QNode

## Protected Functions

void | copy(const Qt3DCore::QNode *ref)
void | sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change)

- 1 protected function inherited from Qt3DCore::QComponent
- 3 protected functions inherited from Qt3DCore::QNode

### Additional Inherited Members

- 1 static protected member inherited from Qt3DCore::QNode

## Detailed Description

The QObjectPicker class instantiates a component that can be used to interact with a QEntity by a process known as picking.

The signals pressed(), released(), clicked(), entered(), and exited() are emitted when the bounding volume defined by the pickAttribute property intersects with a ray.

Note: Instances of this component shouldn't be shared, not respecting that condition will most likely result in undefined behavior.

## Property Documentation

### containsMouse : const bool

Access functions:

bool | containsMouse() const

Notifier signal:

void | containsMouseChanged(bool containsMouse)

### hoverEnabled : bool

Access functions:

bool | hoverEnabled() const
void | setHoverEnabled(bool hoverEnabled)

Notifier signal:

void | hoverEnabledChanged(bool hoverEnabled)

### pressed : const bool

Access functions:

bool | isPressed() const

Notifier signal:

void | pressedChanged(bool pressed)

## Member Function Documentation

### QObjectPicker::QObjectPicker(QNode *parent = Q_NULLPTR)

Default constructs an instance of QObjectPicker.

### QObjectPicker::~QObjectPicker()

Destroys the instance of QObjectPicker.

### `[signal]` void QObjectPicker::clicked(Qt3DRender::QPickEvent *event)

### `[protected]` void QObjectPicker::copy(const Qt3DCore::QNode *ref)

### `[signal]` void QObjectPicker::entered()

### `[signal]` void QObjectPicker::exited()

### `[signal]` void QObjectPicker::pressed(Qt3DRender::QPickEvent *event)

### `[signal]` void QObjectPicker::released(Qt3DRender::QPickEvent *event)

### `[protected]` void QObjectPicker::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change)