static VivePose() { var system = OpenVR.System; if (system != null) { OnInputFocus(!system.IsInputFocusCapturedByAnotherProcess()); } else { OnInputFocus(true); } if (SteamVR_Render.instance != null) { OnNewPoses(SteamVR_Render.instance.poses); } else { OnNewPoses(new TrackedDevicePose_t[OpenVR.k_unMaxTrackedDeviceCount]); } SteamVR_Events.InputFocusAction(OnInputFocus).Enable(true); SteamVR_Events.NewPosesAction(OnNewPoses).Enable(true); }
/// <summary> /// Start a calibration automatically on Awake(). /// </summary> void Awake() { posesAction = SteamVR_Events.NewPosesAction(OnNewPoses); module = GetComponent <ViveModule>() as ViveModule; if (!Valid) { Debug.Log("Holojam.Vive.ViveCalibrator: Build state not valid for calibration"); return; } if (!module.cameraRig) { Network.RemoteLogger.Log( "Calibration failed; ViveModule camera rig not assigned!" ); return; } // Cache the centroid position and rotation for future offset cachedPosition = module.cameraRig.transform.localPosition; cachedRotation = module.cameraRig.transform.localRotation; StartCoroutine(WaitToCalibrate()); }
void Start() { newPoses = SteamVR_Events.NewPosesAction(OnNewPoses); newPoses.enabled = true; RegisterExistingPads(); HideGameObjectFromZED(); }
public static void SubscribeToNewPoses() { if (newPosesAction == null) { newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); } newPosesAction.enabled = true; }
// Constructor: Attach callback function to Vive Tracker data UpdateFoveFromViveTracker() { newPosesAction = SteamVR_Events.NewPosesAction(onNewPose); deviceConnectedAction = SteamVR_Events.DeviceConnectedAction(onNewDeviceConnection); lastDriftCorrectionTimeMs = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond; FoveViveToWorldSpace = Quaternion.Euler(0.0f, 0.0f, 0.0f); rotateSetupDegree = 0; isHeadsetCalibrated = false; }
void Awake() { if (Instance == null) { Instance = this; } newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); }
void Awake() { newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); HmdMatrix44_t mat = new HmdMatrix44_t(); /**************************************/ /* * -0.102501 0.19387 0.975658 0.690977 * 0.00933648 0.980968 -0.193944 0.545085 * -0.994689 -0.0107702 -0.10236 -0.111363 * 0 0 0 1 */ /* * mat.m0 = -0.102501f; * mat.m1 = 0.19387f; * mat.m2 = 0.975658f; * mat.m3 = 0.690977f; * mat.m4 = 0.00933648f; * mat.m5 = 0.980968f; * mat.m6 = -0.193944f; * mat.m7 = 0.545085f; * mat.m8 = -0.994689f; * mat.m9 = -0.0107702f; * mat.m10 = -0.10236f; * mat.m11 = -0.111363f; * mat.m12 = 0; * mat.m13 = 0; * mat.m14 = 0; * mat.m15 = 1; */ mat.m0 = -0.102501f; mat.m4 = 0.19387f; mat.m8 = 0.975658f; mat.m12 = 0.690977f; mat.m1 = 0.00933648f; mat.m5 = 0.980968f; mat.m9 = -0.193944f; mat.m13 = 0.545085f; mat.m2 = -0.994689f; mat.m6 = -0.0107702f; mat.m10 = -0.10236f; mat.m14 = -0.111363f; mat.m3 = 0; mat.m7 = 0; mat.m11 = 0; mat.m15 = 1; /**************************************/ BMatInv = new SteamVR_Utils.RigidTransform(mat); BMatInv.Inverse(); }
void OnEnable() { var render = SteamVR_Render.instance; if (render == null) { enabled = false; return; } newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); newPosesAction.enabled = true; }
void Awake() { newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); headCamera = GameObject.Find(cameraName); headTracking = GameObject.Find(headTrackingName); var error = EVRSettingsError.None; if (OpenVR.Settings.GetBool(OpenVR.k_pch_SteamVR_Section, OpenVR.k_pch_SteamVR_ForceFadeOnBadTracking_Bool, ref error)) { OpenVR.Settings.SetBool(OpenVR.k_pch_SteamVR_Section, OpenVR.k_pch_SteamVR_ForceFadeOnBadTracking_Bool, false, ref error); OpenVR.Settings.Sync(true, ref error); } }
/// <summary> /// Initialized all the components /// </summary> void Start() { newPoses = SteamVR_Events.NewPosesAction(OnNewPoses); newPoses.enabled = true; RegisterExistingPads(); HideGameObjectFromZED(); if (UnityEngine.XR.XRDevice.model.Contains("Oculus")) { model = HMD.OCULUS; } else { model = HMD.STEAMVR; } }
/// <summary> /// Initializes, and caches the position/rotation of the centroid. /// </summary> void Awake() { posesAction = SteamVR_Events.NewPosesAction(OnNewPoses); module = GetComponent <ViveModule>() as ViveModule; if (!module.cameraRig) { Debug.Log("Holojam.Vive.ViveCalibrator: ViveModule camera rig not assigned!"); return; } cachedPosition = module.cameraRig.transform.localPosition; cachedRotation = module.cameraRig.transform.localRotation; calibratedPosition = cachedPosition; calibratedRotation = cachedRotation; Tools.InfoPanel.SetString("calibrator", "Calibrator: waiting"); }
private void Awake() { newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); mHumanButtons = GetComponentInChildren <HumanButtons>(); }
ZEDControllerTracker() { newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); }
TrackedHMD() { newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); }
private void Awake() { newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); m_SteamVR_TrackedObject = GetComponent <SteamVR_TrackedObject>(); }
VRTRIXGloveTrackedOjects() { GetTrackedObjectsIndexID(); newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); }
private void Awake() { newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); }
public void Awake() { newPosesAppliedAction = SteamVR_Events.NewPosesAction(OnNewPoses); }
void OnEnable() { newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); newPosesAction.enabled = true; }
TrackedObject() { newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); }
// Token: 0x06000E09 RID: 3593 RVA: 0x0005960F File Offset: 0x0005780F private SteamVR_TrackedObject() { this.newPosesAction = SteamVR_Events.NewPosesAction(new UnityAction <TrackedDevicePose_t[]>(this.OnNewPoses)); }