Renaming file base

parent 9b68e944
......@@ -15,20 +15,21 @@ include_directories( "include" )
# sources
set( ITAPropagationModelHeader
"include/ITAPropagationModelsBase.h"
"include/ITAPropagationModelsDefinitions.h"
"include/ITADiffractionFilter.h"
"include/ITAPropagationModelFilterGenerator.h"
"include/ITAPropagationModelKirchhoff.h"
"include/ITAPropagationModelSvensson.h"
"include/ITAPropagationModelUTD.h"
set( ITAPropagationModelsHeader
"include/ITAPropagationModels/Base.h"
"include/ITAPropagationModels/Definitions.h"
"include/ITAPropagationModels/FilterEngine.h"
"include/ITAPropagationModels/FilterGenerator.h"
"include/ITAPropagationModels/Kirchhoff.h"
"include/ITAPropagationModels/Svensson.h"
"include/ITAPropagationModels/UTD.h"
)
set( ITAPropagationModelSources
"src/ITAPropagationModelFilterGenerator.cpp"
"src/ITAPropagationModelKirchhoff.cpp"
"src/ITAPropagationModelSvensson.cpp"
"src/ITAPropagationModelUTD.cpp"
set( ITAPropagationModelsSources
"src/ITAPropagationModels/FilterEngine.cpp"
"src/ITAPropagationModels/FilterGenerator.cpp"
"src/ITAPropagationModels/Kirchhoff.cpp"
"src/ITAPropagationModels/Svensson.cpp"
"src/ITAPropagationModels/UTD.cpp"
)
......@@ -56,7 +57,7 @@ add_definitions( -D_USE_MATH_DEFINES -DNOMINMAX )
# linker
add_library( ITAPropagationModels ${ITAPropagationModelHeader} ${ITAPropagationModelSources} )
add_library( ITAPropagationModels ${ITAPropagationModelsHeader} ${ITAPropagationModelsSources} )
target_link_libraries( ITAPropagationModels ${VISTA_USE_PACKAGE_LIBRARIES} )
......
......@@ -25,6 +25,11 @@
#include <ITASampleBuffer.h>
//! Diffraction filter impulse response in time domain
/**
*
* Because only the diffraction part is described, leading
* zeros from the propagation delay is discarded in the IR.
*/
class ITA_PROPAGATION_MODELS_API CITADiffractionFilter
{
CITADiffractionFilter();
......
......@@ -25,28 +25,54 @@
// ITA includes
#include <ITAGeoBase.h>
#include <ITAHDFTSpectra.h>
#include <ITAHDFTSpectrum.h>
// STL includes
#include <vector>
//! Diffraction filter generator for propagation paths with diffraction anchors
class ITA_PROPAGATION_MODELS_API CITADiffractionFilterGenerator
namespace ITAPropagationModels
{
public:
enum AcousticDiffractionModel
//! Transfer function filter generator for propagation paths
/**
* Generates transfer functions in the frequency-domain that
* can be used as filters, e.g. for auralization.
*/
class ITA_PROPAGATION_MODELS_API CTFGenerator
{
MODEL_MAEKAWA = 1,
MODEL_KIRCHOFF,
MODEL_BIOT_TOLSTOY,
MODEL_BIOT_TOLSTOY_MEDWIN,
};
public:
//! Construct a generator with predetermined output channels, e.g. for binaural or SH filters
/**
* @param[in] iNumOutputChannels Number of output channels
* @param[in] iDFTSize Length of the DFT used to construct and combine filter components
*/
CTFGenerator( const int iNumOutputChannels, const int iDFTSize = 128 );
//! Cunstruct a generator with matching properties of a target spectrum
inline CTFGenerator( const ITABase::CHDFTSpectrum& pTransferFunction )
: CTFGenerator( 1, pTransferFunction.GetDFTSize() )
{
};
CITADiffractionFilterGenerator( int iModel = MODEL_BIOT_TOLSTOY_MEDWIN );
//! Cunstruct a generator with matching properties of multi-channel target spectra
CTFGenerator( const ITABase::CHDFTSpectra& pTransferFunctions )
: CTFGenerator( pTransferFunctions.GetNumChannels(), pTransferFunctions.GetDFTSize() )
{
};
// @todo move CITADiffractionWedgeAperture to ITABase
//void GenerateFIR( const ITAGeo::CPropagationAnchor& oSource, const ITAGeo::CPropagationAnchor& oDestination, CITADiffractionWedgeAperture& oWedge, CITADiffractionFilter& oFilter );
private:
int m_iModel;
};
//! Generate a single-channel transfer function
inline void GenerateTF( ITABase::CHDFTSpectrum& pTransferFunction )
{
const std::vector< ITABase::CHDFTSpectrum* > vpSpectra = { &( pTransferFunction ) };
GenerateTF( ITABase::CHDFTSpectra( vpSpectra ) );
};
//! Generate a multi-channel transfer function
inline void GenerateTF( ITABase::CHDFTSpectra& pTransferFunctions );
private:
};
}
#endif // INCLUDE_WATCHER_ITA_PROPAGATION_MODELS_FILTER_GENERATOR
/*
* ----------------------------------------------------------------
*
* ITA geometrical acoustics
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2018
*
* ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
*
*/
#ifndef INCLUDE_WATCHER_ITA_PROPAGATION_MODELS_FILTER_GENERATOR
#define INCLUDE_WATCHER_ITA_PROPAGATION_MODELS_FILTER_GENERATOR
#include <ITAPropagationModelsDefinitions.h>
#include <ITADiffractionFilter.h>
#include <ITAPropagationModelsBase.h>
// ITA includes
#include <ITAGeoBase.h>
#include <ITAHDFTSpectra.h>
#include <ITAHDFTSpectrum.h>
// STL includes
#include <vector>
namespace ITAPropagationModels
{
//! Transfer function filter generator for propagation paths
/**
* Generates transfer functions in the frequency-domain that
* can be used as filters, e.g. for auralization.
*/
class ITA_PROPAGATION_MODELS_API CTFGenerator
{
public:
//! Construct a generator with predetermined output channels, e.g. for binaural or SH filters
/**
* @param[in] iNumOutputChannels Number of output channels
* @param[in] iDFTSize Length of the DFT used to construct and combine filter components
*/
CTFGenerator( const int iNumOutputChannels, const int iDFTSize = 128 );
//! Cunstruct a generator with matching properties of a target spectrum
inline CTFGenerator( const ITABase::CHDFTSpectrum& pTransferFunction )
: CTFGenerator( 1, pTransferFunction.GetDFTSize() )
{
};
//! Cunstruct a generator with matching properties of multi-channel target spectra
CTFGenerator( const ITABase::CHDFTSpectra& pTransferFunctions )
: CTFGenerator( pTransferFunctions.GetNumChannels(), pTransferFunctions.GetDFTSize() )
{
};
//! Generate a single-channel transfer function
inline void GenerateTF( ITABase::CHDFTSpectrum& pTransferFunction )
{
const std::vector< ITABase::CHDFTSpectrum* > vpSpectra = { &( pTransferFunction ) };
GenerateTF( ITABase::CHDFTSpectra( vpSpectra ) );
};
//! Generate a multi-channel transfer function
inline void GenerateTF( ITABase::CHDFTSpectra& pTransferFunctions );
private:
};
}
#endif // INCLUDE_WATCHER_ITA_PROPAGATION_MODELS_FILTER_GENERATOR
#include <ITAPropagationModelFilterGenerator.h>
// ITA includes
#include <ITAException.h>
#include <ITAGeoHalfedgeMeshModel.h>
// Vista includes
#include <VistaMath/VistaGeometries.h>
// STL includes
#include <assert.h>
#include <stdio.h>
using namespace ITAGeo;
CTFGenerator::CFilterGenerator( int iModel )
: m_iModel( iModel )
{
}
/* see @todo
void CITAFilterGenerator::GenerateFIR( const CPropagationAnchor& oSource, const CPropagationAnchor& oDestination, CITADiffractionWedgeAperture& oWedge, CITADiffractionFilter& oFilter )
{
}
*/
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment