[−][src]Struct qt_3d_render::QObjectPicker
The QObjectPicker class instantiates a component that can be used to interact with a QEntity by a process known as picking.
C++ class: Qt3DRender::QObjectPicker
.
The QObjectPicker class instantiates a component that can be used to interact with a QEntity by a process known as picking.
For every combination of viewport and camera, picking casts a ray through the scene to find entities who's bounding volume intersects the ray. The bounding volume is computed using the values in the attribute buffer specified by the boundingVolumePositionAttribute of the geometry.
The signals pressed(), released(), clicked(), moved(), entered(), and exited() are emitted when the bounding volume defined by the pickAttribute property intersects with a ray.
Most signals carry a QPickEvent instance. If QPickingSettings::pickMode() is set to QPickingSettings::TrianglePicking, the actual type of the pick parameter will be QPickTriangleEvent.
Pick queries are performed on mouse press and mouse release. If drag is enabled, queries also happen on each mouse move while any button is pressed. If hover is enabled, queries happen on every mouse move even if no button is pressed.
Note: Instances of this component shouldn't be shared, not respecting that condition will most likely result in undefined behavior.
Methods
impl QObjectPicker
[src]
pub fn slot_set_hover_enabled(&self) -> Receiver<(bool,)>
[src]
Sets the hoverEnabled Property to hoverEnabled
Returns a built-in Qt slot Qt3DRender::QObjectPicker::setHoverEnabled
that can be passed to qt_core::Signal::connect
.
Sets the hoverEnabled Property to hoverEnabled
Note: Setter function for property hoverEnabled.
See also isHoverEnabled().
pub fn slot_set_drag_enabled(&self) -> Receiver<(bool,)>
[src]
Sets the dragEnabled Property to dragEnabled
Returns a built-in Qt slot Qt3DRender::QObjectPicker::setDragEnabled
that can be passed to qt_core::Signal::connect
.
Sets the dragEnabled Property to dragEnabled
Note: Setter function for property dragEnabled.
See also isDragEnabled().
pub fn pressed(&self) -> Signal<(*mut QPickEvent,)>
[src]
This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on a mouse press the QPickEvent pick contains details of the event.
Returns a built-in Qt signal Qt3DRender::QObjectPicker::pressed
that can be passed to qt_core::Signal::connect
.
This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on a mouse press the QPickEvent pick contains details of the event.
pub fn released(&self) -> Signal<(*mut QPickEvent,)>
[src]
This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on a mouse release the QPickEvent pick contains details of the event.
Returns a built-in Qt signal Qt3DRender::QObjectPicker::released
that can be passed to qt_core::Signal::connect
.
This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on a mouse release the QPickEvent pick contains details of the event.
pub fn clicked(&self) -> Signal<(*mut QPickEvent,)>
[src]
This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on a mouse click the QPickEvent pick contains details of the event.
Returns a built-in Qt signal Qt3DRender::QObjectPicker::clicked
that can be passed to qt_core::Signal::connect
.
This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on a mouse click the QPickEvent pick contains details of the event.
pub fn moved(&self) -> Signal<(*mut QPickEvent,)>
[src]
This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on a mouse move with a button pressed the QPickEvent pick contains details of the event.
Returns a built-in Qt signal Qt3DRender::QObjectPicker::moved
that can be passed to qt_core::Signal::connect
.
This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on a mouse move with a button pressed the QPickEvent pick contains details of the event.
pub fn entered(&self) -> Signal<()>
[src]
This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on the mouse entering the volume.
Returns a built-in Qt signal Qt3DRender::QObjectPicker::entered
that can be passed to qt_core::Signal::connect
.
This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on the mouse entering the volume.
pub fn exited(&self) -> Signal<()>
[src]
This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on the ray exiting the volume.
Returns a built-in Qt signal Qt3DRender::QObjectPicker::exited
that can be passed to qt_core::Signal::connect
.
This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on the ray exiting the volume.
pub fn hover_enabled_changed(&self) -> Signal<(bool,)>
[src]
Specifies if hover is enabled
Returns a built-in Qt signal Qt3DRender::QObjectPicker::hoverEnabledChanged
that can be passed to qt_core::Signal::connect
.
Specifies if hover is enabled
Access functions:
bool | isHoverEnabled() const |
void | setHoverEnabled(bool hoverEnabled) |
Notifier signal:
void | hoverEnabledChanged(bool hoverEnabled) |
pub fn drag_enabled_changed(&self) -> Signal<(bool,)>
[src]
Specifies if drag is enabled
Returns a built-in Qt signal Qt3DRender::QObjectPicker::dragEnabledChanged
that can be passed to qt_core::Signal::connect
.
Specifies if drag is enabled
Access functions:
bool | isDragEnabled() const |
void | setDragEnabled(bool dragEnabled) |
Notifier signal:
void | dragEnabledChanged(bool dragEnabled) |
pub fn pressed_changed(&self) -> Signal<(bool,)>
[src]
Specifies if the object picker is currently pressed
Returns a built-in Qt signal Qt3DRender::QObjectPicker::pressedChanged
that can be passed to qt_core::Signal::connect
.
Specifies if the object picker is currently pressed
Access functions:
bool | isPressed() const |
Notifier signal:
void | pressedChanged(bool pressed) |
pub fn contains_mouse_changed(&self) -> Signal<(bool,)>
[src]
Specifies if the object picker currently contains the mouse
Returns a built-in Qt signal Qt3DRender::QObjectPicker::containsMouseChanged
that can be passed to qt_core::Signal::connect
.
Specifies if the object picker currently contains the mouse
Access functions:
bool | containsMouse() const |
Notifier signal:
void | containsMouseChanged(bool containsMouse) |
pub unsafe fn contains_mouse(&self) -> bool
[src]
Specifies if the object picker currently contains the mouse
Calls C++ function: bool Qt3DRender::QObjectPicker::containsMouse() const
.
Specifies if the object picker currently contains the mouse
Access functions:
bool | containsMouse() const |
Notifier signal:
void | containsMouseChanged(bool containsMouse) |
pub unsafe fn is_drag_enabled(&self) -> bool
[src]
Returns true if dragging is enabled
Calls C++ function: bool Qt3DRender::QObjectPicker::isDragEnabled() const
.
Returns true if dragging is enabled
Note: Getter function for property dragEnabled.
pub unsafe fn is_hover_enabled(&self) -> bool
[src]
Returns true if hover enabled
Calls C++ function: bool Qt3DRender::QObjectPicker::isHoverEnabled() const
.
Returns true if hover enabled
Note: Getter function for property hoverEnabled.
pub unsafe fn is_pressed(&self) -> bool
[src]
Specifies if the object picker is currently pressed
Calls C++ function: bool Qt3DRender::QObjectPicker::isPressed() const
.
Specifies if the object picker is currently pressed
Access functions:
bool | isPressed() const |
Notifier signal:
void | pressedChanged(bool pressed) |
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
Calls C++ function: virtual const QMetaObject* Qt3DRender::QObjectPicker::metaObject() const
.
pub unsafe fn new_1a(parent: impl CastInto<Ptr<QNode>>) -> QBox<QObjectPicker>
[src]
Default constructs an instance of QObjectPicker.
Calls C++ function: [constructor] void Qt3DRender::QObjectPicker::QObjectPicker(Qt3DCore::QNode* parent = …)
.
Default constructs an instance of QObjectPicker.
pub unsafe fn new_0a() -> QBox<QObjectPicker>
[src]
The QObjectPicker class instantiates a component that can be used to interact with a QEntity by a process known as picking.
Calls C++ function: [constructor] void Qt3DRender::QObjectPicker::QObjectPicker()
.
The QObjectPicker class instantiates a component that can be used to interact with a QEntity by a process known as picking.
For every combination of viewport and camera, picking casts a ray through the scene to find entities who's bounding volume intersects the ray. The bounding volume is computed using the values in the attribute buffer specified by the boundingVolumePositionAttribute of the geometry.
The signals pressed(), released(), clicked(), moved(), entered(), and exited() are emitted when the bounding volume defined by the pickAttribute property intersects with a ray.
Most signals carry a QPickEvent instance. If QPickingSettings::pickMode() is set to QPickingSettings::TrianglePicking, the actual type of the pick parameter will be QPickTriangleEvent.
Pick queries are performed on mouse press and mouse release. If drag is enabled, queries also happen on each mouse move while any button is pressed. If hover is enabled, queries happen on every mouse move even if no button is pressed.
Note: Instances of this component shouldn't be shared, not respecting that condition will most likely result in undefined behavior.
pub unsafe fn priority(&self) -> c_int
[src]
cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.The priority to be used when filtering pick results by priority when QPickingSettings::pickResultMode is set to QPickingSettings::NearestPriorityPick.
Calls C++ function: int Qt3DRender::QObjectPicker::priority() const
.
The priority to be used when filtering pick results by priority when QPickingSettings::pickResultMode is set to QPickingSettings::NearestPriorityPick.
Access functions:
int | priority() const |
void | setPriority(int priority) |
Notifier signal:
void | priorityChanged(int priority) |
pub unsafe fn priority_changed(&self, priority: c_int)
[src]
cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.The priority to be used when filtering pick results by priority when QPickingSettings::pickResultMode is set to QPickingSettings::NearestPriorityPick.
Calls C++ function: void Qt3DRender::QObjectPicker::priorityChanged(int priority)
.
The priority to be used when filtering pick results by priority when QPickingSettings::pickResultMode is set to QPickingSettings::NearestPriorityPick.
Access functions:
int | priority() const |
void | setPriority(int priority) |
Notifier signal:
void | priorityChanged(int priority) |
pub unsafe fn qt_metacall(
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
[src]
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
Calls C++ function: virtual int Qt3DRender::QObjectPicker::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)
.
pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void
[src]
Calls C++ function: virtual void* Qt3DRender::QObjectPicker::qt_metacast(const char* arg1)
.
pub unsafe fn set_drag_enabled(&self, drag_enabled: bool)
[src]
Sets the dragEnabled Property to dragEnabled
Calls C++ function: [slot] void Qt3DRender::QObjectPicker::setDragEnabled(bool dragEnabled)
.
Sets the dragEnabled Property to dragEnabled
Note: Setter function for property dragEnabled.
See also isDragEnabled().
pub unsafe fn set_hover_enabled(&self, hover_enabled: bool)
[src]
Sets the hoverEnabled Property to hoverEnabled
Calls C++ function: [slot] void Qt3DRender::QObjectPicker::setHoverEnabled(bool hoverEnabled)
.
Sets the hoverEnabled Property to hoverEnabled
Note: Setter function for property hoverEnabled.
See also isHoverEnabled().
pub unsafe fn set_priority(&self, priority: c_int)
[src]
cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Sets the picker's priority to priority. This is used when the pick result mode on QPickingSettings is set to QPickingSettings::NearestPriorityPick. Picking results are sorted by highest priority and shortest picking distance.
Calls C++ function: void Qt3DRender::QObjectPicker::setPriority(int priority)
.
Sets the picker's priority to priority. This is used when the pick result mode on QPickingSettings is set to QPickingSettings::NearestPriorityPick. Picking results are sorted by highest priority and shortest picking distance.
This function was introduced in Qt 5.13.
Note: Setter function for property priority.
See also priority().
pub unsafe fn static_meta_object() -> Ref<QMetaObject>
[src]
Returns a reference to the staticMetaObject
field.
pub unsafe fn tr(
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
[src]
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString Qt3DRender::QObjectPicker::tr(const char* s, const char* c, int n)
.
pub unsafe fn tr_utf8(
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
[src]
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString Qt3DRender::QObjectPicker::trUtf8(const char* s, const char* c, int n)
.
Trait Implementations
impl CppDeletable for QObjectPicker
[src]
unsafe fn delete(&self)
[src]
Calls C++ function: virtual [destructor] void Qt3DRender::QObjectPicker::~QObjectPicker()
.
impl Deref for QObjectPicker
[src]
type Target = QComponent
The resulting type after dereferencing.
fn deref(&self) -> &QComponent
[src]
Calls C++ function: Qt3DCore::QComponent* static_cast<Qt3DCore::QComponent*>(Qt3DRender::QObjectPicker* ptr)
.
impl DynamicCast<QObjectPicker> for QComponent
[src]
unsafe fn dynamic_cast(ptr: Ptr<QComponent>) -> Ptr<QObjectPicker>
[src]
Calls C++ function: Qt3DRender::QObjectPicker* dynamic_cast<Qt3DRender::QObjectPicker*>(Qt3DCore::QComponent* ptr)
.
impl DynamicCast<QObjectPicker> for QNode
[src]
unsafe fn dynamic_cast(ptr: Ptr<QNode>) -> Ptr<QObjectPicker>
[src]
Calls C++ function: Qt3DRender::QObjectPicker* dynamic_cast<Qt3DRender::QObjectPicker*>(Qt3DCore::QNode* ptr)
.
impl DynamicCast<QObjectPicker> for QObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QObjectPicker>
[src]
Calls C++ function: Qt3DRender::QObjectPicker* dynamic_cast<Qt3DRender::QObjectPicker*>(QObject* ptr)
.
impl StaticDowncast<QObjectPicker> for QComponent
[src]
unsafe fn static_downcast(ptr: Ptr<QComponent>) -> Ptr<QObjectPicker>
[src]
Calls C++ function: Qt3DRender::QObjectPicker* static_cast<Qt3DRender::QObjectPicker*>(Qt3DCore::QComponent* ptr)
.
impl StaticDowncast<QObjectPicker> for QNode
[src]
unsafe fn static_downcast(ptr: Ptr<QNode>) -> Ptr<QObjectPicker>
[src]
Calls C++ function: Qt3DRender::QObjectPicker* static_cast<Qt3DRender::QObjectPicker*>(Qt3DCore::QNode* ptr)
.
impl StaticDowncast<QObjectPicker> for QObject
[src]
unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QObjectPicker>
[src]
Calls C++ function: Qt3DRender::QObjectPicker* static_cast<Qt3DRender::QObjectPicker*>(QObject* ptr)
.
impl StaticUpcast<QComponent> for QObjectPicker
[src]
unsafe fn static_upcast(ptr: Ptr<QObjectPicker>) -> Ptr<QComponent>
[src]
Calls C++ function: Qt3DCore::QComponent* static_cast<Qt3DCore::QComponent*>(Qt3DRender::QObjectPicker* ptr)
.
impl StaticUpcast<QNode> for QObjectPicker
[src]
unsafe fn static_upcast(ptr: Ptr<QObjectPicker>) -> Ptr<QNode>
[src]
Calls C++ function: Qt3DCore::QNode* static_cast<Qt3DCore::QNode*>(Qt3DRender::QObjectPicker* ptr)
.
impl StaticUpcast<QObject> for QObjectPicker
[src]
unsafe fn static_upcast(ptr: Ptr<QObjectPicker>) -> Ptr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(Qt3DRender::QObjectPicker* ptr)
.
Auto Trait Implementations
impl RefUnwindSafe for QObjectPicker
impl Send for QObjectPicker
impl Sync for QObjectPicker
impl Unpin for QObjectPicker
impl UnwindSafe for QObjectPicker
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,