Commit 8cb093ad authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen

Merge branch 'develop'

parents 279f5a27 91b43829
......@@ -31,12 +31,6 @@
#include <ITAStreamInfo.h>
#include <ITAFastMath.h>
#include <RG_Polygon.h>
#include <RG_Line.h>
#include <RG_Line2D.h>
#include <RG_Ops.h>
#include <iostream>
#include <string>
#include <sstream>
......@@ -62,16 +56,9 @@ CVAVBAPFreeFieldAudioRenderer::CVAVBAPFreeFieldAudioRenderer( const CVAAudioRend
if( m_pOutput == nullptr )
VA_EXCEPT2( INVALID_PARAMETER, "Unrecognized output '" + sOutput + "' in VBAP Freefield Renderer." );
// Koordinaten und Auralisierung festlegen (mko: AuraMode? Wozu? Raumakustik?)
m_iCurGlobalAuralizationMode = IVAInterface::VA_AURAMODE_DEFAULT;
m_vecCaveCenterPos.SetValues( 0.0f, 0.0f, 0.0f );
m_vecCaveCenterOrientYPR.SetToZeroVector();
m_vRotRoll.SetValues( 0.0f, 0.0f, -1.0f );
m_vRotPitch.SetValues( 1.0f, 0.0f, 0.0f );
m_vRotYaw.SetValues( 0.0f, 1.0f, 0.0f );
// Fill loudspeaker vector
for( size_t i = 0; i < m_pOutput->vpDevices.size(); i++ )
{
......@@ -214,10 +201,10 @@ void CVAVBAPFreeFieldAudioRenderer::UpdateScene( CVASceneState* pNewSceneState )
// Use first listener as the user of VBAP system
iListenerID = viListenerIDs[ 0 ];
m_vUserPosVirtualScene = m_pNewSceneState->GetReceiverState( iListenerID )->GetMotionState()->GetPosition();
m_oParams.pCore->GetListenerRealWorldHeadPositionOrientationVU( iListenerID, px, py, pz, vx, vy, vz, ux, uy, uz );
VAVec3 p, v, u;
m_oParams.pCore->GetSoundReceiverRealWorldPositionOrientationVU( iListenerID, p, v, u );
ConvertVU2YPR_RAD( VAVec3( vx, vy, vz ), VAVec3( ux, uy, uz ), m_oUserYPRRealWorldRAD );
m_vUserPosRealWorld.Set( float( px ), float( py ), float( pz ) );
m_vUserPosRealWorld.Set( float( p.x ), float( p.y ), float( p.z ) );
// Define reproduction system in virtual scene
m_vReproSystemVirtualPosition = m_vUserPosVirtualScene - m_vUserPosRealWorld;
......@@ -510,11 +497,6 @@ bool CVAVBAPFreeFieldAudioRenderer::IsSourceDirectionWithinSection( const VAVec3
return false;
}
void CVAVBAPFreeFieldAudioRenderer::Triangulation()
{
VA_EXCEPT2( NOT_IMPLEMENTED, "Automatic triangulation of VBAP sections not implemented, please define sections in configuration" );
}
bool CVAVBAPFreeFieldAudioRenderer::CalculateLoudspeakerGains3D( const VAVec3& vSoundSource, std::vector< double >& vdLoudspeakerGains ) const
{
const CSection* pActiveSection = NULL;
......@@ -655,14 +637,14 @@ bool CVAVBAPFreeFieldAudioRenderer::CalculateLoudspeakerGains2D( const VAVec3& v
VAVec3 CVAVBAPFreeFieldAudioRenderer::GetSourcePosition( const CVAMotionState* pMotionState )
{
RG_Vector vSoundSource;
VAVec3 vSoundSource;
vSoundSource.x = ( pMotionState->GetPosition().x - m_vReproSystemVirtualPosition.x );
vSoundSource.y = ( pMotionState->GetPosition().y - m_vReproSystemVirtualPosition.y );
vSoundSource.z = ( pMotionState->GetPosition().z - m_vReproSystemVirtualPosition.z );
RG_Vector vRotYaw( m_vRotYaw[ 0 ], m_vRotYaw[ 1 ], m_vRotYaw[ 2 ] );
RG_Vector vRotPitch( m_vRotPitch[ 0 ], m_vRotPitch[ 1 ], m_vRotPitch[ 2 ] );
RG_Vector vRotRoll( m_vRotRoll[ 0 ], m_vRotRoll[ 1 ], m_vRotRoll[ 2 ] );
VAVec3 vRotYaw( m_vRotYaw[ 0 ], m_vRotYaw[ 1 ], m_vRotYaw[ 2 ] );
VAVec3 vRotPitch( m_vRotPitch[ 0 ], m_vRotPitch[ 1 ], m_vRotPitch[ 2 ] );
VAVec3 vRotRoll( m_vRotRoll[ 0 ], m_vRotRoll[ 1 ], m_vRotRoll[ 2 ] );
vSoundSource.rotatedAround( vRotYaw, float( m_oUserYPRRealWorldRAD.yaw ) );
vSoundSource.rotatedAround( vRotPitch, float( m_oUserYPRRealWorldRAD.pitch ) );
......
......@@ -94,10 +94,10 @@ private:
VAVec3 m_vUserPosVirtualScene; //!< Position des Hoerers in der virtuellen Umgebung
VAVec3 m_vUserPosRealWorld; //!< Position des Hrers in der CAVE (oder im Reproduktionssystem)
VAVec3 m_vReproSystemVirtualPosition; //!< Position der CAVE (oder des Reproduktionssystems) in der virtuellen Welt
VAOrientYPR m_oUserYPRRealWorldRAD; //!< Orientierung des Hoerers in der Cave (im Reproduktionssystem), Gieren, Nicken, Rollen
VAOrientYPR m_oUserYPRVirtualScene; //!< Orientierung des Hoerers in der virtuellen Umgebung, Gieren, Nicken, Rollen
VistaVector3D m_vRotYaw, m_vRotPitch, m_vRotRoll; //!< Hilfsvektoren zum rotieren, um diese Achsen wird rotiert
VAVec3 m_vReproSystemVirtualPosition; //!< Position der CAVE (oder des Reproduktionssystems) in der virtuellen Welt. Center position of loudspeaker array.
//VAOrientYPR m_oUserYPRRealWorldRAD; //!< Orientierung des Hoerers in der Cave (im Reproduktionssystem), Gieren, Nicken, Rollen
//VAOrientYPR m_oUserYPRVirtualScene; //!< Orientierung des Hoerers in der virtuellen Umgebung, Gieren, Nicken, Rollen
//VistaVector3D m_vRotYaw, m_vRotPitch, m_vRotRoll; //!< Hilfsvektoren zum rotieren, um diese Achsen wird rotiert
enum DIMENSIONS
{
......@@ -114,7 +114,6 @@ private:
int iIdentifier;
int iChannel;
VistaVector3D pos;
VistaVector3D orient;
};
// Sections
......@@ -160,11 +159,6 @@ private:
ITADatasourceRealization* m_pdsOutput; //!< Output datasource
//! Generates sections from the given loudspeaker set-up
/**
* @todo CGAL oder qHull
*/
void Triangulation();
//! Checks if a direction (from center point of the VBAP loudspeaker setup) is within a defined section
......
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