VAMatlabTracking.h 2.59 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

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

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

class NatNetClient;
26
class IVAInterface;
27 28 29 30 31 32 33 34 35 36 37

//! 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
	IVAInterface* pVACore;       //!< Pointer to (networked) core instance
39
	
40
	int iTrackedSoundReceiverID; //!< -1 if deactivated, will be preferred over source
41 42
	int iTrackedSoundReceiverHeadRigidBodyIndex;    //!< Starts with 1 (default)
	int iTrackedSoundReceiverTorsoRigidBodyIndex;    //!< Starts with 1 (default)
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
43
	VistaVector3D vTrackedSoundReceiverTranslation;	//!< Position offset from pivot point (default NatNet rigid body barycenter)
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
44
	VistaQuaternion qTrackedSoundReceiverRotation;	//!< Orientation rotation from default orientation (initial NatNet rigid body orientation)
45

46
	int iTrackedRealWorldSoundReceiverID; //!< -1 if deactivated
47
	int iTrackedRealWorldSoundReceiverHeadRigidBodyIndex;    //!< Starts with 1 (default)
48
	int iTrackedRealWorldSoundReceiverTorsoRigidBodyIndex;    //!< Starts with 1 (default)
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
49 50
	VistaVector3D vTrackedRealWorldSoundReceiverTranslation;	//!< Position offset from pivot point (default NatNet rigid body barycenter)
	VistaQuaternion qTrackedRealWorldSoundReceiverRotation;	//!< Orientation rotation from default orientation (initial NatNet rigid body orientation)
51

52 53 54 55
	int iTrackedSoundSourceID;	//!< -1 if deactivated
	int iTrackedSoundSourceRigidBodyIndex;    //!< Starts with 1 (default)
	VistaVector3D vTrackedSoundSourceTranslation;	//!< Position offset from pivot point (default NatNet rigid body barycenter)
	VistaQuaternion qTrackedSoundSourceRotation;	//!< Orientation rotation from default orientation (initial NatNet rigid body orientation)
56 57 58 59 60 61

private:
	NatNetClient* m_pTrackerClient;
	bool m_bConnected;
};

62
#endif // IW_VA_MATLAB_TRACKING