X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flistener.h;h=9cc5b7a3124f22fa2d54b4b7368c7e9364978feb;hb=b55eb969de5c5085474cd6c5ad2f102e9fe9ecb7;hp=8946e4cf49b33d65c75e7bfa250cfb0632ed7a27;hpb=8e69eba7dc53233c169152bdf654f032fcd0629f;p=libs%2Fal.git diff --git a/source/listener.h b/source/listener.h index 8946e4c..9cc5b7a 100644 --- a/source/listener.h +++ b/source/listener.h @@ -1,11 +1,4 @@ -/* $Id$ - -This file is part of libmspal -Copyright © 2008 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#ifndef MSP_AL_LIStENER_H_ +#ifndef MSP_AL_LISTENER_H_ #define MSP_AL_LISTENER_H_ #include @@ -13,16 +6,23 @@ Distributed under the LGPL namespace Msp { namespace AL { +/** +Represents the listener in the 3D environment. This class is a singleton. +*/ class Listener { private: + float orientation[6]; + Listener(); public: - static void attribute(ALenum, float); - static void attribute(ALenum, float, float, float); - static void attribute(ALenum, const float *); - static void set_position(float, float, float); - static void set_gain(float); + static Listener &instance(); + + void set_position(float, float, float); + void set_forward_direction(float, float, float); + void set_up_direction(float, float, float); + void set_velocity(float, float, float); + void set_gain(float); }; } // namespace AL