zenilib: zenilib/jni/external/zenilib/zeni_audio/Zeni/Sound_Renderer.h Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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
58 class Sound_Renderer_NULL : public Sound_Renderer {};
59
60 }
61
62 #include <Zeni/Undefine.h>
63
64 #endif
Zeni::Sound_Renderer_NULL
Definition: Sound_Renderer.h:58
Zeni::Sound_Renderer::get_listener_position
virtual Point3f get_listener_position() const
Get the position of the listener and BGM.
Definition: Sound_Renderer.h:53
Zeni::Sound_Renderer::set_listener_position
virtual void set_listener_position(const Point3f &)
Set the position of the listener and BGM.
Definition: Sound_Renderer.h:48
Zeni::Sound_Renderer
Definition: Sound_Renderer.h:44
Undefine.h
Zeni::Sound_Renderer::set_listener_forward_and_up
virtual void set_listener_forward_and_up(const Vector3f &, const Vector3f &)
Set the orientation of the listener.
Definition: Sound_Renderer.h:50
Zeni::Point3f
A 3D Point represented with floats.
Definition: Coordinate.h:133
Sound_Buffer.h
Coordinate.h
Zeni::Sound_Renderer::set_listener_velocity
virtual void set_listener_velocity(const Vector3f &)
Set the velocity of the listener and BGM for the doppler effect.
Definition: Sound_Renderer.h:49
Zeni::Vector3f
A Featureful 3-Space Vector Class.
Definition: Vector3f.h:58
Define.h
Zeni::Sound_Renderer::~Sound_Renderer
virtual ~Sound_Renderer()
Definition: Sound_Renderer.h:46
Zeni::Sound_Renderer::get_listener_velocity
virtual Vector3f get_listener_velocity() const
Get the velocity of the listener and BGM.
Definition: Sound_Renderer.h:54
Zeni::Sound_Renderer::set_listener_gain
virtual void set_listener_gain(const float &)
Set the listener gain.
Definition: Sound_Renderer.h:51
Zeni::Sound_Renderer::get_listener_forward_and_up
virtual std::pair< Vector3f, Vector3f > get_listener_forward_and_up() const
Set the orientation of the listener.
Definition: Sound_Renderer.h:55
ZENI_DEFAULT_UP_VECTOR
#define ZENI_DEFAULT_UP_VECTOR
Definition: Define.h:33
ZENI_DEFAULT_FORWARD_VECTOR
#define ZENI_DEFAULT_FORWARD_VECTOR
Definition: Define.h:32