MVRCore/source/InputDeviceVRPNTracker.cpp
// Callback function for VRPN, void* pointer points to a VRPNTrackerDevice
Callback function for VRPN, void* pointer points to a VRPNTrackerDevice
Callback function for VRPN void * pointer points to a VRPNTrackerDevice
void VRPN_CALLBACK trackerHandler(void *thisPtr, const vrpn_TRACKERCB info)
{
	glm::dmat4 vrpnEvent;
	vrpnEvent = glm::mat4_cast(glm::quat(info.quat[3],info.quat[0], info.quat[1],info.quat[2]));
	vrpnEvent = glm::column(vrpnEvent, 3, glm::dvec4(info.pos[0],info.pos[1],info.pos[2], 1.0));
	InputDeviceVRPNTracker* device = ((InputDeviceVRPNTracker*)thisPtr);
	boost::posix_time::ptime msgTime = boost::posix_time::microsec_clock::local_time();
	device->processEvent(vrpnEvent, info.sensor, msgTime);
}
void VRPN_CALLBACK trackerHandler ( void * thisPtr , const vrpn_TRACKERCB info ) { glm :: dmat4 vrpnEvent ; vrpnEvent = glm :: mat4_cast ( glm :: quat ( info . quat [ 3 ] , info . quat [ 0 ] , info . quat [ 1 ] , info . quat [ 2 ] ) ) ; vrpnEvent = glm :: column ( vrpnEvent , 3 , glm :: dvec4 ( info . pos [ 0 ] , info . pos [ 1 ] , info . pos [ 2 ] , 1.0 ) ) ; InputDeviceVRPNTracker * device = ( ( InputDeviceVRPNTracker * ) thisPtr ) ; boost :: posix_time :: ptime msgTime = boost :: posix_time :: microsec_clock :: local_time ( ) ; device -> processEvent ( vrpnEvent , info . sensor , msgTime ) ; }
Callback function for VRPN, void* pointer points to a VRPNTrackerDevice
Callback function for VRPN void * pointer points to a VRPNTrackerDevice