zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Sound_Renderer.h
Go to the documentation of this file.
1 /* This file is part of the Zenipex Library (zenilib).
2  * Copyright (C) 2011 Mitchell Keith Bloch (bazald).
3  *
4  * zenilib is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * zenilib is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with zenilib. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
34 #ifndef ZENI_SOUND_RENDERER_H
35 #define ZENI_SOUND_RENDERER_H
36 
37 #include <Zeni/Coordinate.h>
38 #include <Zeni/Sound_Buffer.h>
39 
40 #include <Zeni/Define.h>
41 
42 namespace Zeni {
43 
44  class ZENI_AUDIO_DLL Sound_Renderer {
45  public:
46  virtual ~Sound_Renderer() {}
47 
48  virtual void set_listener_position(const Point3f &/*position*/) {}
49  virtual void set_listener_velocity(const Vector3f &/*velocity*/) {}
50  virtual void set_listener_forward_and_up(const Vector3f &/*forward*/, const Vector3f &/*up*/) {}
51  virtual void set_listener_gain(const float &/*gain*/) {}
52 
53  virtual Point3f get_listener_position() const {return Point3f();}
54  virtual Vector3f get_listener_velocity() const {return Vector3f();}
55  virtual std::pair<Vector3f, Vector3f> get_listener_forward_and_up() const {return std::make_pair(ZENI_DEFAULT_FORWARD_VECTOR, ZENI_DEFAULT_UP_VECTOR);}
56  };
57 
59 
60 }
61 
62 #include <Zeni/Undefine.h>
63 
64 #endif
virtual Point3f get_listener_position() const
Get the position of the listener and BGM.
virtual void set_listener_position(const Point3f &)
Set the position of the listener and BGM.
virtual void set_listener_forward_and_up(const Vector3f &, const Vector3f &)
Set the orientation of the listener.
A 3D Point represented with floats.
Definition: Coordinate.h:133
virtual void set_listener_velocity(const Vector3f &)
Set the velocity of the listener and BGM for the doppler effect.
A Featureful 3-Space Vector Class.
Definition: Vector3f.h:58
virtual Vector3f get_listener_velocity() const
Get the velocity of the listener and BGM.
virtual void set_listener_gain(const float &)
Set the listener gain.
virtual std::pair< Vector3f, Vector3f > get_listener_forward_and_up() const
Set the orientation of the listener.
#define ZENI_DEFAULT_UP_VECTOR
Definition: Define.h:33
#define ZENI_DEFAULT_FORWARD_VECTOR
Definition: Define.h:32