IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QScreenRayCaster Class

Performe ray casting test based on screen coordinates.

This class was introduced in Qt 5.11.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QScreenRayCaster Class

  • Header: QScreenRayCaster

  • Since: Qt 5.11

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS 3drender)

    target_link_libraries(mytarget PRIVATE Qt6::3drender)

  • qmake: QT += 3drender

  • Inherited By:

  • Instantiated By: qml-qt3d-render-screenraycaster.xml

  • Inherits: Qt3DRender::QAbstractRayCaster

Detailed Description

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.

See Also

Property Documentation

 

position : QPoint

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.

Access functions:

  • position() const

  • void setPosition(const &position)

Notifier signal:

  • void positionChanged(const &position)

Member Function Documentation

 

void QScreenRayCaster::trigger()

Convenience method to enable the component and trigger tests using the current coordinate value.

void QScreenRayCaster::trigger(const QPoint &position)

Convenience method to set the coordinate value position and enable the component to trigger tests.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+