Performe ray casting test based on screen coordinates. 更多...
头: | #include <QScreenRayCaster> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake: | QT += 3drender |
实例化: | ScreenRayCaster |
继承: | Qt3DRender::QAbstractRayCaster |
QPoint | position () const |
void | setPosition (const QPoint & position ) |
void | trigger () |
void | trigger (const QPoint & position ) |
void | positionChanged (const QPoint & position ) |
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.
另请参阅 QRayCaster and QNoPicking .
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.
访问函数:
QPoint | 位置 () const |
void | setPosition (const QPoint & position ) |
通知程序信号:
void | positionChanged (const QPoint & position ) |
[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.