YSE sound engine  1.0
cross platform sound engine
 All Classes Namespaces Functions Pages
YSE::listener Class Reference

Public Member Functions

Vec getPosition ()
 
Vec getVelocity ()
 
Vec getForward ()
 
Vec getUpward ()
 
listenersetPosition (const Vec &pos)
 
listenersetOrientation (const Vec &forward, const Vec &up=Vec(0, 1, 0))
 

Detailed Description

The Listener is a singleton object used to control your position in the virtual space.

With sound positions and listener position (and rotation) you control how the sound output is spread out over the available speakers.

Also the listener keeps track of its own velocity, ie. the speed at which the object is moving. This is used in doppler calculations.

Definition at line 29 of file listener.hpp.

Member Function Documentation

listener& YSE::listener::setPosition ( const Vec pos)

Set the current position of the listener.

If you want to use doppler and velocity, you should update the position of the listener at a frequent interval. Usually you will update the position just as often as you use System().update().

listener& YSE::listener::setOrientation ( const Vec forward,
const Vec up = Vec(0, 1, 0) 
)

Set the orientation of the listener.

The upward vector is optional, and assumes rotation on a horizontal plane by default.


The documentation for this class was generated from the following file: