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

Properties

Public Functions

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

Public Slots

void setHoverEnabled(bool hoverEnabled)

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)

Protected Functions

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

Additional Inherited Members

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)

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