VABinauralCluster.h 772 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
#ifndef IW_VACORE_BINAURALCLUSTER
#define IW_VACORE_BINAURALCLUSTER

// VA Includes
#include <VA.h>

// Utils
#include "../BinauralSoundSource/VABinauralSoundSource.h"


class VABinauralCluster : public CVAPoolObject
{
public:
	double maxError;

	VABinauralCluster();

	VABinauralCluster(const VABinauralCluster& cluster);

	~VABinauralCluster();

	void 
	init(VABinauralSoundSource* source);

	double
	getDistError(VABinauralSoundSource* source);

	void
	addSource(VABinauralSoundSource* source);

	void
	addSource(VABinauralSoundSource* source, double error);

	void
	removeSource();

	void
	reset();

private:
	int _numSources;

	VAVec3 _clusterSourcePos;

	double 
	cummulativeMovingAverage(int n, double average, double value);
};

#endif // IW_VACORE_BINAURALCLUSTER