Improving new API

parent 9aa17e4d
......@@ -399,9 +399,18 @@ class VABASE_API CVASceneInfo
public:
std::string sID; //!< Scene identifier
std::string sName; //!< Scene name
bool bEnabled;
CVAStruct oParams; //!< Scene parameters
inline virtual ~CVASceneInfo() {};
inline CVASceneInfo()
: bEnabled( true )
{
};
inline virtual ~CVASceneInfo()
{
};
};
......@@ -437,14 +446,16 @@ class VABASE_API CVASoundSourceInfo
public:
int iID; //!< ID
std::string sName; //!< Displayed name
VAVec3 v3Pos; //!< Position vector of location between ears [m]
VAVec3 v3View, v3Up; //!< Orientation of ears/eyes (view and up vectors in OpenGL convention)
VAQuat qOrient; //!< Orientation of ears/eyes (quaternion)
double dSpoundPower; //!< Sound power [W]
bool bMuted; //!< Muted?
int iSignalSourceID; //!< ID of assigned signal source (-1 => none)
int iDirectivityID; //!< ID of assigned directivity (-1 => none)
int iAuraMode; //!< Auralization mode (flags)
VAVec3 v3Pos; //!< Position vector of location between ears [m]
VAVec3 v3View, v3Up; //!< Orientation of ears/eyes (view and up vectors in OpenGL convention)
VAQuat qOrient; //!< Orientation of ears/eyes (quaternion)
CVAStruct oParams; //!< Special parameters
inline CVASoundSourceInfo()
......@@ -466,19 +477,29 @@ class VABASE_API CVASoundReceiverInfo
public:
int iID; //!< ID
std::string sName; //!< Displayed name
int iDirectivityID; //!< ID of assigned directivity (-1 => none)
int iAuraMode; //!< Auralization mode (flags)
double dSensivitity; //!< Sensitivity of receiving entity
bool bEnabled; //!< Enabled/disable from processing
VAVec3 v3Pos; //!< Position vector of location between ears [m]
VAVec3 v3View, vUp; //!< Orientation of ears/eyes (view and up vectors in OpenGL convention)
VAQuat qOrient; //!< Orientation of ears/eyes (quaternion)
VAVec3 v3HeadAboveTorsoOrientation; //!< Orientation of head above torso
int iDirectivityID; //!< ID of assigned directivity (-1 => none)
int iAuraMode; //!< Auralization mode (flags)
double dSensivitity; //!< Sensitivity of receiving entity
VAVec3 v3RealWorldPos; //!< Position vector of location between ears [m] in real world (from tracking)
VAVec3 v3RealWorldView, vRealWorldUp; //!< Orientation of ears/eyes (view and up vectors in OpenGL convention) in real world (from tracking)
VAQuat qRealWorldOrient; //!< Orientation of ears/eyes (quaternion) in real world (from tracking)
VAVec3 v3RealWorldHeadAboveTorsoOrientation; //!< Orientation of head above torso in real world (from tracking)
CVAStruct oParams; //!< Special parameters
inline CVASoundReceiverInfo()
: iID( -1 )
, iDirectivityID( -1 )
, iAuraMode( -1 )
, dSensivitity( 1.0f )
, bEnabled( true )
{};
virtual inline ~CVASoundReceiverInfo() {};
......@@ -491,13 +512,17 @@ class VABASE_API CVASoundPortalInfo
public:
int iID; //!< ID
std::string sName; //!< Displayed name (optional)
VAVec3 vPos; //!< Position vector [m]
VAVec3 vView, vUp; //!< View-/Up-vector
VAQuat qOrient; //!< Orientation (quaternion)
bool bEnabled;
int iMaterialID; //!< Material ID with transmission data
int iNextPortalID;
int iSoundReceiverID;
int iSoundSourceID;
VAVec3 vPos; //!< Position vector [m]
VAVec3 vView, vUp; //!< View-/Up-vector
VAQuat qOrient; //!< Orientation (quaternion)
CVAStruct oParams; //!< Special parameters
inline CVASoundPortalInfo()
......@@ -552,7 +577,7 @@ class VABASE_API CVAGeometryMesh
public:
int iID;
VAVec3 v3Point;
CVAVertex() : iID( -1 ) {};
inline CVAVertex() : iID( -1 ) {};
};
class CVAFace
......@@ -560,13 +585,19 @@ class VABASE_API CVAGeometryMesh
int iID;
int iMaterialID; //!< Assigned material
std::vector< int > viVertexList;
CVAFace() : iID( -1 ), iMaterialID( -1 ) {};
inline CVAFace() : iID( -1 ), iMaterialID( -1 ) {};
};
int iID;
bool bEnabled;
std::vector< CVAVertex > voVertices; //!< List of available vertices
std::vector< CVAFace > voFaces; //!< List of faces defined by vertices
CVAStruct oParams; //!< Additional parameters
inline CVAGeometryMesh()
: iID( -1 )
, bEnabled( true )
{};
};
#endif // IW_VABASE
......@@ -240,15 +240,14 @@ public:
//! Returns a struct with entries for each search paths
virtual CVAStruct GetSearchPaths() const = 0;
virtual int CreateDirectivityFromParameters( const CVAStruct& oParams, const std::string& sName = "" ) = 0;
//! Create a directivity from a file path
inline int CreateDirectivityFromFile( const std::string& sFilePath, const std::string& sName = "" )
{
CVAStruct oParams;
oParams[ "filepath" ] = sFilePath;
return CreateDirectivity( oParams, sName );
return CreateDirectivityFromParameters( oParams, sName );
};
virtual int CreateDirectivity( const CVAStruct& oParams, const std::string& sName = "" ) = 0;
virtual bool DeleteDirectivity( const int iID ) = 0;
virtual CVADirectivityInfo GetDirectivityInfo( const int iID ) const = 0;
virtual void GetDirectivityInfos( std::vector< CVADirectivityInfo >& voDest ) const = 0;
......@@ -258,7 +257,14 @@ public:
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 CVAAcousticMaterial& oMaterial, const std::string& sName = "" ) = 0;
virtual int CreateAcousticMaterialFromParameters( const CVAStruct& oParams, const std::string& sName = "" ) = 0;
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;
virtual CVAAcousticMaterial GetAcousticMaterialInfo( const int iID ) const = 0;
virtual void GetAcousticMaterialInfos( std::vector< CVAAcousticMaterial >& voDest ) const = 0;
......@@ -268,7 +274,14 @@ public:
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 CVAGeometryMesh& oMesh, const std::string& sName = "" ) = 0;
virtual int CreateGeometryMeshFromParameters( const CVAStruct& oParams, const std::string& sName = "" ) = 0;
inline int CreateGeometryMeshFromFile( const std::string& sFilePath, const std::string& sName = "" )
{
CVAStruct oParams;
oParams[ "filepath" ] = sFilePath;
return CreateGeometryMeshFromParameters( oParams, sName );
};
virtual bool DeleteGeometryMesh( const int iID ) = 0;
virtual CVAGeometryMesh GetGeometryMeshInfo( const int iID ) const = 0;
virtual void GetGeometryMeshIDs( std::vector< int >& viIDs ) const = 0;
......@@ -276,6 +289,8 @@ public:
virtual std::string GetGeometryMeshName( const int iID ) const = 0;
virtual void SetGeometryMeshParameters( const int iID, const CVAStruct& oParams ) = 0;
virtual CVAStruct GetGeometryMeshParameters( const int iID, const CVAStruct& oParams ) const = 0;
virtual void SetGeometryMeshEnabled( const int iID, const bool bEnabled = true ) = 0;
virtual bool GetGeometryMeshEnabled( const int iID ) const = 0;
//! Creates an audiofile signal source
......@@ -688,6 +703,12 @@ public:
//! Stummschaltung einer Schallquelle ein-/ausschalten
virtual void SetSoundSourceMuted( const int iID, const bool bMuted = true ) = 0;
//! Sound source pose getter (pose = position & orientation)
virtual void GetSoundSourcePose( const int iID, VAVec3& vPos, VAQuat& qOrient ) const = 0;
//! Sound source pose setter (pose = position & orientation)
virtual void SetSoundSourcePose( const int iID, const VAVec3& vPos, const VAQuat& qOrient ) = 0;
//! Position einer Schallquelle zurückgeben (Positionsvektor)
virtual VAVec3 GetSoundSourcePosition( const int iID ) = 0;
......@@ -809,6 +830,12 @@ public:
virtual void SetSoundReceiverGeometryMesh( const int iSoundReceiverID, const int iGeometryMeshID ) = 0;
//! Sound receiver pose getter (pose = position & orientation)
virtual void GetSoundReceiverPose( const int iID, VAVec3& vPos, VAQuat& qOrient ) const = 0;
//! Sound receiver pose setter (pose = position & orientation)
virtual void SetSoundReceiverPose( const int iID, const VAVec3& vPos, const VAQuat& qOrient ) = 0;
//! Position eines Hörers zurückgeben (Positionsvektor)
virtual VAVec3 GetSoundReceiverPosition( const int iID ) = 0;
......@@ -835,26 +862,28 @@ public:
//! Returns the position and orientation of the real-world listener's head
/**
* \note The parameter iListenerID has been added for future versions and is
* currently unsupported. You can set it any value you like.
*
* @note Coordinates refer the to center of the head on the axis
* which goes through both ears.
*/
virtual void GetListenerRealWorldEarsCenterPositionOrientationVU( const int iID, VAVec3& v3Pos, VAVec3& v3View, VAVec3& v3Up ) const = 0;
* \note The parameter iListenerID has been added for future versions and is
* currently unsupported. You can set it any value you like.
*
* @note Coordinates refer the to center of the head on the axis
* which goes through both ears.
*/
virtual void GetSoundReceiverRealWorldPositionOrientationVU( const int iID, VAVec3& v3Pos, VAVec3& v3View, VAVec3& v3Up ) const = 0;
//! Updates the position and orientation of the real-world listener's head
/**
* This function is used to provide the crosstalk-cancellation module
* with the current position of the listeners head in the real-world.
*
* \note The parameter iListenerID has been added for future versions and is
* currently unsupported. You can set it any value you like.
*
* @note Coordinates refer the to center of the head on the axis
* which goes through both ears.
*/
virtual void SetListenerRealWorldEarsCenterPositionOrientationVU( const int iID, const VAVec3& v3Pos, const VAVec3& v3View, const VAVec3& v3Up ) = 0;
* This function is used to provide the crosstalk-cancellation module
* with the current position of the listeners head in the real-world.
*
* \note The parameter iListenerID has been added for future versions and is
* currently unsupported. You can set it any value you like.
*
* @note Coordinates refer the to center of the head on the axis
* which goes through both ears.
*/
virtual void SetSoundReceiverRealWorldPositionOrientationVU( const int iID, const VAVec3& v3Pos, const VAVec3& v3View, const VAVec3& v3Up ) = 0;
virtual void GetSoundReceiverRealWorldPose( const int iID, VAVec3& v3Pos, VAQuat& qOrient ) const = 0;
virtual void SetSoundReceiverRealWorldPose( const int iID, const VAVec3& v3Pos, const VAQuat& qOrient ) = 0;
//! Loads a scene from a file (e.g. RAVEN project file)
......@@ -866,6 +895,9 @@ public:
//! Retrieves information on the loaded scene
virtual CVASceneInfo GetSceneInfo() const = 0;
virtual void SetSceneEnabled( const std::string& sID, const bool bEnabled = true ) = 0;
virtual bool GetSceneEnabled( const std::string& sID ) const = 0;
//! Create a sound portal
virtual int CreateSoundPortal( const std::string& sName = "" ) = 0;
......@@ -921,6 +953,15 @@ public:
//! Sound portal orientation getter
virtual VAQuat GetSoundPortalOrientation( const int iSoundPortalID ) const = 0;
//! Sound portal enabled setter
virtual void SetSoundPortalEnabled( const int iSoundPortalID, const bool bEnabled = true ) = 0;
//! Sound portal orientation getter
virtual bool GetSoundPortalEnabled( const int iSoundPortalID ) const = 0;
//! Returns all available renderers (default: only those that are enabled)
/**
* @param [out] voRenderer List of renderers modules
......
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