ObjectPicker QML Type

The ObjectPicker class instantiates a component that can be used to interact with an Entity by a process known as picking. 更多...

导入语句: import Qt3D.Render 2.15
实例化: QObjectPicker

特性

信号

详细描述

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() ,和 exited() are emitted when the bounding volume defined by the pickAttribute property intersects with a ray.

Most signals carry a PickEvent instance. If PickingSettings .pickMode is set to PickingSettings .TrianglePicking, the actual type of the pick parameter will be PickTriangleEvent .

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.

注意: To receive hover events in QtQuick hoverEnabled property of Scene3D must also be set.

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

注意: The camera far plane value affects picking and produces incorrect results due to floating-point precision if it is greater than ~100 000.

另请参阅 PickingSettings , 几何体 , 属性 , PickEvent , PickTriangleEvent ,和 NoPicking .

特性文档编制

containsMouse : bool

Specifies if the object picker currently contains the mouse


dragEnabled : bool

hoverEnabled : bool

Specifies if hover is enabled


pressed : bool

Specifies if the object picker is currently pressed


priority : int

The priority to be used when filtering pick results by priority when PickingSettings .pickResultMode is set to PickingSettings .PriorityPick.


信号文档编制

clicked ( PickEvent pick )

This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on a mouse click. Intersection information are accessible through the pick 参数。

注意: 相应处理程序是 onClicked .


clicked ( PickEvent pick )

This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on a mouse click the PickEvent pick contains details of the event.

注意: 相应处理程序是 onClicked .


entered ()

This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on the mouse entering the volume.

注意: 相应处理程序是 onEntered .


exited ()

This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on the ray exiting the volume.

注意: 相应处理程序是 onExited .


moved ( PickEvent pick )

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. Intersection information are accessible through the pick 参数。

注意: 相应处理程序是 onMoved .


pressed ( PickEvent pick )

This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on a mouse press. Intersection information are accessible through the pick 参数。

注意: 相应处理程序是 onPressed .


released ( PickEvent pick )

This signal is emitted when the bounding volume defined by the pickAttribute property intersects with a ray on a mouse release. Intersection information are accessible through the pick 参数。

注意: 相应处理程序是 onReleased .


版权所有  © 2014-2023 乐数软件    

工业和信息化部: 粤ICP备14079481号-1