scripts
This commit is contained in:
@@ -0,0 +1,157 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace UnityEngine.VR
|
||||
{
|
||||
// Token: 0x020002F1 RID: 753
|
||||
[RequiredByNativeCode]
|
||||
public static class InputTracking
|
||||
{
|
||||
// Token: 0x14000019 RID: 25
|
||||
// (add) Token: 0x06003105 RID: 12549 RVA: 0x00049530 File Offset: 0x00047730
|
||||
// (remove) Token: 0x06003106 RID: 12550 RVA: 0x00049564 File Offset: 0x00047764
|
||||
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
public static event Action<VRNodeState> trackingAcquired;
|
||||
|
||||
// Token: 0x1400001A RID: 26
|
||||
// (add) Token: 0x06003107 RID: 12551 RVA: 0x00049598 File Offset: 0x00047798
|
||||
// (remove) Token: 0x06003108 RID: 12552 RVA: 0x000495CC File Offset: 0x000477CC
|
||||
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
public static event Action<VRNodeState> trackingLost;
|
||||
|
||||
// Token: 0x1400001B RID: 27
|
||||
// (add) Token: 0x06003109 RID: 12553 RVA: 0x00049600 File Offset: 0x00047800
|
||||
// (remove) Token: 0x0600310A RID: 12554 RVA: 0x00049634 File Offset: 0x00047834
|
||||
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
public static event Action<VRNodeState> nodeAdded;
|
||||
|
||||
// Token: 0x1400001C RID: 28
|
||||
// (add) Token: 0x0600310B RID: 12555 RVA: 0x00049668 File Offset: 0x00047868
|
||||
// (remove) Token: 0x0600310C RID: 12556 RVA: 0x0004969C File Offset: 0x0004789C
|
||||
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
public static event Action<VRNodeState> nodeRemoved;
|
||||
|
||||
// Token: 0x0600310D RID: 12557 RVA: 0x000496D0 File Offset: 0x000478D0
|
||||
[RequiredByNativeCode]
|
||||
private static void InvokeTrackingEvent(InputTracking.TrackingStateEventType eventType, VRNode nodeType, long uniqueID, bool tracked)
|
||||
{
|
||||
VRNodeState vrnodeState = default(VRNodeState);
|
||||
vrnodeState.uniqueID = (ulong)uniqueID;
|
||||
vrnodeState.nodeType = nodeType;
|
||||
vrnodeState.tracked = tracked;
|
||||
Action<VRNodeState> action;
|
||||
switch (eventType)
|
||||
{
|
||||
case InputTracking.TrackingStateEventType.NodeAdded:
|
||||
action = InputTracking.nodeAdded;
|
||||
break;
|
||||
case InputTracking.TrackingStateEventType.NodeRemoved:
|
||||
action = InputTracking.nodeRemoved;
|
||||
break;
|
||||
case InputTracking.TrackingStateEventType.TrackingAcquired:
|
||||
action = InputTracking.trackingAcquired;
|
||||
break;
|
||||
case InputTracking.TrackingStateEventType.TrackingLost:
|
||||
action = InputTracking.trackingLost;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException("TrackingEventHandler - Invalid EventType: " + eventType);
|
||||
}
|
||||
if (action != null)
|
||||
{
|
||||
action(vrnodeState);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600310E RID: 12558 RVA: 0x0004976C File Offset: 0x0004796C
|
||||
public static Vector3 GetLocalPosition(VRNode node)
|
||||
{
|
||||
Vector3 vector;
|
||||
InputTracking.INTERNAL_CALL_GetLocalPosition(node, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
// Token: 0x0600310F RID: 12559
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void INTERNAL_CALL_GetLocalPosition(VRNode node, out Vector3 value);
|
||||
|
||||
// Token: 0x06003110 RID: 12560 RVA: 0x0004978C File Offset: 0x0004798C
|
||||
public static Quaternion GetLocalRotation(VRNode node)
|
||||
{
|
||||
Quaternion quaternion;
|
||||
InputTracking.INTERNAL_CALL_GetLocalRotation(node, out quaternion);
|
||||
return quaternion;
|
||||
}
|
||||
|
||||
// Token: 0x06003111 RID: 12561
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void INTERNAL_CALL_GetLocalRotation(VRNode node, out Quaternion value);
|
||||
|
||||
// Token: 0x06003112 RID: 12562
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public static extern void Recenter();
|
||||
|
||||
// Token: 0x06003113 RID: 12563
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public static extern string GetNodeName(ulong uniqueID);
|
||||
|
||||
// Token: 0x06003114 RID: 12564
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void GetNodeStatesInternal(object nodeStates);
|
||||
|
||||
// Token: 0x06003115 RID: 12565 RVA: 0x000497AC File Offset: 0x000479AC
|
||||
public static void GetNodeStates(List<VRNodeState> nodeStates)
|
||||
{
|
||||
if (nodeStates == null)
|
||||
{
|
||||
throw new ArgumentNullException("nodeStates");
|
||||
}
|
||||
nodeStates.Clear();
|
||||
InputTracking.GetNodeStatesInternal(nodeStates);
|
||||
}
|
||||
|
||||
// Token: 0x17000B0C RID: 2828
|
||||
// (get) Token: 0x06003116 RID: 12566
|
||||
// (set) Token: 0x06003117 RID: 12567
|
||||
public static extern bool disablePositionalTracking
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
set;
|
||||
}
|
||||
|
||||
// Token: 0x06003118 RID: 12568 RVA: 0x000497D0 File Offset: 0x000479D0
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
static InputTracking()
|
||||
{
|
||||
InputTracking.trackingAcquired = null;
|
||||
InputTracking.trackingLost = null;
|
||||
InputTracking.nodeAdded = null;
|
||||
InputTracking.nodeRemoved = null;
|
||||
}
|
||||
|
||||
// Token: 0x020002F2 RID: 754
|
||||
private enum TrackingStateEventType
|
||||
{
|
||||
// Token: 0x040009B4 RID: 2484
|
||||
NodeAdded,
|
||||
// Token: 0x040009B5 RID: 2485
|
||||
NodeRemoved,
|
||||
// Token: 0x040009B6 RID: 2486
|
||||
TrackingAcquired,
|
||||
// Token: 0x040009B7 RID: 2487
|
||||
TrackingLost
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user