cAudio 2.3.0
3d Audio Engine
Loading...
Searching...
No Matches
IListener.h
1// Copyright (c) 2008-2011 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones, Murat (wolfmanfx) Sari
2// This file is part of the "cAudio Engine"
3// For conditions of distribution and use, see copyright notice in cAudio.h
4
5#pragma once
6
7#include "cVector3.h"
8#include "cAudioDefines.h"
9
10namespace cAudio
11{
14 {
15 public:
16 IListener() {}
17 virtual ~IListener() {}
18
20
24 virtual void setPosition(const cVector3& pos) = 0;
25
27
29 virtual void setDirection(const cVector3& dir) = 0;
30
32
34 virtual void setUpVector(const cVector3& up) = 0;
35
37
39 virtual void setVelocity(const cVector3& vel) = 0;
40
42
44 virtual void setMasterVolume(const float& volume) = 0;
45
47
49 virtual void move(const cVector3& pos) = 0;
50
52 virtual cVector3 getPosition(void) const = 0;
53
55 virtual cVector3 getDirection(void) const = 0;
56
58 virtual cVector3 getUpVector(void) const = 0;
59
61 virtual cVector3 getVelocity(void) const = 0;
62
64 virtual float getMasterVolume(void) const = 0;
65
66#if CAUDIO_EFX_ENABLED == 1
68
70 virtual void setMetersPerUnit(const float& meters) = 0;
71
73 virtual float getMetersPerUnit(void) const = 0;
74#endif
75 };
76}
77
Interface for the listener in cAudio. This class provides abilities to move and orient where your cam...
Definition: IListener.h:14
virtual void setVelocity(const cVector3 &vel)=0
Sets the current velocity of the listener for doppler effects.
virtual void move(const cVector3 &pos)=0
Convenience function to automatically set the velocity and position for you in a single call.
virtual float getMasterVolume(void) const =0
Returns the global volume modifier for all sources.
virtual cVector3 getUpVector(void) const =0
Returns the current up vector of the listener.
virtual void setMasterVolume(const float &volume)=0
Sets the global volume modifier (will effect all sources)
virtual cVector3 getVelocity(void) const =0
Returns the current velocity of the listener.
virtual cVector3 getPosition(void) const =0
Returns the current position of the listener.
virtual void setDirection(const cVector3 &dir)=0
Sets the direction the listener is facing.
virtual void setUpVector(const cVector3 &up)=0
Sets the up vector to use for the listener.
virtual void setPosition(const cVector3 &pos)=0
Sets the position of the listener.
virtual cVector3 getDirection(void) const =0
Returns the current direction of the listener.
Class for manipulating vectors in 3D space.
Definition: cVector3.h:23
Main namespace for the entire cAudio library.
Definition: cAudioCapture.h:16