60 pos *= ep->distanceScale;
65 if (ep && ep->resonanceAudio->api) {
66 ep->resonanceAudio->api->SetHeadPosition(
pos.x(),
pos.y(),
pos.z());
67 ep->listenerPositionDirty =
true;
77 return d->
pos/ep->distanceScale;
87 if (ep && ep->resonanceAudio->api)
106 ed->listener =
nullptr;
112 qWarning() <<
"Ignoring attempt to add a second listener to the spatial audio engine.";
static QAudioEnginePrivate * get(QAudioEngine *engine)
QVector3D position() const
Returns the current position of the listener.
~QAudioListener()
Destroys the listener.
QAudioEngine * engine() const
Returns the engine associated with this listener.
void setRotation(const QQuaternion &q)
Sets the listener's orientation in 3D space to q.
void setPosition(QVector3D pos)
Sets the listener's position in 3D space to pos.
QQuaternion rotation() const
Returns the listener's orientation in 3D space.
QAudioListener(QAudioEngine *engine)
Creates a listener for the spatial audio engine for engine.
The QQuaternion class represents a quaternion consisting of a vector and scalar.
float z() const
Returns the z coordinate of this quaternion's vector.
float scalar() const
Returns the scalar component of this quaternion.
float x() const
Returns the x coordinate of this quaternion's vector.
float y() const
Returns the y coordinate of this quaternion's vector.
The QVector3D class represents a vector or vertex in 3D space.
Combined button and popup list for selecting options.
GLdouble GLdouble GLdouble GLdouble q