MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / GetControllerStateWithPose

Method GetControllerStateWithPose

headers/openvr_api.cs:2504–2522  ·  view source on GitHub ↗
(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize,ref TrackedDevicePose_t pTrackedDevicePose)

Source from the content-addressed store, hash-verified

2502 public _GetControllerStateWithPosePacked pGetControllerStateWithPosePacked;
2503 }
2504 public bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize,ref TrackedDevicePose_t pTrackedDevicePose)
2505 {
2506#if !UNITY_METRO
2507 if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
2508 (System.Environment.OSVersion.Platform == System.PlatformID.Unix))
2509 {
2510 GetControllerStateWithPoseUnion u;
2511 VRControllerState_t_Packed state_packed = new VRControllerState_t_Packed(pControllerState);
2512 u.pGetControllerStateWithPosePacked = null;
2513 u.pGetControllerStateWithPose = FnTable.GetControllerStateWithPose;
2514 bool packed_result = u.pGetControllerStateWithPosePacked(eOrigin,unControllerDeviceIndex,ref state_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VRControllerState_t_Packed)),ref pTrackedDevicePose);
2515
2516 state_packed.Unpack(ref pControllerState);
2517 return packed_result;
2518 }
2519#endif
2520 bool result = FnTable.GetControllerStateWithPose(eOrigin,unControllerDeviceIndex,ref pControllerState,unControllerStateSize,ref pTrackedDevicePose);
2521 return result;
2522 }
2523 public void TriggerHapticPulse(uint unControllerDeviceIndex,uint unAxisId,ushort usDurationMicroSec)
2524 {
2525 FnTable.TriggerHapticPulse(unControllerDeviceIndex,unAxisId,usDurationMicroSec);

Callers

nothing calls this directly

Calls 1

UnpackMethod · 0.45

Tested by

no test coverage detected