/// <summary>
		/// The PollHeadTrackerRawData function retrieves run-time head tracker’s raw data from the attached device.
		/// </summary>
		/// <param name="deviceData">Reference to a EMADeviceData structure that contains run-time head tracker’s raw data.</param>
		/// <returns>NotConnected <br></br> BadHandle <br></br> NotSupported</returns>
		public Error PollHeadTrackerRawData ( DeviceData deviceData ) 
        { 
            if ( 0 != handle ) 
                return ( Error ) PollHeadTrackerRawData ( handle , deviceData ) ; 
            else 
                return Error.BadHandle ; 
        } 
Exemplo n.º 2
0
        private void HeadsetSetup()
        {
            DeviceInfo[] infosArray = new DeviceInfo[10];
            int found = 0;
            Device.EnumerateDevices(infosArray, ref found);
            headset = new Device(Flags.NoHeadTracking);
            tracker = new Device(Flags.None);

            DeviceData data = new DeviceData();
            headset.PollHeadTrackerRawData(data);
            Error e = Device.LastError;
            if (headset.Opened)
            {
                bool test1 = headset.CanDoHeadTracking;
                bool test2 = tracker.CanDoHeadTracking;
                // get device information
                headset.EnableStereoVision(true);
                // Turn on the headset if it was sleeping
                headset.KeepAlive();
            }
            else
            {
                headset.Dispose();
                headset = null;
            }

        }