Compiling matlab tracking modifications

parent a7dd9604
......@@ -8,7 +8,8 @@ va = itaVA( 'localhost' )
L = va.createListener( 'itaVA_Tracked_Listener' );
% OptiTrack tracker conneection and listener updates
va.setTrackedListener( L )
va.setTrackedListener( L ) % For virtual scene / rendering
va.setTrackedRealWorldListener( L ) % For CTC reproductions
va.connectTracker
pause( 12 ) % Observe how you can move the virtual listener in VAGUI
va.disconnectTracker
......
......@@ -594,8 +594,10 @@ void IsTrackerConnected( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh
return;
}
// Tracked listener
REGISTER_PRIVATE_FUNCTION( SetTrackedListener );
DECLARE_FUNCTION_REQUIRED_INARG( SetTrackedListener, listenerID, "scalar number", "Listener ID" );
DECLARE_FUNCTION_REQUIRED_INARG( SetTrackedListener, listenerID, "scalar number", "Tracked listener ID" );
void SetTrackedListener( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 2 );
......@@ -607,8 +609,114 @@ void SetTrackedListener( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh
pConnection->pVAMatlabTracker->iTrackedListenerID = iListenerID;
}
REGISTER_PRIVATE_FUNCTION( SetTrackedListenerRigidBodyIndex );
DECLARE_FUNCTION_REQUIRED_INARG( SetTrackedListenerRigidBodyIndex, index, "scalar number", "Tracked listener rigid body index (default is 1)" );
void SetTrackedListenerRigidBodyIndex( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 2 );
ConnectionHandle hHandle = GetConnectionHandle( prhs[ 0 ] );
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
int iTrackedRigidBodyIndex = matlabGetIntegerScalar( prhs[ 1 ], "index" );
pConnection->pVAMatlabTracker->iTrackedListenerRigidBodyIndex = iTrackedRigidBodyIndex;
}
REGISTER_PRIVATE_FUNCTION( SetTrackedListenerRigidBodyTranslation );
DECLARE_FUNCTION_REQUIRED_INARG( SetTrackedListenerRigidBodyTranslation, offset, "real 1x3", "Tracked listener rigid body position offset" );
void SetTrackedListenerRigidBodyTranslation( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 2 );
ConnectionHandle hHandle = GetConnectionHandle( prhs[ 0 ] );
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
double x, y, z;
matlabGetRealVector3( prhs[ 1 ], "offset", x, y, z );
pConnection->pVAMatlabTracker->vTrackedListenerTranslation = VistaVector3D( float( x ), float( y ), float( z ) );
}
REGISTER_PRIVATE_FUNCTION( SetTrackedListenerRigidBodyRotation );
DECLARE_FUNCTION_REQUIRED_INARG( SetTrackedListenerRigidBodyRotation, rotation, "real 1x4", "Tracked listener rigid body rotation (quaternion values with w (real), i, j, k)" );
void SetTrackedListenerRigidBodyRotation( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 2 );
ConnectionHandle hHandle = GetConnectionHandle( prhs[ 0 ] );
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
double w, i, j, k;
matlabGetQuaternion( prhs[ 1 ], "rotation", w, i, j, k );
pConnection->pVAMatlabTracker->qTrackedListenerRotation = VistaQuaternion( float( i ), float( j ), float( k ), float( w ) );
}
// Tracked real-world listener
REGISTER_PRIVATE_FUNCTION( SetTrackedRealWorldListener );
DECLARE_FUNCTION_REQUIRED_INARG( SetTrackedRealWorldListener, realworldlistenerID, "scalar number", "Tracked real-world listener ID" );
void SetTrackedRealWorldListener( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 2 );
ConnectionHandle hHandle = GetConnectionHandle( prhs[ 0 ] );
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
int iRealWorldListenerID = matlabGetIntegerScalar( prhs[ 1 ], "realworldlistenerID" );
pConnection->pVAMatlabTracker->iTrackedRealWorldListenerID = iRealWorldListenerID;
}
REGISTER_PRIVATE_FUNCTION( SetTrackedRealWorldListenerRigidBodyIndex );
DECLARE_FUNCTION_REQUIRED_INARG( SetTrackedRealWorldListenerRigidBodyIndex, index, "scalar number", "Tracked real-world listener rigid body index (default is 1)" );
void SetTrackedRealWorldListenerRigidBodyIndex( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 2 );
ConnectionHandle hHandle = GetConnectionHandle( prhs[ 0 ] );
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
int iTrackedRigidBodyIndex = matlabGetIntegerScalar( prhs[ 1 ], "index" );
pConnection->pVAMatlabTracker->iTrackedRealWorldListenerRigidBodyIndex = iTrackedRigidBodyIndex;
}
REGISTER_PRIVATE_FUNCTION( SetTrackedRealWorldListenerRigidBodyTranslation );
DECLARE_FUNCTION_REQUIRED_INARG( SetTrackedRealWorldListenerRigidBodyTranslation, offset, "real 1x3", "Tracked real-world listener rigid body position offset" );
void SetTrackedRealWorldListenerRigidBodyTranslation( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 2 );
ConnectionHandle hHandle = GetConnectionHandle( prhs[ 0 ] );
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
double x, y, z;
matlabGetRealVector3( prhs[ 1 ], "offset", x, y, z );
pConnection->pVAMatlabTracker->vTrackedRealWorldListenerTranslation = VistaVector3D( float( x ), float( y ), float( z ) );
}
REGISTER_PRIVATE_FUNCTION( SetTrackedRealWorldListenerRigidBodyRotation );
DECLARE_FUNCTION_REQUIRED_INARG( SetTrackedRealWorldListenerRigidBodyRotation, rotation, "real 1x4", "Tracked real-world listener rigid body rotation (quaternion values with w (real), i, j, k)" );
void SetTrackedRealWorldListenerRigidBodyRotation( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 2 );
ConnectionHandle hHandle = GetConnectionHandle( prhs[ 0 ] );
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
double w, i, j, k;
matlabGetQuaternion( prhs[ 1 ], "rotation", w, i, j, k );
pConnection->pVAMatlabTracker->qTrackedRealWorldListenerRotation = VistaQuaternion( float( i ), float( j ), float( k ), float( w ) );
}
// Tracked source
REGISTER_PRIVATE_FUNCTION( SetTrackedSource );
DECLARE_FUNCTION_REQUIRED_INARG( SetTrackedSource, sourceID, "scalar number", "Source ID" );
DECLARE_FUNCTION_REQUIRED_INARG( SetTrackedSource, sourceID, "scalar number", "Tracked source ID" );
void SetTrackedSource( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 2 );
......@@ -617,14 +725,13 @@ void SetTrackedSource( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
int iSourceID = matlabGetIntegerScalar( prhs[ 1 ], "sourceID" );
if( pConnection->pVAMatlabTracker->iTrackedListenerID != -1 )
VA_EXCEPT2( MODAL_ERROR, "Can not use a tracked sound source if a listener is already tracked by this connection" );
pConnection->pVAMatlabTracker->iTrackedSourceID = iSourceID;
}
REGISTER_PRIVATE_FUNCTION( SetRigidBodyIndex );
DECLARE_FUNCTION_REQUIRED_INARG( SetRigidBodyIndex, index, "scalar number", "Rigid body index (default is 1)" );
void SetRigidBodyIndex( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
REGISTER_PRIVATE_FUNCTION( SetTrackedSourceRigidBodyIndex );
DECLARE_FUNCTION_REQUIRED_INARG( SetTrackedSourceRigidBodyIndex, index, "scalar number", "Tracked source rigid body index (default is 1)" );
void SetTrackedSourceRigidBodyIndex( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 2 );
......@@ -633,12 +740,12 @@ void SetRigidBodyIndex( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs
int iTrackedRigidBodyIndex = matlabGetIntegerScalar( prhs[ 1 ], "index" );
pConnection->pVAMatlabTracker->iRigidBodyIndex = iTrackedRigidBodyIndex;
pConnection->pVAMatlabTracker->iTrackedSourceRigidBodyIndex = iTrackedRigidBodyIndex;
}
REGISTER_PRIVATE_FUNCTION( SetRigidBodyTranslation );
DECLARE_FUNCTION_REQUIRED_INARG( SetRigidBodyTranslation, offset, "real 1x3", "Rigid body position offset" );
void SetRigidBodyTranslation( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
REGISTER_PRIVATE_FUNCTION( SetTrackedSourceRigidBodyTranslation );
DECLARE_FUNCTION_REQUIRED_INARG( SetTrackedSourceRigidBodyTranslation, offset, "real 1x3", "Tracked source rigid body position offset" );
void SetTrackedSourceRigidBodyTranslation( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 2 );
......@@ -648,12 +755,12 @@ void SetRigidBodyTranslation( int nlhs, mxArray *plhs[], int nrhs, const mxArray
double x, y, z;
matlabGetRealVector3( prhs[ 1 ], "offset", x, y, z );
pConnection->pVAMatlabTracker->vTranslation = VistaVector3D( float( x ), float( y ), float( z ) );
pConnection->pVAMatlabTracker->vTrackedSourceTranslation = VistaVector3D( float( x ), float( y ), float( z ) );
}
REGISTER_PRIVATE_FUNCTION( SetRigidBodyRotation );
DECLARE_FUNCTION_REQUIRED_INARG( SetRigidBodyRotation, rotation, "real 1x4", "Rigid body rotation (quaternion values with w (real), i, j, k)" );
void SetRigidBodyRotation( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
REGISTER_PRIVATE_FUNCTION( SetTrackedSourceRigidBodyRotation );
DECLARE_FUNCTION_REQUIRED_INARG( SetTrackedSourceRigidBodyRotation, rotation, "real 1x4", "Tracked source rigid body rotation (quaternion values with w (real), i, j, k)" );
void SetTrackedSourceRigidBodyRotation( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 2 );
......@@ -663,9 +770,10 @@ void SetRigidBodyRotation( int nlhs, mxArray *plhs[], int nrhs, const mxArray *p
double w, i, j, k;
matlabGetQuaternion( prhs[ 1 ], "rotation", w, i, j, k );
pConnection->pVAMatlabTracker->qRotation = VistaQuaternion( float( i ), float( j ), float( k ), float( w ) );
pConnection->pVAMatlabTracker->qTrackedSourceRotation = VistaQuaternion( float( i ), float( j ), float( k ), float( w ) );
}
/* +----------------------------------------------------------+ *
* | | *
* | Base functions | *
......
......@@ -10,9 +10,9 @@
// Tracking callback function
void TrackerDataHandler( sFrameOfMocapData* sFrame, void* pUserData )
{
CVAMatlabTracker* pVAMatlabTracker = (CVAMatlabTracker*) pUserData;
{
CVAMatlabTracker* pVAMatlabTracker = ( CVAMatlabTracker* ) pUserData;
if( !pVAMatlabTracker )
return;
......@@ -20,56 +20,96 @@ void TrackerDataHandler( sFrameOfMocapData* sFrame, void* pUserData )
if( !pVACore )
return;
// Listener
int iTrackedListenerID = pVAMatlabTracker->iTrackedListenerID;
int iTrackedSourceID = pVAMatlabTracker->iTrackedSourceID;
int iRigidBodyIndex = pVAMatlabTracker->iRigidBodyIndex;
if( iTrackedListenerID == -1 && iTrackedSourceID == -1 )
return;
int iTrackedListenerRigidBodyIndex = pVAMatlabTracker->iTrackedListenerRigidBodyIndex;
// iRigidBodyIndex begins with 1 (first index, Matlab style)
if( ( iRigidBodyIndex > sFrame->nRigidBodies ) || ( iRigidBodyIndex <= 0 ) )
return;
VistaVector3D vPosOffsetLocalCoordinateSystem = pVAMatlabTracker->vTranslation;
VistaQuaternion qOrientRotation = pVAMatlabTracker->qRotation;
const sRigidBodyData& oBodyData( sFrame->RigidBodies[ iRigidBodyIndex - 1 ] );
VistaVector3D vPosPivotPoint( oBodyData.x, oBodyData.y, oBodyData.z );
VistaQuaternion qOrientRaw( oBodyData.qx, oBodyData.qy, oBodyData.qz, oBodyData.qw );
VistaQuaternion qOrientRigidBody = qOrientRotation * qOrientRaw;
VistaVector3D vViewRigidBody = qOrientRigidBody.GetViewDir();
VistaVector3D vUpRigidBody = qOrientRigidBody.GetUpDir();
VistaVector3D vPosOffsetGlobalCoordinateSystem = qOrientRigidBody.Rotate( vPosOffsetLocalCoordinateSystem );
VistaVector3D vPosRigidBody = vPosPivotPoint + vPosOffsetGlobalCoordinateSystem;
try
if( ( iTrackedListenerID != -1 ) && ( iTrackedListenerRigidBodyIndex <= sFrame->nRigidBodies ) && ( iTrackedListenerRigidBodyIndex > 0 ) )
{
if( iTrackedListenerID != -1 )
try
{
pVACore->SetListenerPosition( iTrackedListenerID, vPosRigidBody[0], vPosRigidBody[1], vPosRigidBody[2] );
pVACore->SetListenerOrientationVU( iTrackedListenerID,
vViewRigidBody[0], vViewRigidBody[1], vViewRigidBody[2],
vUpRigidBody[0], vUpRigidBody[1], vUpRigidBody[2] );
pVACore->SetListenerRealWorldHeadPositionOrientationVU( iTrackedListenerID,
vPosRigidBody[0], vPosRigidBody[1], vPosRigidBody[2],
vViewRigidBody[0], vViewRigidBody[1], vViewRigidBody[2],
vUpRigidBody[0], vUpRigidBody[1], vUpRigidBody[2] );
VistaVector3D vPosOffsetLocalCoordinateSystem = pVAMatlabTracker->vTrackedListenerTranslation;
VistaQuaternion qOrientRotation = pVAMatlabTracker->qTrackedListenerRotation;
const sRigidBodyData& oBodyData( sFrame->RigidBodies[ iTrackedListenerRigidBodyIndex - 1 ] );
VistaVector3D vPosPivotPoint( oBodyData.x, oBodyData.y, oBodyData.z );
VistaQuaternion qOrientRaw( oBodyData.qx, oBodyData.qy, oBodyData.qz, oBodyData.qw );
VistaQuaternion qOrientRigidBody = qOrientRotation * qOrientRaw;
VistaVector3D vViewRigidBody = qOrientRigidBody.GetViewDir();
VistaVector3D vUpRigidBody = qOrientRigidBody.GetUpDir();
VistaVector3D vPosOffsetGlobalCoordinateSystem = qOrientRigidBody.Rotate( vPosOffsetLocalCoordinateSystem );
VistaVector3D vPosRigidBody = vPosPivotPoint + vPosOffsetGlobalCoordinateSystem;
pVACore->SetListenerPosition( iTrackedListenerID, vPosRigidBody[ 0 ], vPosRigidBody[ 1 ], vPosRigidBody[ 2 ] );
pVACore->SetListenerOrientationVU( iTrackedListenerID, vViewRigidBody[ 0 ], vViewRigidBody[ 1 ], vViewRigidBody[ 2 ], vUpRigidBody[ 0 ], vUpRigidBody[ 1 ], vUpRigidBody[ 2 ] );
}
if( iTrackedSourceID != -1 )
catch( ... )
{
pVACore->SetSoundSourcePosition( iTrackedSourceID, vPosRigidBody[0], vPosRigidBody[1], vPosRigidBody[2] );
pVACore->SetSoundSourceOrientationVU( iTrackedSourceID,
vViewRigidBody[0], vViewRigidBody[1], vViewRigidBody[2],
vUpRigidBody[0], vUpRigidBody[1], vUpRigidBody[2] );
}
}
catch( ... )
// Real-world listener
int iTrackedRealWorldListenerID = pVAMatlabTracker->iTrackedRealWorldListenerID;
int iTrackedRealWorldListenerRigidBodyIndex = pVAMatlabTracker->iTrackedListenerRigidBodyIndex;
if( ( iTrackedRealWorldListenerID != -1 ) && ( iTrackedRealWorldListenerRigidBodyIndex <= sFrame->nRigidBodies ) && ( iTrackedRealWorldListenerRigidBodyIndex > 0 ) )
{
return;
try
{
VistaVector3D vPosOffsetLocalCoordinateSystem = pVAMatlabTracker->vTrackedRealWorldListenerTranslation;
VistaQuaternion qOrientRotation = pVAMatlabTracker->qTrackedRealWorldListenerRotation;
const sRigidBodyData& oBodyData( sFrame->RigidBodies[ iTrackedRealWorldListenerRigidBodyIndex - 1 ] );
VistaVector3D vPosPivotPoint( oBodyData.x, oBodyData.y, oBodyData.z );
VistaQuaternion qOrientRaw( oBodyData.qx, oBodyData.qy, oBodyData.qz, oBodyData.qw );
VistaQuaternion qOrientRigidBody = qOrientRotation * qOrientRaw;
VistaVector3D vViewRigidBody = qOrientRigidBody.GetViewDir();
VistaVector3D vUpRigidBody = qOrientRigidBody.GetUpDir();
VistaVector3D vPosOffsetGlobalCoordinateSystem = qOrientRigidBody.Rotate( vPosOffsetLocalCoordinateSystem );
VistaVector3D vPosRigidBody = vPosPivotPoint + vPosOffsetGlobalCoordinateSystem;
pVACore->SetListenerRealWorldHeadPositionOrientationVU( iTrackedRealWorldListenerID, vPosRigidBody[ 0 ], vPosRigidBody[ 1 ], vPosRigidBody[ 2 ], vViewRigidBody[ 0 ], vViewRigidBody[ 1 ], vViewRigidBody[ 2 ], vUpRigidBody[ 0 ], vUpRigidBody[ 1 ], vUpRigidBody[ 2 ] );
}
catch( ... )
{
}
}
// Source
int iTrackedSourceID = pVAMatlabTracker->iTrackedSourceID;
int iTrackedSourceRigidBodyIndex = pVAMatlabTracker->iTrackedSourceRigidBodyIndex;
if( ( iTrackedSourceID != -1 ) && ( iTrackedSourceRigidBodyIndex <= sFrame->nRigidBodies ) && ( iTrackedSourceRigidBodyIndex > 0 ) )
{
try
{
VistaVector3D vPosOffsetLocalCoordinateSystem = pVAMatlabTracker->vTrackedSourceTranslation;
VistaQuaternion qOrientRotation = pVAMatlabTracker->qTrackedSourceRotation;
const sRigidBodyData& oBodyData( sFrame->RigidBodies[ iTrackedSourceRigidBodyIndex - 1 ] );
VistaVector3D vPosPivotPoint( oBodyData.x, oBodyData.y, oBodyData.z );
VistaQuaternion qOrientRaw( oBodyData.qx, oBodyData.qy, oBodyData.qz, oBodyData.qw );
VistaQuaternion qOrientRigidBody = qOrientRotation * qOrientRaw;
VistaVector3D vViewRigidBody = qOrientRigidBody.GetViewDir();
VistaVector3D vUpRigidBody = qOrientRigidBody.GetUpDir();
VistaVector3D vPosOffsetGlobalCoordinateSystem = qOrientRigidBody.Rotate( vPosOffsetLocalCoordinateSystem );
VistaVector3D vPosRigidBody = vPosPivotPoint + vPosOffsetGlobalCoordinateSystem;
pVACore->SetSoundSourcePosition( iTrackedSourceID, vPosRigidBody[ 0 ], vPosRigidBody[ 1 ], vPosRigidBody[ 2 ] );
pVACore->SetSoundSourceOrientationVU( iTrackedSourceID, vViewRigidBody[ 0 ], vViewRigidBody[ 1 ], vViewRigidBody[ 2 ], vUpRigidBody[ 0 ], vUpRigidBody[ 1 ], vUpRigidBody[ 2 ] );
}
catch( ... )
{
}
}
return;
}
CVAMatlabTracker::CVAMatlabTracker()
......@@ -84,14 +124,25 @@ CVAMatlabTracker::CVAMatlabTracker()
void CVAMatlabTracker::Reset()
{
iTrackedListenerID = -1;
iTrackedListenerRigidBodyIndex = 1;
vTrackedListenerTranslation.SetToZeroVector();
qTrackedListenerRotation.SetToNeutralQuaternion();
iTrackedRealWorldListenerID = -1;
iTrackedRealWorldListenerRigidBodyIndex = 1;
vTrackedRealWorldListenerTranslation.SetToZeroVector();
qTrackedRealWorldListenerRotation.SetToNeutralQuaternion();
iTrackedSourceID = -1;
iRigidBodyIndex = 1;
iTrackedSourceRigidBodyIndex = 1;
vTrackedSourceTranslation.SetToZeroVector();
qTrackedSourceRotation.SetToNeutralQuaternion();
}
bool CVAMatlabTracker::Initialize( std::string sServerAdress, std::string sLocalAdress )
{
char* pcLocalAdress = &sLocalAdress[0];
char* pcServerAdress = &sServerAdress[0];
char* pcLocalAdress = &sLocalAdress[ 0 ];
char* pcServerAdress = &sServerAdress[ 0 ];
int iError = m_pTrackerClient->Initialize( pcLocalAdress, pcServerAdress );
m_bConnected = ( iError == ErrorCode_OK );
return m_bConnected;
......@@ -107,4 +158,4 @@ bool CVAMatlabTracker::Uninitialize()
bool CVAMatlabTracker::IsConnected() const
{
return m_bConnected;
}
\ No newline at end of file
}
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics (VA)
* VVV VVV AAA Real-time auralization for Virtual Reality
* VVV VVV A AAA
* VVVVVV AAA AAA (c) Copyright Institute of Technical Acoustics (ITA)
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institute of Technical Acoustics (ITA), 2015-2017
* VVVV AAA RWTH Aachen University (http://www.akustik.rwth-aachen.de)
*
* --------------------------------------------------------------------------------------------
*/
#ifndef INCLUDE_WATCHER_VA_MATLAB_TRACKING
#define INCLUDE_WATCHER_VA_MATLAB_TRACKING
......@@ -33,13 +36,22 @@ public:
bool Uninitialize();
bool IsConnected() const;
int iRigidBodyIndex; //!< Starts with 1 (default)
int iTrackedListenerID; //!< -1 if deactivated, will be preferred over source
int iTrackedSourceID; //!< -1 if deactivated
IVACore* pVACore; //!< Pointer to (networked) core instance
int iTrackedListenerID; //!< -1 if deactivated, will be preferred over source
int iTrackedListenerRigidBodyIndex; //!< Starts with 1 (default)
VistaVector3D vTrackedListenerTranslation; //!< Position offset from pivot point (default NatNet rigid body barycenter)
VistaQuaternion qTrackedListenerRotation; //!< Orientation rotation from default orientation (initial NatNet rigid body orientation)
int iTrackedRealWorldListenerID; //!< -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)
VistaVector3D vTranslation; //!< Position offset from pivot point (default NatNet rigid body barycenter)
VistaQuaternion qRotation; //!< Orientation rotation from default orientation (initial NatNet rigid body orientation)
int iTrackedSourceID; //!< -1 if deactivated
int iTrackedSourceRigidBodyIndex; //!< Starts with 1 (default)
VistaVector3D vTrackedSourceTranslation; //!< Position offset from pivot point (default NatNet rigid body barycenter)
VistaQuaternion qTrackedSourceRotation; //!< Orientation rotation from default orientation (initial NatNet rigid body orientation)
private:
NatNetClient* m_pTrackerClient;
......
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