Improving material and adding doxy comments

parent 9ccae0e1
......@@ -558,10 +558,16 @@ public:
};
//! Data class containing information of a sound portal (acoustic portal)
//! Data class containing information of an acoustic material
/**
* This data class holds information on acoustic materials such as
* absorption, scattering and transmission coefficients. Data has
* a type, a data vector for floating point values and a set of parametres.
*/
class VABASE_API CVAAcousticMaterial
{
public:
//! Material base frequency resolution
enum Type
{
UNSPECIFIED = -1,
......@@ -570,12 +576,15 @@ public:
ENERGETIC_BAND_FILTER_THIRD_OCTAVE,
};
int iID; //!< ID
int iType;
std::string sName;
CVAStruct oParams;
std::vector< float > vfValues;
int iID; //!< Material identifier
int iType; //!< Type, see #Type
std::string sName; //!< Verbatim name
CVAStruct oParams; //!< Parameters for prototyping
std::vector< float > vfAbsorptionValues; //!< Absorption values
std::vector< float > vfScatteringValues; //!< Scattering values
std::vector< float > vfTransmissionValues; //!< Transmission values
//! Instantiate empty material
inline CVAAcousticMaterial()
: iID( -1 )
{};
......
......@@ -337,22 +337,85 @@ public:
*/
virtual CVAStruct GetDirectivityParameters( const int iID, const CVAStruct& oParams ) const = 0;
//! Create acoustic material by passing material data
/**
* @param[in] oMaterial Material data
* @param[in] sName Verbatim name
* @return Identifier
*/
virtual int CreateAcousticMaterial( const CVAAcousticMaterial& oMaterial, const std::string& sName = "" ) = 0;
//! Create acoustic material based on magic parameter set (for prototyping)
/**
* @param[in] oParams Material parameters
* @param[in] sName Verbatim name
* @return Identifier
*/
virtual int CreateAcousticMaterialFromParameters( const CVAStruct& oParams, const std::string& sName = "" ) = 0;
//! Create acoustic material from file path (e.g. 'mat' file)
/**
* @param[in] sFilePath Material file path
* @param[in] sName Verbatim name
* @return Identifier
*/
inline int CreateAcousticMaterialFromFile( const std::string& sFilePath, const std::string& sName = "" )
{
CVAStruct oParams;
oParams[ "filepath" ] = sFilePath;
return CreateAcousticMaterialFromParameters( oParams, sName );
};
virtual bool DeleteAcousticMaterial( const int iID ) = 0;
//! Create acoustic material based on magic parameter set (for prototyping)
/**
* @param[in] iID Material identifier
* @return True, if material could be removed
*/
virtual bool DeleteAcousticMaterial( const int iID ) = 0;
//! Acoustic material info getter
/**
* @param[in] iID Material identifier
* @return Info on material
*/
virtual CVAAcousticMaterial GetAcousticMaterialInfo( const int iID ) const = 0;
virtual void GetAcousticMaterialInfos( std::vector< CVAAcousticMaterial >& voDest ) const = 0;
virtual void SetAcousticMaterialName( const int iID, const std::string& sName ) = 0;
//! Acoustic material info getter for entire database
/**
* @param[out] voDest Vector with material infos
*/
virtual void GetAcousticMaterialInfos( std::vector< CVAAcousticMaterial >& voDest ) const = 0;
//! Acoustic material name getter
/**
* @param[in] iID Material identifier
* @return Verbatim name
*/
virtual std::string GetAcousticMaterialName( const int iID ) const = 0;
virtual void SetAcousticMaterialParameters( const int iID, const CVAStruct& oParams ) = 0;
//! Acoustic material name setter
/**
* @param[in] iID Material identifier
* @param[in] sName Verbatim name
*/
virtual void SetAcousticMaterialName( const int iID, const std::string& sName ) = 0;
//! Acoustic material name getter
/**
* @param[in] iID Material identifier
* @param[in] oParams Material parameter request arguments
* @return Material parameters
*/
virtual CVAStruct GetAcousticMaterialParameters( const int iID, const CVAStruct& oParams ) const = 0;
//! Acoustic material parameter setter
/**
* @param[in] iID Material identifier
* @param[in] oParams Material parameters
*/
virtual void SetAcousticMaterialParameters( const int iID, const CVAStruct& oParams ) = 0;
//! Create a geometry mesh with mesh infos
/**
......
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