#include <AudioListener.h>
Public Member Functions | |
const Vector3 & | getPosition () const |
void | setPosition (const Vector3 &position) |
void | setPosition (float x, float y, float z) |
float | getGain () const |
void | setGain (float gain) |
const Vector3 & | getVelocity () const |
void | setVelocity (const Vector3 &velocity) |
void | setVelocity (float x, float y, float z) |
const float * | getOrientation () const |
const Vector3 & | getOrientationForward () const |
const Vector3 & | getOrientationUp () const |
void | setOrientation (const Vector3 &forward, const Vector3 &up) |
void | setOrientation (float forwardX, float forwardY, float forwardZ, float upX, float upY, float upZ) |
Camera * | getCamera () const |
void | setCamera (Camera *camera) |
Static Public Member Functions | |
static AudioListener * | getInstance () |
Defines an audio listener in 3D space.
The audio listener represents where you are listening from. In a 3D scene this is usually the active camera.
Camera* gameplay::AudioListener::getCamera | ( | ) | const |
Gets the camera currently associated with the audio listener.
float gameplay::AudioListener::getGain | ( | ) | const |
Returns the gain of the audio listener.
static AudioListener* gameplay::AudioListener::getInstance | ( | ) | [static] |
Gets the single instance of the audio listener.
const float* gameplay::AudioListener::getOrientation | ( | ) | const |
Gets the float pointer to the orientation of the audio listener. Orientation is represented as 6 floats. (forward.x, forward.y, forward.z, up.x, up.y, up.z).
const Vector3& gameplay::AudioListener::getOrientationForward | ( | ) | const |
Gets the forward orientation vector of the audio listener.
const Vector3& gameplay::AudioListener::getOrientationUp | ( | ) | const |
Gets the up orientation vector of the audio listener.
const Vector3& gameplay::AudioListener::getPosition | ( | ) | const |
Gets the current position of the audio listener.
const Vector3& gameplay::AudioListener::getVelocity | ( | ) | const |
Gets the velocity of the audio source.
void gameplay::AudioListener::setCamera | ( | Camera * | camera | ) |
Sets the camera that is associated with the audio listener. This should usually be the current camera.
camera | The camera that is associated with the audio listener |
void gameplay::AudioListener::setGain | ( | float | gain | ) |
Sets the gain/volume of the audio listener.
gain | The gain/volume of the listener. |
void gameplay::AudioListener::setOrientation | ( | const Vector3 & | forward, |
const Vector3 & | up | ||
) |
Sets the orientation of the audio listener.
forward | The forward vector. |
up | The up vector. |
void gameplay::AudioListener::setOrientation | ( | float | forwardX, |
float | forwardY, | ||
float | forwardZ, | ||
float | upX, | ||
float | upY, | ||
float | upZ | ||
) |
Sets the orientation of the audio listener.
forwardX | The x coordinate of the forward vector. |
forwardY | The y coordinate of the forward vector. |
forwardZ | The z coordinate of the forward vector. |
upX | The x coordinate of the up vector. |
upY | The y coordinate of the up vector. |
upZ | The z coordinate of the up vector. |
void gameplay::AudioListener::setPosition | ( | const Vector3 & | position | ) |
Sets the position of the audio source.
position | The position to set the listener to. |
void gameplay::AudioListener::setPosition | ( | float | x, |
float | y, | ||
float | z | ||
) |
Sets the position of the audio source.
x | The x coordinate of the position. |
y | The y coordinate of the position. |
z | The z coordinate of the position. |
void gameplay::AudioListener::setVelocity | ( | const Vector3 & | velocity | ) |
Sets the velocity of the audio source
velocity | A vector representing the velocity. |
void gameplay::AudioListener::setVelocity | ( | float | x, |
float | y, | ||
float | z | ||
) |
Sets the velocity of the audio source
x | The x coordinate of the velocity. |
y | The y coordinate of the velocity. |
z | The z coordinate of the velocity. |