Jamoma API  0.6.0.a19
Mic.h
1 // Mic.h
2 /***************************************************/
3 /*! \class Mic
4  \brief Microphone class
5
6  This class implements a microphone, which consists
7  of directivity pattern, a scalar gain, 3-d coordinates,
8  azimuth angle and elevation angle.
9
10  by Tristan Matthews and Nils Peters, 2007-2008.
11  */
12 /***************************************************/
13
14 #ifndef _MIC_H_
15 #define _MIC_H_
16
17 #include "Coordinate.h"
18 #include "Angle.h"
19 #include "Moveable.h"
20 #include "Properties.h"
21
22 class Mic : public Moveable {
23
24  private:
25  Angle aziAng_;
26  Angle eleAng_;
27  double dirGainA_;
28  double dirGainB_;
29  double dirPow_;
30  double distPow_;
31  double gain_;
32  double dbUnit_; // for exponential distance model
33  int distModel;
34  void init();
35
36  public:
37  //! Class constructor, taking 3d position and azimuth and elevation angles.
38  Mic(double x, double y, double z, double azi, double ele);
39
40  //! Reset microphone to default values.
41  void reset();
42
43  //! Set azimuth angle.
44  void azi(double angle);
45  //! Get azimuth angle.
46  double azi() const;
47
48  //! Set elevation angle.
49  void ele(double angle);
50  //! Get elevation angle.
51  double ele() const;
52
53  //! Set gain.
54  void gain(double newGain);
55  //! Get gain.
56  double gain() const;
57
58  //! Set directivity gain a.
59  void dirGainA(double newDirGainA);
60  //! Get directivity gain a.
61  double dirGainA() const;
62  //! Get directivity gain b.
63  double dirGainB() const;
64
65  //! Set directivity power.
66  void dirPow(double newDirPow);
67  //! Get directivity power.
68  double dirPow() const;
69
70  //! Set distance power.
71  void distPow(double newDistPow);
72  //! Get distance power.
73  double distPow() const;
74
75  //! Set dbUnit for exponential distance model.
76  void dbUnit(double newDbUnit);
77  //! Get distance power.
78  double dbUnit() const;
79
80
81  //! Print position in x,y,z.
82  virtual void printPos() const;
83  //! Print azimuth and elevation.
84  void printAngles() const;
85
86  //! Class destructor.
87  virtual ~Mic();
88 };
89
90 #endif
91 // vim:sw=4:et:cindent:
double gain() const
Get gain.
Definition: Mic.cpp:249
double azi() const
Get azimuth angle.
Definition: Mic.cpp:76
virtual void printPos() const
Print position in x,y,z.
Definition: Mic.cpp:37
void printAngles() const
Print azimuth and elevation.
Definition: Mic.cpp:42
Mic(double x, double y, double z, double azi, double ele)
Class constructor, taking 3d position and azimuth and elevation angles.
Definition: Mic.cpp:24
double distPow() const
Get distance power.
Definition: Mic.cpp:188
virtual ~Mic()
Class destructor.
Definition: Mic.cpp:254
void reset()
Reset microphone to default values.
Definition: Mic.cpp:47
double dirPow() const
Get directivity power.
Definition: Mic.cpp:158
double dirGainB() const
Get directivity gain b.
Definition: Mic.cpp:126
Microphone class.
Definition: Mic.h:22
double dirGainA() const
Get directivity gain a.
Definition: Mic.cpp:121
double ele() const
Get elevation angle.
Definition: Mic.cpp:91
double dbUnit() const
Get distance power.
Definition: Mic.cpp:217
Moveable class.
Definition: Moveable.h:18
Angle class.
Definition: Angle.h:18