Jamoma API  0.6.0.a19
Room.h
1 // Room.h
2 /***************************************************/
3 /*! \class Room
4  \brief Room class
5 
6  This class implements a room, composed of 4 walls, a ceiling
7  and a floor, as well as a sound source and reflections.
8 
9  by Tristan Matthews and Nils Peters, 2007-2008.
10  */
11 /***************************************************/
12 
13 #ifndef _ROOM_H_
14 #define _ROOM_H_
15 
16 #include "MicArray.h"
17 #include "Properties.h"
18 #include <vector>
19 
20 class Source; // forward declarations
21 class Mirror;
22 class HiMidLow;
23 class LowPass;
24 
25 class Room {
26  private:
27  double width_, depth_, height_;
28  short numMics_;
29  short reflOrder_;
30  bool mirrorFlag_;
31  int filtersPerMic_;
32  void printWalls();
33 
34  public: // FIXME: public data !!! gross
35  //! Sound source.
37  //! Sound mirrors.
39  //! Filters which simulate room damping.
41  //! Filters which simulate room damping for XFADE_LITE mode.
43  //! Filters which simulate air absorption.
45  //! Filters which simulate air absorption for XFADE_LITE mode.
47  //! Collection of mics.
49 
50  //! Class constructor.
51  Room(double newWidth, double newDepth, double newHeight, short numChannels, short numSources, short reflOrder);
52  //! Print information about this room and its contents.
53  void print();
54  //! Update mirrors.
55  void renderMirrors();
56  //! Allows source to notify mirror that it has changed.
57  void sourceChanged();
58 
59  //! Returns true if mirrors have changed.
60  bool mirrorFlag() const;
61  //! Get reflection order (either 0, 1 or 2).
62  short reflOrder() const;
63  //! Set width.
64  void width(double newWidth);
65  //! Set height.
66  void height(double newHeight);
67  //! Set depth.
68  void depth(double newDepth);
69  //! Get width.
70  double width() const;
71  //! Get height.
72  double height() const;
73  //! Get depth.
74  double depth() const;
75 
76  //! Get half width.
77  double halfWidth() const;
78  //! Get half height.
79  double halfHeight() const;
80  //! Get half depth.
81  double halfDepth() const;
82 
83  //! Class destructor.
84  ~Room();
85 };
86 
87 #endif
88 
89 // vim:sw=4:et:cindent:
MicArray mics
Collection of mics.
Definition: Room.h:48
Source * sources
Sound source.
Definition: Room.h:36
short reflOrder() const
Get reflection order (either 0, 1 or 2).
Definition: Room.cpp:323
void sourceChanged()
Allows source to notify mirror that it has changed.
Definition: Room.cpp:128
void print()
Print information about this room and its contents.
Definition: Room.cpp:121
LowPass * xfadeAir
Filters which simulate air absorption for XFADE_LITE mode.
Definition: Room.h:46
double depth() const
Get depth.
Definition: Room.cpp:184
HiMidLow filter class.
Definition: HiMidLow.h:22
double halfWidth() const
Get half width.
Definition: Room.cpp:194
double width() const
Get width.
Definition: Room.cpp:179
~Room()
Class destructor.
Definition: Room.cpp:87
Low pass filter class.
Definition: LowPass.h:22
LowPass ** air
Filters which simulate air absorption.
Definition: Room.h:44
Room(double newWidth, double newDepth, double newHeight, short numChannels, short numSources, short reflOrder)
Class constructor.
Definition: Room.cpp:29
double height() const
Get height.
Definition: Room.cpp:189
double halfDepth() const
Get half depth.
Definition: Room.cpp:199
bool mirrorFlag() const
Returns true if mirrors have changed.
Definition: Room.cpp:209
Sound mirror class.
Definition: Mirror.h:19
Mirror * mirrors
Sound mirrors.
Definition: Room.h:38
Sound source class.
Definition: Source.h:25
MicArray class.
Definition: MicArray.h:21
double halfHeight() const
Get half height.
Definition: Room.cpp:204
HiMidLow ** walls
Filters which simulate room damping.
Definition: Room.h:40
HiMidLow ** xfadeWalls
Filters which simulate room damping for XFADE_LITE mode.
Definition: Room.h:42
Room class.
Definition: Room.h:25
void renderMirrors()
Update mirrors.
Definition: Room.cpp:214