28 #include <SFML/Audio/Listener.hpp>
29 #include <SFML/Audio/OpenAL.hpp>
39 ALCheck(alListenerf(AL_GAIN, Volume * 0.01f));
49 ALCheck(alGetListenerf(AL_GAIN, &Volume));
60 ALCheck(alListener3f(AL_POSITION, X, Y, Z));
79 ALCheck(alGetListener3f(AL_POSITION, &Position.
x, &Position.
y, &Position.
z));
91 float Orientation[] = {X, Y, Z, 0.f, 1.f, 0.f};
92 ALCheck(alListenerfv(AL_ORIENTATION, Orientation));
112 float Orientation[6];
113 ALCheck(alGetListenerfv(AL_ORIENTATION, Orientation));
115 return Vector3f(Orientation[0], Orientation[1], Orientation[2]);
T z
Z coordinate of the vector.
static Vector3f GetPosition()
Get the current position of the listener.
static void SetPosition(float X, float Y, float Z)
Change the position of the listener (take 3 values).
static void SetTarget(float X, float Y, float Z)
Change the orientation of the listener (the point he must look at) (take 3 values).
Vector3 is an utility class for manipulating 3 dimensional vectors.
static void SetGlobalVolume(float Volume)
Change the global volume of all the sounds.
T y
Y coordinate of the vector.
static float GetGlobalVolume()
Get the current value of the global volume of all the sounds.
static Vector3f GetTarget()
Get the current orientation of the listener (the point he's looking at)
T x
X coordinate of the vector.