Beispiel #1
0
 void SetDoubleDeviceIndex(int index)
 {
     deviceName.text       = AndroidServiceControllerProvider.GetDeviceName();
     macAddress.text       = AndroidServiceControllerProvider.GetMacAddress(index);
     manufacturerName.text = AndroidServiceControllerProvider.GetManufacturerName(index);
     modelNumber.text      = AndroidServiceControllerProvider.GetModelNumber(index);
     serialNumber.text     = AndroidServiceControllerProvider.GetSerialNumber(index);
     hardwareRevision.text = AndroidServiceControllerProvider.GetHardwareRevision(index);
     firmwareRevision.text = AndroidServiceControllerProvider.GetFirmwareRevision(index);
     softwareRevision.text = AndroidServiceControllerProvider.GetSoftwareRevision(index);
 }
Beispiel #2
0
 private void OnApplicationFocus(bool focus)
 {
     if (focus)
     {
         AndroidServiceControllerProvider.GetRightYawRotation();
         AndroidServiceControllerProvider.GetLeftYawRotation();
     }
     if (!focus)
     {
         AndroidServiceControllerProvider.ResetRightYawRotation();
         AndroidServiceControllerProvider.ResetLeftYawRotation();
     }
 }
Beispiel #3
0
 void ShowFrame()
 {
     currentTime += Time.deltaTime;
     if (currentTime > 1)
     {
         if (isRightSource)
         {
             rightPreviouslyFrame = rightCurrenFrame;
             rightCurrenFrame     = AndroidServiceControllerProvider.GetFrameNumber(0);
             frame.text           = (rightCurrenFrame - rightPreviouslyFrame).ToString();
         }
         else
         {
             lefrPreviouslyFrame = leftCurrenFrame;
             leftCurrenFrame     = AndroidServiceControllerProvider.GetFrameNumber(1);
             frame.text          = (leftCurrenFrame - lefrPreviouslyFrame).ToString();
         }
         currentTime = 0;
     }
 }
Beispiel #4
0
        private void UpdateHandedness()
        {
            handedMultiplier.Set(0, 1, 1);
            if (AndroidServiceControllerProvider.GetHandedness() == I3vrControllerHandedness.Right)
            {
                handedMultiplier.x = 1.0f;
            }
            else
            {
                handedMultiplier.x = -1.0f;
            }

            if (!controller.isRightController)
            {
                handedMultiplier.x = -handedMultiplier.x;
            }

            // Place the shoulder in anatomical positions based on the height and handedness.
            shoulderRotation = Quaternion.identity;
            shoulderPosition = Vector3.Scale(DEFAULT_SHOULDER_RIGHT, handedMultiplier);
        }
Beispiel #5
0
 private void OnApplicationQuit()
 {
     AndroidServiceControllerProvider.OnStop();
 }