reverberation_radius_filter.h 2.95 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
#ifndef INCLUDE_WATCHER_ITA_SIMULATION_SCHEDULER_AUDIBILITY_FILTER_REVERBERATION_RADIUS_FILTER
#define INCLUDE_WATCHER_ITA_SIMULATION_SCHEDULER_AUDIBILITY_FILTER_REVERBERATION_RADIUS_FILTER

// API includes
#include <ITA/simulation_scheduler/definitions.h>

// simulation scheduler includes
#include <ITA/simulation_scheduler/audibility_filter/audibility_filter_interface.h>

namespace ITA
{
12
	namespace SimulationScheduler
13
14
15
	{
		class CUpdateScene;

16
		namespace AudibilityFilter
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
		{
			///
			/// \brief Reverberation radius filter
			///
			/// This class implements a reverberation radius filter.
			/// When the receiver resides inside the reverberation radius around the source, the update is considered audible.
			/// 
			class ITA_SIMULATION_SCHEDULER_API CReverberationRadiusFilter : public IAudibilityFilter
			{
			public:
				///
				/// \brief Configuration class for the reverberation radius filter.
				///
				struct ITA_SIMULATION_SCHEDULER_API ReverberationRadiusFilterConfig : public IAudibilityFilter::AudibilityFilterConfig
				{
32
33
34
					explicit ReverberationRadiusFilterConfig ( );
					
					double dReverberationRadius = 5.0;
35

36
					VistaPropertyList Store ( ) const override;
37

38
					void Load ( const VistaPropertyList& oProperties ) override;
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
				};

				CReverberationRadiusFilter ( ) = delete;

				///
				/// \brief Constructor for a CReverberationRadiusFilter.
				///
				/// This constructor configures the CReverberationRadiusFilter with the given \p oConfig.
				/// \param oConfig the configuration for the CReverberationRadiusFilter.
				/// 
				explicit CReverberationRadiusFilter ( const ReverberationRadiusFilterConfig& oConfig );

				// 
				///
				/// \brief Check if the change between \p previousState and \p newUpdate is audible.
				///
Pascal Palenda's avatar
Pascal Palenda committed
55
				/// The change between \p previousState and \p newUpdate is audible when the receiver resides inside the configured radius around the source.
56
57
58
59
				/// \param previousState the previous state of the scene to check against.
				/// \param newUpdate the CUpdateScene to check for audibility.
				/// \return true if the change between \p previousState and \p newUpdate is audible, else false.
				/// 
60
				virtual bool ChangeIsAudible ( const CUpdateScene& previousState, const CUpdateScene& newUpdate ) const override;
61

62
63
64
65
				///
				/// \brief Return a unique type identifying string.
				/// \return a unique type identifying string.
				/// 
66
				static std::string GetType ( );
67

68
69
70
71
				///
				/// \brief Factory function for a filter.
				/// \remark This function should to be static.
				///
72
				static std::unique_ptr<IAudibilityFilter> CreateFilter ( const std::shared_ptr<IAudibilityFilter::AudibilityFilterConfig>& pConfig );
73
74
75
76
77
78
79

			private:
				///
				/// \brief The reverberation radius of the filter.
				/// 
				double m_dReverberationRadius;
			};
80
81
		} // namespace AudibilityFilter
	} // namespace SimulationScheduler
82
83
84
} // namespace ITA

#endif // INCLUDE_WATCHER_ITA_SIMULATION_SCHEDULER_AUDIBILITY_FILTER_REVERBERATION_RADIUS_FILTER