Improving portals interface

parent 79f02598
......@@ -541,19 +541,11 @@ public:
//! Initializing constructor
/**
* @param[in] sID Identifier string
<<<<<<< HEAD
* @param[in] iType Signal source type
* @param[in] sName Name of signal source info
* @param[in] sDesc Brief description of signal source info
* @param[in] sState State description of signal source info
* @param[in] iReference Usage reference counter
=======
* @param[in] iType Type
* @param[in] sName Name of signal source info
* @param[in] sDesc Brief description of signal source info
* @param[in] sState State description of signal source info
* @param[in] iReferences Usage reference counter
>>>>>>> 97ef3d5f8f255a5f334144c02fd00c96b099f8bf
*/
inline CVASignalSourceInfo( const std::string& sID, const int iType, const std::string& sName, const std::string& sDesc, const std::string& sState, const int iReferences )
: sID( sID )
......
......@@ -102,6 +102,7 @@ public:
static const int VA_AURAMODE_SPREADING_LOSS = ( 1 << 10 ); //!< Spherical spreading loss
static const int VA_AURAMODE_TRANSMISSION = ( 1 << 11 ); //!< Sound transmission
static const int VA_AURAMODE_ABSORPTION = ( 1 << 12 ); //!< Sound absorption
static const int VA_AURAMODE_LAST = ( 1 << 13 ); //! For validation checking, increase for more modes!
//! Default auralization mode (alias)
static const int VA_AURAMODE_DEFAULT = VA_AURAMODE_DIRECT_SOUND |
......@@ -1666,64 +1667,170 @@ public:
//! Create a sound portal
/**
* This method creates a new sound portal and returns its ID.
*
* @param[in] sName Name (optional)
*
* @return ID of the new sound portal, if the method succeeded, -1 otherwise
*/
virtual int CreateSoundPortal( const std::string& sName = "" ) = 0;
//! Return all portal IDs
/**
* @param[out] viIDs Sound portal identifiers
*/
virtual void GetSoundPortalIDs( std::vector< int >& viIDs ) = 0;
//! Return sound portal info
/**
* @param[in] iID Sound portal identifier
* @return Sound portal information
*/
virtual CVASoundPortalInfo GetSoundPortalInfo( const int iID ) const = 0;
//! Returns the name of a portal
/**
* @param[in] iID Sound portal identifier
* @return Verbatim name
*
*/
virtual std::string GetSoundPortalName( const int iID ) const = 0;
//! Sets the name of a portal
/**
* @param[in] iID Sound portal identifier
* @param[in] sName Verbatim name
*
*/
virtual void SetSoundPortalName( const int iID, const std::string& sName ) = 0;
//! Sound portal material setter
/**
* @param[in] iSoundPortalID Sound portal identifier
* @param[in] iMaterialID Assigned material identifier
*
*/
virtual void SetSoundPortalMaterial( const int iSoundPortalID, const int iMaterialID ) = 0;
//! Sound portal material getter
virtual int GetSoundPortalMaterial( const int iSoundPortalID ) const = 0;
/**
* @param[in] iID Sound portal identifier
* @return Assigned material identifier or -1
*
*/
virtual int GetSoundPortalMaterial( const int iID ) const = 0;
//! Sound portal next portal setter
/**
* @param[in] iSoundPortalID Sound portal identifier
* @param[in] iNextSoundPortalID Next connected sound portal identifier
*
*/
virtual void SetSoundPortalNextPortal( const int iSoundPortalID, const int iNextSoundPortalID ) = 0;
//! Sound portal next portal getter
virtual int GetSoundPortalNextPortal( const int iSoundPortalID ) const = 0;
/**
* @param[in] iID Sound portal identifier
* @return Next connected sound portal identifier, or -1
*
*/
virtual int GetSoundPortalNextPortal( const int iID ) const = 0;
//! Sound portal target sound receiver setter
/**
* @param[in] iSoundPortalID Sound portal identifier
* @param[in] iSoundReceiverID Connected sound receiver identifier
*
*/
virtual void SetSoundPortalSoundReceiver( const int iSoundPortalID, const int iSoundReceiverID ) = 0;
//! Sound portal target sound receiver getter
/**
* @param[in] iSoundPortalID Sound portal identifier
* @return Connected sound receiver identifier, or -1
*
*/
virtual int GetSoundPortalSoundReceiver( const int iSoundPortalID ) const = 0;
//! Sound portal sound source setter
/**
* @param[in] iSoundPortalID Sound portal identifier
* @param[in] iSoundSourceID Connected sound source identifier
*
*/
virtual void SetSoundPortalSoundSource( const int iSoundPortalID, const int iSoundSourceID ) = 0;
//! Sound portal sound source getter
/**
* @param[in] iSoundPortalID Sound portal identifier
* @return Connected sound source identifier, or -1
*
*/
virtual int GetSoundPortalSoundSource( const int iSoundPortalID ) const = 0;
virtual CVAStruct GetSoundPortalParameters( const int iID ) const = 0;
//! Get sound portal parameters
/**
* This general parameter getter can be used for quick solutions retrieving
* sound portal parameters without introducing new methods to the main interface.
*
* @param[in] iID Sound portal identifier
* @param[in] oParams Magic struct with the parameters that are requested
* @return Magic struct with the parameter values requested
*/
virtual CVAStruct GetSoundPortalParameters( const int iID, const CVAStruct& oParams ) const = 0;
//! Set sound portal parameters
/**
* This general parameter setter can be used for quick solutions changing
* sound portal parameters without introducing new methods to the main interface.
*
* @param[in] iID Sound portal identifier
* @param[in] oParams Magic struct with the parameters
*/
virtual void SetSoundPortalParameters( const int iID, const CVAStruct& oParams ) = 0;
//! Sound portal position setter
virtual void SetSoundPortalPosition( const int iSoundPortalID, const VAVec3& vPos ) = 0;
/**
* @param[in] iID Sound portal identifier
* @param[in] vPos Position vector
*/
virtual void SetSoundPortalPosition( const int iID, const VAVec3& vPos ) = 0;
//! Sound portal position getter
virtual VAVec3 GetSoundPortalPosition( const int iSoundPortalID ) const = 0;
/**
* @param[in] iID Sound portal identifier
* @return Position vector
*/
virtual VAVec3 GetSoundPortalPosition( const int iID ) const = 0;
//! Sound portal orientation setter
virtual void SetSoundPortalOrientation( const int iSoundPortalID, const VAQuat& qOrient ) = 0;
/**
* @param[in] iID Sound portal identifier
* @param[in] qOrient Orientation quaternion
*/
virtual void SetSoundPortalOrientation( const int iID, const VAQuat& qOrient ) = 0;
//! Sound portal orientation getter
virtual VAQuat GetSoundPortalOrientation( const int iSoundPortalID ) const = 0;
/**
* @param[in] iID Sound portal identifier
* @return Orientation quaternion
*/
virtual VAQuat GetSoundPortalOrientation( const int iID ) const = 0;
//! Sound portal enabled setter
virtual void SetSoundPortalEnabled( const int iSoundPortalID, const bool bEnabled = true ) = 0;
/**
* @param[in] iID Sound portal identifier
* @param[in] bEnabled Enables sound portal, if true
*/
virtual void SetSoundPortalEnabled( const int iID, const bool bEnabled = true ) = 0;
//! Sound portal orientation getter
virtual bool GetSoundPortalEnabled( const int iSoundPortalID ) const = 0;
/**
* @param[in] iID Sound portal identifier
* @return True, if enabled
*/
virtual bool GetSoundPortalEnabled( const int iID ) const = 0;
......
......@@ -83,7 +83,7 @@ bool IVAInterface::AddSearchPath( const std::string& sPath )
bool IVAInterface::GetAuralizationModeValid( const int iAuralizationMode )
{
return ( iAuralizationMode >= 0 ) && ( iAuralizationMode <= 2047 );
return ( iAuralizationMode >= 0 ) && ( iAuralizationMode <= VA_AURAMODE_LAST );
}
bool IVAInterface::GetVolumeValid( const double dVolume )
......
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