VAMatlabTracking.h 2.35 KB
Newer Older
1
/*
2
 *  --------------------------------------------------------------------------------------------
3
 *
4 5 6 7 8 9
 *    VVV        VVV A           Virtual Acoustics (VA) | http://www.virtualacoustics.org
 *     VVV      VVV AAA          Licensed under the Apache License, Version 2.0
 *      VVV    VVV   AAA
 *       VVV  VVV     AAA        Copyright 2015-2017
 *        VVVVVV       AAA       Institute of Technical Acoustics (ITA)
 *         VVVV         AAA      RWTH Aachen University
10
 *
11
 *  --------------------------------------------------------------------------------------------
12 13
 */

14 15
#ifndef IW_VA_MATLAB_TRACKING
#define IW_VA_MATLAB_TRACKING
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

// STL includes
#include <string>
#include <vector>

// Vista include
#include <VistaBase/VistaVector3D.h>
#include <VistaBase/VistaQuaternion.h>

class NatNetClient;
class IVACore;

//! Wrapper class for NatNet tracking client
class CVAMatlabTracker
{
public:
	CVAMatlabTracker();
	void Reset();
	bool Initialize( std::string sServerAdress, std::string sLocalAdress );
	bool Uninitialize();
	bool IsConnected() const;

38
	IVACore* pVACore;       //!< Pointer to (networked) core instance
39 40 41 42 43 44 45 46 47 48
	
	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)
49

50 51 52 53
	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)
54 55 56 57 58 59

private:
	NatNetClient* m_pTrackerClient;
	bool m_bConnected;
};

60
#endif // IW_VA_MATLAB_TRACKING