overview wiki api reference download
 All Classes Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Static Public Member Functions
gameplay::AudioListener Class Reference

#include <AudioListener.h>

Inheritance diagram for gameplay::AudioListener:
gameplay::Camera::Listener

List of all members.

Public Member Functions

const Vector3getPosition () const
void setPosition (const Vector3 &position)
void setPosition (float x, float y, float z)
float getGain () const
void setGain (float gain)
const Vector3getVelocity () const
void setVelocity (const Vector3 &velocity)
void setVelocity (float x, float y, float z)
const float * getOrientation () const
const Vector3getOrientationForward () const
const Vector3getOrientationUp () const
void setOrientation (const Vector3 &forward, const Vector3 &up)
void setOrientation (float forwardX, float forwardY, float forwardZ, float upX, float upY, float upZ)
CameragetCamera () const
void setCamera (Camera *camera)

Static Public Member Functions

static AudioListenergetInstance ()

Detailed Description

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.

See also:
Scene::bindAudioListenerToCamera

Member Function Documentation

Gets the camera currently associated with the audio listener.

Returns:
camera The camera currently associated with the audio listener.

Returns the gain of the audio listener.

Returns:
The gain of the audio listener.

Gets the single instance of the audio listener.

Returns:
The single instance of the audio listener.

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).

Returns:
Pointer to the 6 orientation float values.

Gets the forward orientation vector of the audio listener.

Returns:
The forward vector.

Gets the up orientation vector of the audio listener.

Returns:
The up vector.

Gets the current position of the audio listener.

Returns:
The position of the audio listener

Gets the velocity of the audio source.

Returns:
The velocity as a vector.

Sets the camera that is associated with the audio listener. This should usually be the current camera.

Parameters:
cameraThe camera that is associated with the audio listener
void gameplay::AudioListener::setGain ( float  gain)

Sets the gain/volume of the audio listener.

Parameters:
gainThe gain/volume of the listener.
void gameplay::AudioListener::setOrientation ( const Vector3 forward,
const Vector3 up 
)

Sets the orientation of the audio listener.

Parameters:
forwardThe forward vector.
upThe 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.

Parameters:
forwardXThe x coordinate of the forward vector.
forwardYThe y coordinate of the forward vector.
forwardZThe z coordinate of the forward vector.
upXThe x coordinate of the up vector.
upYThe y coordinate of the up vector.
upZThe z coordinate of the up vector.
void gameplay::AudioListener::setPosition ( const Vector3 position)

Sets the position of the audio source.

Parameters:
positionThe position to set the listener to.
void gameplay::AudioListener::setPosition ( float  x,
float  y,
float  z 
)

Sets the position of the audio source.

Parameters:
xThe x coordinate of the position.
yThe y coordinate of the position.
zThe z coordinate of the position.
void gameplay::AudioListener::setVelocity ( const Vector3 velocity)

Sets the velocity of the audio source

Parameters:
velocityA vector representing the velocity.
void gameplay::AudioListener::setVelocity ( float  x,
float  y,
float  z 
)

Sets the velocity of the audio source

Parameters:
xThe x coordinate of the velocity.
yThe y coordinate of the velocity.
zThe z coordinate of the velocity.
 All Classes Functions Variables Typedefs Enumerations Enumerator