QAudioListener Class
QAudioEngine で定義された音場を聴く人の位置と方向を定義します。詳細...
ヘッダー | #include <QAudioListener> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS SpatialAudio) target_link_libraries(mytarget PRIVATE Qt6::SpatialAudio) |
qmake: | QT += spatialaudio |
継承: | QObject |
パブリック関数
QAudioListener(QAudioEngine *engine) | |
virtual | ~QAudioListener() override |
QAudioEngine * | engine() const |
QVector3D | position() const |
QQuaternion | rotation() const |
void | setPosition(QVector3D pos) |
void | setRotation(const QQuaternion &q) |
詳細説明
QAudioEngine は、音場を聴く人の位置と向きを定義するリスナーを1つだけ持つことができます。
メンバー関数ドキュメント
[explicit]
QAudioListener::QAudioListener(QAudioEngine *engine)
engine 用の空間オーディオエンジンのリスナーを作成します。
[override virtual noexcept]
QAudioListener::~QAudioListener()
リスナーを破壊する。
QAudioEngine *QAudioListener::engine() const
このリスナーに関連付けられているエンジンを返します。
QVector3D QAudioListener::position() const
リスナーの現在位置を返します。
setPosition()も参照してください 。
QQuaternion QAudioListener::rotation() const
3D空間におけるリスナーの向きを返します。
setRotation()も参照してください 。
void QAudioListener::setPosition(QVector3D pos)
3D空間におけるリスナーの位置をpos に設定します。 デフォルトでは単位はセンチメートルです。
position() およびQAudioEngine::distanceScaleも参照してください 。
void QAudioListener::setRotation(const QQuaternion &q)
3D空間におけるリスナーの向きをq に設定する。
rotation()も参照 。
© 2025 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.