Removing Listener

parent 75c64e1a
This diff is collapsed.
......@@ -32,16 +32,16 @@ void TrackerDataHandler( sFrameOfMocapData* sFrame, void* pUserData )
if( !pVACore )
return;
// Listener
// SoundReceiver
int iTrackedReceiverID = pVAMatlabTracker->iTrackedSoundReceiverID;
int iTrackedReceiverRigidBodyIndex = pVAMatlabTracker->iTrackedListenerRigidBodyIndex;
int iTrackedReceiverRigidBodyIndex = pVAMatlabTracker->iTrackedSoundReceiverRigidBodyIndex;
if( ( iTrackedReceiverID != -1 ) && ( iTrackedReceiverRigidBodyIndex <= sFrame->nRigidBodies ) && ( iTrackedReceiverRigidBodyIndex > 0 ) )
{
try
{
VistaVector3D vPosOffsetLocalCoordinateSystem = pVAMatlabTracker->vTrackedSoundReceiverTranslation;
VistaQuaternion qOrientRotation = pVAMatlabTracker->qTrackedListenerRotation;
VistaQuaternion qOrientRotation = pVAMatlabTracker->qTrackedSoundReceiverRotation;
const sRigidBodyData& oBodyData( sFrame->RigidBodies[ iTrackedReceiverRigidBodyIndex - 1 ] );
VistaVector3D vPosPivotPoint( oBodyData.x, oBodyData.y, oBodyData.z );
......@@ -64,16 +64,16 @@ void TrackerDataHandler( sFrameOfMocapData* sFrame, void* pUserData )
// Real-world listener
int iTrackedRealWorldSoundReceiverID = pVAMatlabTracker->iTrackedRealWorldSoundReceiverID;
int iTrackedRealWorldListenerRigidBodyIndex = pVAMatlabTracker->iTrackedRealWorldListenerRigidBodyIndex;
int iTrackedRealWorldSoundReceiverRigidBodyIndex = pVAMatlabTracker->iTrackedRealWorldSoundReceiverRigidBodyIndex;
if( ( iTrackedRealWorldSoundReceiverID != -1 ) && ( iTrackedRealWorldListenerRigidBodyIndex <= sFrame->nRigidBodies ) && ( iTrackedRealWorldListenerRigidBodyIndex > 0 ) )
if( ( iTrackedRealWorldSoundReceiverID != -1 ) && ( iTrackedRealWorldSoundReceiverRigidBodyIndex <= sFrame->nRigidBodies ) && ( iTrackedRealWorldSoundReceiverRigidBodyIndex > 0 ) )
{
try
{
VistaVector3D vPosOffsetLocalCoordinateSystem = pVAMatlabTracker->vTrackedRealWorldListenerTranslation;
VistaQuaternion qOrientRotation = pVAMatlabTracker->qTrackedRealWorldListenerRotation;
VistaVector3D vPosOffsetLocalCoordinateSystem = pVAMatlabTracker->vTrackedRealWorldSoundReceiverTranslation;
VistaQuaternion qOrientRotation = pVAMatlabTracker->qTrackedRealWorldSoundReceiverRotation;
const sRigidBodyData& oBodyData( sFrame->RigidBodies[ iTrackedRealWorldListenerRigidBodyIndex - 1 ] );
const sRigidBodyData& oBodyData( sFrame->RigidBodies[ iTrackedRealWorldSoundReceiverRigidBodyIndex - 1 ] );
VistaVector3D vPosPivotPoint( oBodyData.x, oBodyData.y, oBodyData.z );
VistaQuaternion qOrientRaw( oBodyData.qx, oBodyData.qy, oBodyData.qz, oBodyData.qw );
......@@ -136,14 +136,14 @@ CVAMatlabTracker::CVAMatlabTracker()
void CVAMatlabTracker::Reset()
{
iTrackedSoundReceiverID = -1;
iTrackedListenerRigidBodyIndex = 1;
iTrackedSoundReceiverRigidBodyIndex = 1;
vTrackedSoundReceiverTranslation.SetToZeroVector();
qTrackedListenerRotation.SetToNeutralQuaternion();
qTrackedSoundReceiverRotation.SetToNeutralQuaternion();
iTrackedRealWorldSoundReceiverID = -1;
iTrackedRealWorldListenerRigidBodyIndex = 1;
vTrackedRealWorldListenerTranslation.SetToZeroVector();
qTrackedRealWorldListenerRotation.SetToNeutralQuaternion();
iTrackedRealWorldSoundReceiverRigidBodyIndex = 1;
vTrackedRealWorldSoundReceiverTranslation.SetToZeroVector();
qTrackedRealWorldSoundReceiverRotation.SetToNeutralQuaternion();
iTrackedSourceID = -1;
iTrackedSourceRigidBodyIndex = 1;
......
......@@ -38,14 +38,14 @@ public:
IVAInterface* pVACore; //!< Pointer to (networked) core instance
int iTrackedSoundReceiverID; //!< -1 if deactivated, will be preferred over source
int iTrackedListenerRigidBodyIndex; //!< Starts with 1 (default)
int iTrackedSoundReceiverRigidBodyIndex; //!< Starts with 1 (default)
VistaVector3D vTrackedSoundReceiverTranslation; //!< Position offset from pivot point (default NatNet rigid body barycenter)
VistaQuaternion qTrackedListenerRotation; //!< Orientation rotation from default orientation (initial NatNet rigid body orientation)
VistaQuaternion qTrackedSoundReceiverRotation; //!< Orientation rotation from default orientation (initial NatNet rigid body orientation)
int iTrackedRealWorldSoundReceiverID; //!< -1 if deactivated
int iTrackedRealWorldListenerRigidBodyIndex; //!< Starts with 1 (default)
VistaVector3D vTrackedRealWorldListenerTranslation; //!< Position offset from pivot point (default NatNet rigid body barycenter)
VistaQuaternion qTrackedRealWorldListenerRotation; //!< Orientation rotation from default orientation (initial NatNet rigid body orientation)
int iTrackedRealWorldSoundReceiverRigidBodyIndex; //!< Starts with 1 (default)
VistaVector3D vTrackedRealWorldSoundReceiverTranslation; //!< Position offset from pivot point (default NatNet rigid body barycenter)
VistaQuaternion qTrackedRealWorldSoundReceiverRotation; //!< Orientation rotation from default orientation (initial NatNet rigid body orientation)
int iTrackedSourceID; //!< -1 if deactivated
int iTrackedSourceRigidBodyIndex; //!< Starts with 1 (default)
......
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