Removing Listener

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