QAudioListener Class
Définit la position et l'orientation de la personne qui écoute un champ sonore défini par QAudioEngine. Plus...
| En-tête : | #include <QAudioListener> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS SpatialAudio)target_link_libraries(mytarget PRIVATE Qt6::SpatialAudio) |
| qmake : | QT += spatialaudio |
| Héritages : | QObject |
Fonctions publiques
| QAudioListener(QAudioEngine *engine) | |
| virtual | ~QAudioListener() override |
| QAudioEngine * | engine() const |
| QVector3D | position() const |
| QQuaternion | rotation() const |
| void | setPosition(QVector3D pos) |
| void | setRotation(const QQuaternion &q) |
Description détaillée
Un site QAudioEngine peut avoir exactement un auditeur qui définit la position et l'orientation de la personne qui écoute le champ sonore.
Documentation des fonctions membres
[explicit] QAudioListener::QAudioListener(QAudioEngine *engine)
Crée un récepteur pour le moteur audio spatial pour engine.
[override virtual noexcept] QAudioListener::~QAudioListener()
Détruit l'auditeur.
QAudioEngine *QAudioListener::engine() const
Renvoie le moteur associé à cet auditeur.
QVector3D QAudioListener::position() const
Renvoie la position actuelle de l'auditeur.
Voir aussi setPosition().
QQuaternion QAudioListener::rotation() const
Renvoie l'orientation de l'auditeur dans l'espace 3D.
Voir également setRotation().
void QAudioListener::setPosition(QVector3D pos)
Définit la position de l'auditeur dans l'espace 3D à pos. Les unités sont en centimètres par défaut.
Voir aussi position() et QAudioEngine::distanceScale.
void QAudioListener::setRotation(const QQuaternion &q)
Définit l'orientation de l'auditeur dans l'espace 3D à q.
Voir aussi rotation().
© 2026 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.