Amuse
Emitter.hpp
1 #ifndef __AMUSE_EMITTER_HPP__
2 #define __AMUSE_EMITTER_HPP__
3 
4 #include "Entity.hpp"
5 #include <memory>
6 
7 namespace amuse
8 {
9 class Voice;
10 
11 using Vector3f = float[3];
12 
14 class Emitter : public Entity
15 {
16  std::shared_ptr<Voice> m_vox;
17 
18  friend class Engine;
19  void _destroy();
20 public:
21  ~Emitter();
22  Emitter(Engine& engine, const AudioGroup& group, std::shared_ptr<Voice>&& vox);
23 
24  void setPos(const Vector3f& pos);
25  void setDir(const Vector3f& dir);
26  void setMaxDist(float maxDist);
27  void setMaxVol(float maxVol);
28  void setMinVol(float minVol);
29  void setFalloff(float falloff);
30 
31  std::shared_ptr<Voice>& getVoice() {return m_vox;}
32 };
33 
34 }
35 
36 #endif // __AMUSE_EMITTER_HPP__