Commit 9aa17e4d authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Adding connecting methods of meshes for sound sources and receivers

parent 122a4a05
...@@ -237,21 +237,10 @@ public: ...@@ -237,21 +237,10 @@ public:
*/ */
virtual bool AddSearchPath( const std::string& sPath ); virtual bool AddSearchPath( const std::string& sPath );
//! Returns a struct with entries for all search paths //! Returns a struct with entries for each search paths
virtual CVAStruct GetSearchPaths() const = 0; virtual CVAStruct GetSearchPaths() const = 0;
//! Create a directivity from a file path //! Create a directivity from a file path
/**
* Loads a directivity from a file.
*
* \param sFilePath Filename
* \param sName Name (optional, e.g. "Trumpet")
*
* \return Directivity-ID
*
* \note Slashes and backslashed may safely be used.
* Paths are automatically converted into the system's convention.
*/
inline int CreateDirectivityFromFile( const std::string& sFilePath, const std::string& sName = "" ) inline int CreateDirectivityFromFile( const std::string& sFilePath, const std::string& sName = "" )
{ {
CVAStruct oParams; CVAStruct oParams;
...@@ -260,60 +249,32 @@ public: ...@@ -260,60 +249,32 @@ public:
}; };
virtual int CreateDirectivity( const CVAStruct& oParams, const std::string& sName = "" ) = 0; virtual int CreateDirectivity( const CVAStruct& oParams, const std::string& sName = "" ) = 0;
//! Frees a directivity
/**
* Frees a directivity and releases its memory.
* This is only possible if the directivity is not in use.
* Otherwise the method will do nothing.
*
* \param iID Directivity-ID
*
* \return true, if the directivity was successfully freed.
* false, otherwise
*/
virtual bool DeleteDirectivity( const int iID ) = 0; virtual bool DeleteDirectivity( const int iID ) = 0;
//! Retrieves information of a loaded directivity
virtual CVADirectivityInfo GetDirectivityInfo( const int iID ) const = 0; virtual CVADirectivityInfo GetDirectivityInfo( const int iID ) const = 0;
//! Retrieves information of all loaded directivities
virtual void GetDirectivityInfos( std::vector< CVADirectivityInfo >& voDest ) const = 0; virtual void GetDirectivityInfos( std::vector< CVADirectivityInfo >& voDest ) const = 0;
virtual void SetDirectivityName( const int iID, const std::string& sName ) = 0;
virtual std::string GetDirectivityName( const int iID ) const = 0;
virtual void SetDirectivityParameters( const int iID, const CVAStruct& oParams ) = 0; virtual void SetDirectivityParameters( const int iID, const CVAStruct& oParams ) = 0;
virtual CVAStruct GetDirectivityParameters( const int iID, const CVAStruct& oParams ) const = 0; virtual CVAStruct GetDirectivityParameters( const int iID, const CVAStruct& oParams ) const = 0;
virtual int CreateAcousticMaterial( const CVAStruct& oParams, const std::string& sName = "" ) = 0; virtual int CreateAcousticMaterial( const CVAStruct& oParams, const std::string& sName = "" ) = 0;
//! Frees a material
virtual bool DeleteAcousticMaterial( const int iID ) = 0; virtual bool DeleteAcousticMaterial( const int iID ) = 0;
//! Retrieves information of a loaded directivity
virtual CVAAcousticMaterial GetAcousticMaterialInfo( const int iID ) const = 0; virtual CVAAcousticMaterial GetAcousticMaterialInfo( const int iID ) const = 0;
//! Retrieves information of all loaded directivities
virtual void GetAcousticMaterialInfos( std::vector< CVAAcousticMaterial >& voDest ) const = 0; virtual void GetAcousticMaterialInfos( std::vector< CVAAcousticMaterial >& voDest ) const = 0;
virtual void SetAcousticMaterialName( const int iID, const std::string& sName ) = 0;
virtual std::string GetAcousticMaterialName( const int iID ) const = 0;
virtual void SetAcousticMaterialParameters( const int iID, const CVAStruct& oParams ) = 0; virtual void SetAcousticMaterialParameters( const int iID, const CVAStruct& oParams ) = 0;
virtual CVAStruct GetAcousticMaterialParameters( const int iID, const CVAStruct& oParams ) const = 0; virtual CVAStruct GetAcousticMaterialParameters( const int iID, const CVAStruct& oParams ) const = 0;
virtual int CreateGeometryMesh( const CVAStruct& oParams, const std::string& sName = "" ) = 0; virtual int CreateGeometryMesh( const CVAStruct& oParams, const std::string& sName = "" ) = 0;
//! Frees a material
virtual bool DeleteGeometryMesh( const int iID ) = 0; virtual bool DeleteGeometryMesh( const int iID ) = 0;
//! Retrieves information of a loaded directivity
virtual CVAGeometryMesh GetGeometryMeshInfo( const int iID ) const = 0; virtual CVAGeometryMesh GetGeometryMeshInfo( const int iID ) const = 0;
virtual void GetGeometryMeshIDs( std::vector< int >& viIDs ) const = 0;
//! Retrieves information of all loaded directivities virtual void SetGeometryMeshName( const int iID, const std::string& sName ) = 0;
virtual void GetGeometryMeshInfos( std::vector< CVAGeometryMesh >& voDest ) const = 0; virtual std::string GetGeometryMeshName( const int iID ) const = 0;
virtual void SetGeometryMeshParameters( const int iID, const CVAStruct& oParams ) = 0; virtual void SetGeometryMeshParameters( const int iID, const CVAStruct& oParams ) = 0;
virtual CVAStruct GetGeometryMeshParameters( const int iID, const CVAStruct& oParams ) const = 0; virtual CVAStruct GetGeometryMeshParameters( const int iID, const CVAStruct& oParams ) const = 0;
...@@ -639,6 +600,9 @@ public: ...@@ -639,6 +600,9 @@ public:
//! Signalquelle einer Schallquelle zurückgeben //! Signalquelle einer Schallquelle zurückgeben
virtual std::string GetSoundSourceSignalSource( const int iID ) const = 0; virtual std::string GetSoundSourceSignalSource( const int iID ) const = 0;
virtual int GetSoundSourceGeometryMesh( const int iID ) const = 0;
virtual void SetSoundSourceGeometryMesh( const int iSoundReceiverID, const int iGeometryMeshID ) = 0;
//! Attach a signal source to sound source //! Attach a signal source to sound source
/** /**
...@@ -800,7 +764,7 @@ public: ...@@ -800,7 +764,7 @@ public:
virtual std::string GetSoundReceiverName( const int iID ) const = 0; virtual std::string GetSoundReceiverName( const int iID ) const = 0;
//! Name eines Hörers setzen //! Name eines Hörers setzen
virtual void SetSoundRecceiverName( const int iID, const std::string& sName ) = 0; virtual void SetSoundReceiverName( const int iID, const std::string& sName ) = 0;
//! Auralisierungsmodus eines Hörers zurückgeben (Bitvektor) //! Auralisierungsmodus eines Hörers zurückgeben (Bitvektor)
virtual int GetSoundReceiverAuralizationMode( const int iID ) const = 0; virtual int GetSoundReceiverAuralizationMode( const int iID ) const = 0;
...@@ -837,10 +801,13 @@ public: ...@@ -837,10 +801,13 @@ public:
//! Set the HRIR dataset for a listener //! Set the HRIR dataset for a listener
/** /**
* \note In order to set no HRIR dataset, you can pass -1 to the method. * \note In order to set no HRIR dataset, you can pass -1 to the method.
*/ */
virtual void SetSoundReceiverDirectivity( const int iSoundReceiverID, const int iDirectivityID ) = 0; virtual void SetSoundReceiverDirectivity( const int iSoundReceiverID, const int iDirectivityID ) = 0;
virtual int GetSoundReceiverGeometryMesh( const int iID ) const = 0;
virtual void SetSoundReceiverGeometryMesh( const int iSoundReceiverID, const int iGeometryMeshID ) = 0;
//! Position eines Hörers zurückgeben (Positionsvektor) //! Position eines Hörers zurückgeben (Positionsvektor)
virtual VAVec3 GetSoundReceiverPosition( const int iID ) = 0; virtual VAVec3 GetSoundReceiverPosition( const int iID ) = 0;
......
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