Merge branch 'cb/limits'
[plumiferos.git] / intern / SoundSystem / SND_SoundListener.h
blob9611cdfc6b396fe42e6e26c9f6969107a614388b
1 /*
2 * SND_SoundListener.h
4 * A SoundListener is for sound what a camera is for vision.
6 * $Id: SND_SoundListener.h 229 2002-12-27 13:11:01Z mein $
8 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version. The Blender
14 * Foundation also sells licenses for use in proprietary software under
15 * the Blender License. See http://www.blender.org/BL/ for information
16 * about this.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software Foundation,
25 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
28 * All rights reserved.
30 * The Original Code is: all of this file.
32 * Contributor(s): none yet.
34 * ***** END GPL/BL DUAL LICENSE BLOCK *****
37 #ifndef __SND_SOUNDLISTENER_H
38 #define __SND_SOUNDLISTENER_H
40 #include "SND_Object.h"
42 class SND_SoundListener : public SND_Object
44 public:
45 SND_SoundListener();
46 virtual ~SND_SoundListener();
48 void SetStateFlag(unsigned int stateflags);
49 void SetGain(MT_Scalar gain);
50 void SetPosition(const MT_Vector3& pos);
51 void SetVelocity(const MT_Vector3& vel);
52 void SetOrientation(const MT_Matrix3x3& ori);
53 void SetDopplerFactor(MT_Scalar dopplerfactor);
54 void SetDopplerVelocity(MT_Scalar dopplervelocity);
55 void SetScale(MT_Scalar scale);
57 void SetModified(bool modified);
58 bool IsModified() const;
60 unsigned int GetStateFlags() const;
61 MT_Scalar GetGain() const;
62 MT_Vector3 GetPosition() const;
63 MT_Vector3 GetVelocity() const;
64 MT_Matrix3x3 GetOrientation();
66 MT_Scalar GetDopplerFactor() const;
67 MT_Scalar GetDopplerVelocity() const;
68 MT_Scalar GetScale() const;
70 private:
71 void* m_listener;
72 bool m_modified;
74 MT_Scalar m_gain; /* overall gain */
75 MT_Vector3 m_position; /* position; left/right, up/down, in/out */
76 MT_Vector3 m_velocity; /* velocity of the listener */
77 MT_Matrix3x3 m_orientation; /* orientation of the listener */
79 MT_Scalar m_dopplerfactor; /* scaling factor for the Doppler (pitch) shift */
80 MT_Scalar m_dopplervelocity; /* factor for the reference velocity (for Dopplereffect) */
81 MT_Scalar m_scale;
84 #endif //__SND_SOUNDLISTENER_H