diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonArmInterface.prefab b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonArmInterface.prefab new file mode 100644 index 0000000..b6b65e9 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonArmInterface.prefab @@ -0,0 +1,54 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &129912 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 429912} + - 114: {fileID: 11429912} + m_Layer: 0 + m_Name: SkeletonArmInterface + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &429912 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 129912} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!114 &11429912 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 129912} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ea96aac24f4e8c349956b943b8071238, type: 3} + m_Name: + m_EditorClassIdentifier: + path: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 129912} + m_IsPrefabParent: 1 + m_IsExploded: 1 diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonArmInterface.prefab.meta b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonArmInterface.prefab.meta new file mode 100644 index 0000000..724fe7f --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonArmInterface.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 6d0c3c5febcc80643b409155a335ab04 +NativeFormatImporter: + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonFootInterface.prefab b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonFootInterface.prefab new file mode 100644 index 0000000..7fed4e2 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonFootInterface.prefab @@ -0,0 +1,54 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &154010 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 454010} + - 114: {fileID: 11454010} + m_Layer: 0 + m_Name: SkeletonFootInterface + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &454010 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 154010} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!114 &11454010 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 154010} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d8bbbb4b33b8420428098b3296849a22, type: 3} + m_Name: + m_EditorClassIdentifier: + path: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 154010} + m_IsPrefabParent: 1 + m_IsExploded: 1 diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonFootInterface.prefab.meta b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonFootInterface.prefab.meta new file mode 100644 index 0000000..bf12fde --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonFootInterface.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: d3506876eabfa2c4098e0912e0048722 +NativeFormatImporter: + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonHandInterface.prefab b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonHandInterface.prefab new file mode 100644 index 0000000..ab5e3d2 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonHandInterface.prefab @@ -0,0 +1,54 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &136712 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 436712} + - 114: {fileID: 11436712} + m_Layer: 0 + m_Name: SkeletonHandInterface + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &436712 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 136712} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!114 &11436712 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 136712} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 55844e15a0cec4a4684ab3a8cc2b9f9f, type: 3} + m_Name: + m_EditorClassIdentifier: + path: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 136712} + m_IsPrefabParent: 1 + m_IsExploded: 1 diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonHandInterface.prefab.meta b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonHandInterface.prefab.meta new file mode 100644 index 0000000..cb76027 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonHandInterface.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 6a32eb4738d68944da9cc9e827cb9fe0 +NativeFormatImporter: + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonJointInterface.prefab b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonJointInterface.prefab new file mode 100644 index 0000000..f37e63b --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonJointInterface.prefab @@ -0,0 +1,54 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &137982 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 437982} + - 114: {fileID: 11437982} + m_Layer: 0 + m_Name: SkeletonJointInterface + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &437982 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 137982} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!114 &11437982 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 137982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ceda3a40c27d5644b3eafff669ff26e, type: 3} + m_Name: + m_EditorClassIdentifier: + path: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 137982} + m_IsPrefabParent: 1 + m_IsExploded: 1 diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonJointInterface.prefab.meta b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonJointInterface.prefab.meta new file mode 100644 index 0000000..3dd0051 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonJointInterface.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: e2333533e70a0a24dae3a5ce013bf582 +NativeFormatImporter: + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonLegInterface.prefab b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonLegInterface.prefab new file mode 100644 index 0000000..ad2874e --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonLegInterface.prefab @@ -0,0 +1,54 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &199610 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 499610} + - 114: {fileID: 11499610} + m_Layer: 0 + m_Name: SkeletonLegInterface + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &499610 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 199610} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!114 &11499610 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 199610} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9820ae087acfbbf47a5574ef2106c3c2, type: 3} + m_Name: + m_EditorClassIdentifier: + path: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 199610} + m_IsPrefabParent: 1 + m_IsExploded: 1 diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonLegInterface.prefab.meta b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonLegInterface.prefab.meta new file mode 100644 index 0000000..6df4c56 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonLegInterface.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 921a48d0b943a7846aec5e9e4f5fc4e6 +NativeFormatImporter: + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonTrimmedInterface.prefab b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonTrimmedInterface.prefab new file mode 100644 index 0000000..952a558 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonTrimmedInterface.prefab @@ -0,0 +1,54 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &107378 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 407378} + - 114: {fileID: 11407378} + m_Layer: 0 + m_Name: SkeletonTrimmedInterface + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &407378 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 107378} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!114 &11407378 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 107378} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 252bc2e1f0ce53e46b71f55d9090c1a0, type: 3} + m_Name: + m_EditorClassIdentifier: + path: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 107378} + m_IsPrefabParent: 1 + m_IsExploded: 1 diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonTrimmedInterface.prefab.meta b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonTrimmedInterface.prefab.meta new file mode 100644 index 0000000..d0376e4 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonTrimmedInterface.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 253cfce7448b3c84b9664177af821d1d +NativeFormatImporter: + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonWholeInterface.prefab b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonWholeInterface.prefab new file mode 100644 index 0000000..68bd771 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonWholeInterface.prefab @@ -0,0 +1,54 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &198398 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 498398} + - 114: {fileID: 11498398} + m_Layer: 0 + m_Name: SkeletonWholeInterface + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &498398 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 198398} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!114 &11498398 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 198398} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ef1e84b9f55a4af42ae58e1abd98e891, type: 3} + m_Name: + m_EditorClassIdentifier: + path: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 198398} + m_IsPrefabParent: 1 + m_IsExploded: 1 diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonWholeInterface.prefab.meta b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonWholeInterface.prefab.meta new file mode 100644 index 0000000..f93aeaf --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/SkeletonWholeInterface.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 08f12afdc75ae944f91c6cacfeca1618 +NativeFormatImporter: + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/InterfaceAdapters.cs b/OSVR-Unity/Assets/OSVRUnity/src/InterfaceAdapters.cs index fe3926f..53c5875 100644 --- a/OSVR-Unity/Assets/OSVRUnity/src/InterfaceAdapters.cs +++ b/OSVR-Unity/Assets/OSVRUnity/src/InterfaceAdapters.cs @@ -52,11 +52,7 @@ public class PoseAdapter : public PoseAdapter(OSVR.ClientKit.IInterface iface) : base(iface) {} protected override Pose3 Convert (OSVR.ClientKit.Pose3 sourceValue) { - return new Pose3 - { - Rotation = OSVR.Unity.Math.ConvertOrientation(sourceValue.rotation), - Position = OSVR.Unity.Math.ConvertPosition (sourceValue.translation), - }; + return OSVR.Unity.Math.Convert(sourceValue); } } @@ -93,4 +89,74 @@ protected override EyeTracker3DState Convert(OSVR.ClientKit.EyeTracker3DState so }; } } + + public class SkeletonJointAdapter : + OSVR.ClientKit.InterfaceAdapter + { + public SkeletonJointAdapter(OSVR.ClientKit.IInterface iface) : base(iface) { } + protected override SkeletonJointState Convert(OSVR.ClientKit.SkeletonJointState sourceValue) + { + return SkeletonJointState.Convert(sourceValue); + } + } + + public class SkeletonTrimmedAdapter : + OSVR.ClientKit.InterfaceAdapter + { + public SkeletonTrimmedAdapter(OSVR.ClientKit.IInterface iface) : base(iface) { } + protected override SkeletonTrimmedState Convert(OSVR.ClientKit.SkeletonTrimmedState sourceValue) + { + return SkeletonTrimmedState.Convert(sourceValue); + } + } + + public class SkeletonWholeAdapter : + OSVR.ClientKit.InterfaceAdapter + { + public SkeletonWholeAdapter(OSVR.ClientKit.IInterface iface) : base(iface) { } + protected override SkeletonWholeState Convert(OSVR.ClientKit.SkeletonWholeState sourceValue) + { + return SkeletonWholeState.Convert(sourceValue); + } + } + + public class SkeletonHandAdapter : + OSVR.ClientKit.InterfaceAdapter + { + public SkeletonHandAdapter(OSVR.ClientKit.IInterface iface) : base(iface) { } + protected override SkeletonHandState Convert(OSVR.ClientKit.SkeletonHandState sourceValue) + { + return SkeletonHandState.Convert(sourceValue); + } + } + + public class SkeletonArmAdapter : + OSVR.ClientKit.InterfaceAdapter + { + public SkeletonArmAdapter(OSVR.ClientKit.IInterface iface) : base(iface) { } + protected override SkeletonArmState Convert(OSVR.ClientKit.SkeletonArmState sourceValue) + { + return SkeletonArmState.Convert(sourceValue); + } + } + + public class SkeletonFootAdapter : + OSVR.ClientKit.InterfaceAdapter + { + public SkeletonFootAdapter(OSVR.ClientKit.IInterface iface) : base(iface) { } + protected override SkeletonFootState Convert(OSVR.ClientKit.SkeletonFootState sourceValue) + { + return SkeletonFootState.Convert(sourceValue); + } + } + + public class SkeletonLegAdapter : + OSVR.ClientKit.InterfaceAdapter + { + public SkeletonLegAdapter(OSVR.ClientKit.IInterface iface) : base(iface) { } + protected override SkeletonLegState Convert(OSVR.ClientKit.SkeletonLegState sourceValue) + { + return SkeletonLegState.Convert(sourceValue); + } + } } diff --git a/OSVR-Unity/Assets/OSVRUnity/src/InterfaceCallbacks.cs b/OSVR-Unity/Assets/OSVRUnity/src/InterfaceCallbacks.cs index 85e4f55..657bc21 100644 --- a/OSVR-Unity/Assets/OSVRUnity/src/InterfaceCallbacks.cs +++ b/OSVR-Unity/Assets/OSVRUnity/src/InterfaceCallbacks.cs @@ -221,7 +221,7 @@ private void PoseCb(System.IntPtr userdata, ref OSVR.ClientKit.TimeValue timesta /// Tracker pose report private void PoseMatrixCb(System.IntPtr userdata, ref OSVR.ClientKit.TimeValue timestamp, ref OSVR.ClientKit.PoseReport report) { - Matrix4x4 matPose = Math.ConvertPose(report.pose); + Matrix4x4 matPose = Math.ConvertPoseToMatrix(report.pose); if (null != poseMatrixCallbacks) { poseMatrixCallbacks(path, matPose); diff --git a/OSVR-Unity/Assets/OSVRUnity/src/Math.cs b/OSVR-Unity/Assets/OSVRUnity/src/Math.cs index 4b1752b..48c3fcb 100644 --- a/OSVR-Unity/Assets/OSVRUnity/src/Math.cs +++ b/OSVR-Unity/Assets/OSVRUnity/src/Math.cs @@ -18,6 +18,7 @@ /// limitations under the License. /// +using System; using UnityEngine; namespace OSVR @@ -46,11 +47,26 @@ public static Quaternion ConvertOrientation(OSVR.ClientKit.Quaternion quat) return new Quaternion(-(float)quat.x, -(float)quat.y, (float)quat.z, (float)quat.w); } + public static Matrix4x4 ConvertPoseToMatrix(OSVR.ClientKit.Pose3 pose) + { + return Matrix4x4.TRS(Math.ConvertPosition(pose.translation), Math.ConvertOrientation(pose.rotation), Vector3.zero); + } + + [Obsolete("Use Math.ConvertPoseToMatrix instead.")] public static Matrix4x4 ConvertPose(OSVR.ClientKit.Pose3 pose) { return Matrix4x4.TRS(Math.ConvertPosition(pose.translation), Math.ConvertOrientation(pose.rotation), Vector3.zero); } + public static OSVR.Unity.Pose3 Convert(OSVR.ClientKit.Pose3 pose) + { + return new OSVR.Unity.Pose3 + { + Rotation = OSVR.Unity.Math.ConvertOrientation(pose.rotation), + Position = OSVR.Unity.Math.ConvertPosition(pose.translation), + }; + } + //Convert OSVR.ClientKit.Viewport to Rect public static Rect ConvertViewport(OSVR.ClientKit.Viewport viewport) { diff --git a/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonArmInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonArmInterface.cs new file mode 100644 index 0000000..4f42eb5 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonArmInterface.cs @@ -0,0 +1,51 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2014 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +using UnityEngine; + +namespace OSVR +{ + namespace Unity + { + /// + /// Base class for a script that requires an OSVR interface. + /// It primarily takes care of requiring that there is an SkeletonArmInterface component in the current game object. + /// + [RequireComponent(typeof(OSVR.Unity.SkeletonArmInterface))] + public class RequiresSkeletonArmInterface : MonoBehaviour, IRequiresInterface + { + /// + /// Accessor for the sibling SkeletonArmInterface component. + /// + private SkeletonArmInterface ifaceComponent; + public OSVR.ClientKit.IInterface Interface + { + get + { + if (ifaceComponent == null) + { + ifaceComponent = GetComponent(); + } + return ifaceComponent == null ? null : ifaceComponent.Interface; + } + } + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonArmInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonArmInterface.cs.meta new file mode 100644 index 0000000..b7bf7ba --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonArmInterface.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 37acc1676665cf14290cd56dcbbee64f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonFootInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonFootInterface.cs new file mode 100644 index 0000000..37eb2b5 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonFootInterface.cs @@ -0,0 +1,51 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2014 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +using UnityEngine; + +namespace OSVR +{ + namespace Unity + { + /// + /// Base class for a script that requires an OSVR interface. + /// It primarily takes care of requiring that there is an SkeletonFootInterface component in the current game object. + /// + [RequireComponent(typeof(OSVR.Unity.SkeletonFootInterface))] + public class RequiresSkeletonFootInterface : MonoBehaviour, IRequiresInterface + { + /// + /// Accessor for the sibling SkeletonFootInterface component. + /// + private SkeletonFootInterface ifaceComponent; + public OSVR.ClientKit.IInterface Interface + { + get + { + if (ifaceComponent == null) + { + ifaceComponent = GetComponent(); + } + return ifaceComponent == null ? null : ifaceComponent.Interface; + } + } + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonFootInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonFootInterface.cs.meta new file mode 100644 index 0000000..c4889bc --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonFootInterface.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a9b6202c708f06848b82ac3b472972b7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonHandInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonHandInterface.cs new file mode 100644 index 0000000..573fa90 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonHandInterface.cs @@ -0,0 +1,51 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2014 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +using UnityEngine; + +namespace OSVR +{ + namespace Unity + { + /// + /// Base class for a script that requires an OSVR interface. + /// It primarily takes care of requiring that there is an SkeletonHandInterface component in the current game object. + /// + [RequireComponent(typeof(OSVR.Unity.SkeletonHandInterface))] + public class RequiresSkeletonHandInterface : MonoBehaviour, IRequiresInterface + { + /// + /// Accessor for the sibling SkeletonHandInterface component. + /// + private SkeletonHandInterface ifaceComponent; + public OSVR.ClientKit.IInterface Interface + { + get + { + if (ifaceComponent == null) + { + ifaceComponent = GetComponent(); + } + return ifaceComponent == null ? null : ifaceComponent.Interface; + } + } + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonHandInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonHandInterface.cs.meta new file mode 100644 index 0000000..1ee5092 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonHandInterface.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 65b922bacdab8f34b9c0946361908ca1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonJointInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonJointInterface.cs new file mode 100644 index 0000000..8abc6a5 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonJointInterface.cs @@ -0,0 +1,51 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2014 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +using UnityEngine; + +namespace OSVR +{ + namespace Unity + { + /// + /// Base class for a script that requires an OSVR interface. + /// It primarily takes care of requiring that there is an SkeletonJointInterface component in the current game object. + /// + [RequireComponent(typeof(OSVR.Unity.SkeletonJointInterface))] + public class RequiresSkeletonJointInterface : MonoBehaviour, IRequiresInterface + { + /// + /// Accessor for the sibling SkeletonJointInterface component. + /// + private SkeletonJointInterface ifaceComponent; + public OSVR.ClientKit.IInterface Interface + { + get + { + if (ifaceComponent == null) + { + ifaceComponent = GetComponent(); + } + return ifaceComponent == null ? null : ifaceComponent.Interface; + } + } + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonJointInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonJointInterface.cs.meta new file mode 100644 index 0000000..8aada2d --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonJointInterface.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: baf56d3b2f2a77447bca25cb6f0fe7cc +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonLegInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonLegInterface.cs new file mode 100644 index 0000000..355f88d --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonLegInterface.cs @@ -0,0 +1,51 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2014 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +using UnityEngine; + +namespace OSVR +{ + namespace Unity + { + /// + /// Base class for a script that requires an OSVR interface. + /// It primarily takes care of requiring that there is an SkeletonLegInterface component in the current game object. + /// + [RequireComponent(typeof(OSVR.Unity.SkeletonLegInterface))] + public class RequiresSkeletonLegInterface : MonoBehaviour, IRequiresInterface + { + /// + /// Accessor for the sibling SkeletonLegInterface component. + /// + private SkeletonLegInterface ifaceComponent; + public OSVR.ClientKit.IInterface Interface + { + get + { + if (ifaceComponent == null) + { + ifaceComponent = GetComponent(); + } + return ifaceComponent == null ? null : ifaceComponent.Interface; + } + } + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonLegInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonLegInterface.cs.meta new file mode 100644 index 0000000..76c53e6 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonLegInterface.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1a226702ef8660b46815b7d5a0db1b7e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonTrimmedInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonTrimmedInterface.cs new file mode 100644 index 0000000..6280c0f --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonTrimmedInterface.cs @@ -0,0 +1,51 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2014 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +using UnityEngine; + +namespace OSVR +{ + namespace Unity + { + /// + /// Base class for a script that requires an OSVR interface. + /// It primarily takes care of requiring that there is an SkeletonTrimmedInterface component in the current game object. + /// + [RequireComponent(typeof(OSVR.Unity.SkeletonTrimmedInterface))] + public class RequiresSkeletonTrimmedInterface : MonoBehaviour, IRequiresInterface + { + /// + /// Accessor for the sibling SkeletonTrimmedInterface component. + /// + private SkeletonTrimmedInterface ifaceComponent; + public OSVR.ClientKit.IInterface Interface + { + get + { + if (ifaceComponent == null) + { + ifaceComponent = GetComponent(); + } + return ifaceComponent == null ? null : ifaceComponent.Interface; + } + } + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonTrimmedInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonTrimmedInterface.cs.meta new file mode 100644 index 0000000..7214ec4 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonTrimmedInterface.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 47a1c37e9b99c554b92d7b2d6693e3f3 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonWholeInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonWholeInterface.cs new file mode 100644 index 0000000..67630a9 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonWholeInterface.cs @@ -0,0 +1,51 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2014 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +using UnityEngine; + +namespace OSVR +{ + namespace Unity + { + /// + /// Base class for a script that requires an OSVR interface. + /// It primarily takes care of requiring that there is an SkeletonWholeInterface component in the current game object. + /// + [RequireComponent(typeof(OSVR.Unity.SkeletonWholeInterface))] + public class RequiresSkeletonWholeInterface : MonoBehaviour, IRequiresInterface + { + /// + /// Accessor for the sibling SkeletonWholeInterface component. + /// + private SkeletonWholeInterface ifaceComponent; + public OSVR.ClientKit.IInterface Interface + { + get + { + if (ifaceComponent == null) + { + ifaceComponent = GetComponent(); + } + return ifaceComponent == null ? null : ifaceComponent.Interface; + } + } + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonWholeInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonWholeInterface.cs.meta new file mode 100644 index 0000000..04520c4 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/RequiresSkeletonWholeInterface.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: def0228191472bb4d8e31fc2b6c39c2a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonArmInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonArmInterface.cs new file mode 100644 index 0000000..a2ab8dd --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonArmInterface.cs @@ -0,0 +1,65 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2014 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +using UnityEngine; +using System; + +namespace OSVR +{ + namespace Unity + { + /// + /// SkeletonArm Interface. Can be injected into other scripts to track OSVR 2D eye interfaces. + /// + public class SkeletonArmInterface : InterfaceGameObjectBase + { + SkeletonArmAdapter adapter; + + override protected void Start() + { + base.Start(); + if (adapter == null && !String.IsNullOrEmpty(usedPath)) + { + adapter = new SkeletonArmAdapter( + OSVR.ClientKit.SkeletonArmInterface.GetInterface(ClientKit.instance.context, usedPath)); + } + } + + protected override void Stop() + { + base.Stop(); + if (adapter != null) + { + adapter.Dispose(); + adapter = null; + } + } + + public OSVR.ClientKit.IInterface Interface + { + get + { + this.Start(); + return this.adapter; + } + } + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonArmInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonArmInterface.cs.meta new file mode 100644 index 0000000..388b1f1 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonArmInterface.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ea96aac24f4e8c349956b943b8071238 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonFootInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonFootInterface.cs new file mode 100644 index 0000000..2c90466 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonFootInterface.cs @@ -0,0 +1,65 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2014 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +using UnityEngine; +using System; + +namespace OSVR +{ + namespace Unity + { + /// + /// SkeletonFoot Interface. Can be injected into other scripts to track OSVR 2D eye interfaces. + /// + public class SkeletonFootInterface : InterfaceGameObjectBase + { + SkeletonFootAdapter adapter; + + override protected void Start() + { + base.Start(); + if (adapter == null && !String.IsNullOrEmpty(usedPath)) + { + adapter = new SkeletonFootAdapter( + OSVR.ClientKit.SkeletonFootInterface.GetInterface(ClientKit.instance.context, usedPath)); + } + } + + protected override void Stop() + { + base.Stop(); + if (adapter != null) + { + adapter.Dispose(); + adapter = null; + } + } + + public OSVR.ClientKit.IInterface Interface + { + get + { + this.Start(); + return this.adapter; + } + } + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonFootInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonFootInterface.cs.meta new file mode 100644 index 0000000..955fc2e --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonFootInterface.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d8bbbb4b33b8420428098b3296849a22 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonHandInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonHandInterface.cs new file mode 100644 index 0000000..68d2c99 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonHandInterface.cs @@ -0,0 +1,65 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2014 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +using UnityEngine; +using System; + +namespace OSVR +{ + namespace Unity + { + /// + /// SkeletonHand Interface. Can be injected into other scripts to track OSVR 2D eye interfaces. + /// + public class SkeletonHandInterface : InterfaceGameObjectBase + { + SkeletonHandAdapter adapter; + + override protected void Start() + { + base.Start(); + if (adapter == null && !String.IsNullOrEmpty(usedPath)) + { + adapter = new SkeletonHandAdapter( + OSVR.ClientKit.SkeletonHandInterface.GetInterface(ClientKit.instance.context, usedPath)); + } + } + + protected override void Stop() + { + base.Stop(); + if (adapter != null) + { + adapter.Dispose(); + adapter = null; + } + } + + public OSVR.ClientKit.IInterface Interface + { + get + { + this.Start(); + return this.adapter; + } + } + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonHandInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonHandInterface.cs.meta new file mode 100644 index 0000000..5e0718e --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonHandInterface.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 55844e15a0cec4a4684ab3a8cc2b9f9f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonJointInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonJointInterface.cs new file mode 100644 index 0000000..513328d --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonJointInterface.cs @@ -0,0 +1,65 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2014 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +using UnityEngine; +using System; + +namespace OSVR +{ + namespace Unity + { + /// + /// SkeletonJoint Interface. Can be injected into other scripts to track OSVR 2D eye interfaces. + /// + public class SkeletonJointInterface : InterfaceGameObjectBase + { + SkeletonJointAdapter adapter; + + override protected void Start() + { + base.Start(); + if (adapter == null && !String.IsNullOrEmpty(usedPath)) + { + adapter = new SkeletonJointAdapter( + OSVR.ClientKit.SkeletonJointInterface.GetInterface(ClientKit.instance.context, usedPath)); + } + } + + protected override void Stop() + { + base.Stop(); + if (adapter != null) + { + adapter.Dispose(); + adapter = null; + } + } + + public OSVR.ClientKit.IInterface Interface + { + get + { + this.Start(); + return this.adapter; + } + } + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonJointInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonJointInterface.cs.meta new file mode 100644 index 0000000..5fa7394 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonJointInterface.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7ceda3a40c27d5644b3eafff669ff26e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonLegInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonLegInterface.cs new file mode 100644 index 0000000..f614059 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonLegInterface.cs @@ -0,0 +1,65 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2014 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +using UnityEngine; +using System; + +namespace OSVR +{ + namespace Unity + { + /// + /// SkeletonLeg Interface. Can be injected into other scripts to track OSVR 2D eye interfaces. + /// + public class SkeletonLegInterface : InterfaceGameObjectBase + { + SkeletonLegAdapter adapter; + + override protected void Start() + { + base.Start(); + if (adapter == null && !String.IsNullOrEmpty(usedPath)) + { + adapter = new SkeletonLegAdapter( + OSVR.ClientKit.SkeletonLegInterface.GetInterface(ClientKit.instance.context, usedPath)); + } + } + + protected override void Stop() + { + base.Stop(); + if (adapter != null) + { + adapter.Dispose(); + adapter = null; + } + } + + public OSVR.ClientKit.IInterface Interface + { + get + { + this.Start(); + return this.adapter; + } + } + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonLegInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonLegInterface.cs.meta new file mode 100644 index 0000000..8772476 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonLegInterface.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9820ae087acfbbf47a5574ef2106c3c2 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonReportTypes.cs b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonReportTypes.cs new file mode 100644 index 0000000..9d19a10 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonReportTypes.cs @@ -0,0 +1,235 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2015 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// + +using System; +using System.Runtime.InteropServices; +using ChannelCount = System.Int32; + +namespace OSVR.Unity +{ + public struct SkeletonJointState + { + public OSVR.ClientKit.SkeletonJoints Joint { get; set; } + public OSVR.Unity.Pose3 Pose { get; set; } + + public static SkeletonJointState Convert(OSVR.ClientKit.SkeletonJointState jointState) + { + return new SkeletonJointState + { + Joint = jointState.joint, + Pose = OSVR.Unity.Math.Convert(jointState.pose), + }; + } + } + + public struct SkeletonJointReport + { + public ChannelCount Sensor { get; set; } + public SkeletonJointState State { get; set; } + + public static SkeletonJointReport Convert(OSVR.ClientKit.SkeletonJointReport jointReport) + { + return new SkeletonJointReport + { + Sensor = jointReport.sensor, + State = SkeletonJointState.Convert(jointReport.state), + }; + } + } + + public struct SkeletonTrimmedState + { + public SkeletonJointReport Pelvis { get; set; } + public SkeletonJointReport Spine0 { get; set; } + public SkeletonJointReport Spine1 { get; set; } + public SkeletonJointReport Spine2 { get; set; } + public SkeletonJointReport Spine3 { get; set; } + public SkeletonJointReport Neck { get; set; } + public SkeletonJointReport Head { get; set; } + public SkeletonJointReport ClavicleLeft { get; set; } + public SkeletonJointReport ArmUpperLeft { get; set; } + public SkeletonJointReport ArmLowerLeft { get; set; } + public SkeletonJointReport HandLeft { get; set; } + public SkeletonJointReport HandRight { get; set; } + public SkeletonJointReport LegUpperLeft { get; set; } + public SkeletonJointReport LegLowerLeft { get; set; } + public SkeletonJointReport FootLeft { get; set; } + public SkeletonJointReport ToesLeft { get; set; } + public SkeletonJointReport LegUpperRight { get; set; } + public SkeletonJointReport LegLowerRight { get; set; } + public SkeletonJointReport FootRight { get; set; } + public SkeletonJointReport ToesRight { get; set; } + + public static SkeletonTrimmedState Convert(OSVR.ClientKit.SkeletonTrimmedState trimmedState) + { + return new SkeletonTrimmedState + { + Pelvis = SkeletonJointReport.Convert(trimmedState.pelvis), + Spine0 = SkeletonJointReport.Convert(trimmedState.spine0), + Spine1 = SkeletonJointReport.Convert(trimmedState.spine1), + Spine2 = SkeletonJointReport.Convert(trimmedState.spine2), + Spine3 = SkeletonJointReport.Convert(trimmedState.spine3), + Neck = SkeletonJointReport.Convert(trimmedState.neck), + Head = SkeletonJointReport.Convert(trimmedState.head), + ClavicleLeft = SkeletonJointReport.Convert(trimmedState.clavicleLeft), + ArmUpperLeft = SkeletonJointReport.Convert(trimmedState.armUpperLeft), + ArmLowerLeft = SkeletonJointReport.Convert(trimmedState.armLowerLeft), + HandLeft = SkeletonJointReport.Convert(trimmedState.handLeft), + HandRight = SkeletonJointReport.Convert(trimmedState.handRight), + LegUpperLeft = SkeletonJointReport.Convert(trimmedState.legUpperLeft), + LegLowerLeft = SkeletonJointReport.Convert(trimmedState.legLowerLeft), + FootLeft = SkeletonJointReport.Convert(trimmedState.footLeft), + ToesLeft = SkeletonJointReport.Convert(trimmedState.toesLeft), + LegUpperRight = SkeletonJointReport.Convert(trimmedState.legUpperRight), + LegLowerRight = SkeletonJointReport.Convert(trimmedState.legLowerRight), + FootRight = SkeletonJointReport.Convert(trimmedState.footRight), + ToesRight = SkeletonJointReport.Convert(trimmedState.toesRight), + }; + } + } + + public struct SkeletonWholeState + { + public SkeletonJointReport Pelvis { get; set; } + public SkeletonJointReport Spine0 { get; set; } + public SkeletonJointReport Spine1 { get; set; } + public SkeletonJointReport Spine2 { get; set; } + public SkeletonJointReport Spine3 { get; set; } + public SkeletonJointReport Neck { get; set; } + public SkeletonJointReport Head { get; set; } + public SkeletonArmState LeftArm { get; set; } + public SkeletonArmState RightArm { get; set; } + public SkeletonLegState LeftLeg { get; set; } + public SkeletonLegState RightLeg { get; set; } + + public static SkeletonWholeState Convert(OSVR.ClientKit.SkeletonWholeState wholeState) + { + return new SkeletonWholeState + { + Pelvis = SkeletonJointReport.Convert(wholeState.pelvis), + Spine0 = SkeletonJointReport.Convert(wholeState.pelvis), + Spine1 = SkeletonJointReport.Convert(wholeState.pelvis), + Spine2 = SkeletonJointReport.Convert(wholeState.pelvis), + Spine3 = SkeletonJointReport.Convert(wholeState.pelvis), + Neck = SkeletonJointReport.Convert(wholeState.pelvis), + Head = SkeletonJointReport.Convert(wholeState.pelvis), + LeftArm = SkeletonArmState.Convert(wholeState.leftArm), + RightArm = SkeletonArmState.Convert(wholeState.rightArm), + LeftLeg = SkeletonLegState.Convert(wholeState.leftLeg), + RightLeg = SkeletonLegState.Convert(wholeState.rightLeg), + }; + } + } + + public struct SkeletonHandState + { + public SkeletonJointReport Hand { get; set; } + public SkeletonJointReport ThumbProximal { get; set; } + public SkeletonJointReport ThumbMedial { get; set; } + public SkeletonJointReport ThumbDistal { get; set; } + public SkeletonJointReport IndexProximal { get; set; } + public SkeletonJointReport IndexMedial { get; set; } + public SkeletonJointReport IndexDistal { get; set; } + public SkeletonJointReport MiddleProximal { get; set; } + public SkeletonJointReport MiddleMedial { get; set; } + public SkeletonJointReport MiddleDistal { get; set; } + public SkeletonJointReport RingProximal { get; set; } + public SkeletonJointReport RingMedial { get; set; } + public SkeletonJointReport RingDistal { get; set; } + public SkeletonJointReport PinkyProximal { get; set; } + public SkeletonJointReport PinkyMedial { get; set; } + public SkeletonJointReport PinkyDistal { get; set; } + + public static SkeletonHandState Convert(OSVR.ClientKit.SkeletonHandState handState) + { + return new SkeletonHandState + { + Hand = SkeletonJointReport.Convert(handState.hand), + ThumbProximal = SkeletonJointReport.Convert(handState.thumbProximal), + ThumbMedial = SkeletonJointReport.Convert(handState.thumbMedial), + ThumbDistal = SkeletonJointReport.Convert(handState.thumbDistal), + IndexProximal = SkeletonJointReport.Convert(handState.indexProximal), + IndexMedial = SkeletonJointReport.Convert(handState.indexMedial), + IndexDistal = SkeletonJointReport.Convert(handState.indexDistal), + MiddleProximal = SkeletonJointReport.Convert(handState.middleProximal), + MiddleMedial = SkeletonJointReport.Convert(handState.middleMedial), + MiddleDistal = SkeletonJointReport.Convert(handState.middleDistal), + RingProximal = SkeletonJointReport.Convert(handState.ringProximal), + RingMedial = SkeletonJointReport.Convert(handState.ringMedial), + RingDistal = SkeletonJointReport.Convert(handState.ringDistal), + PinkyProximal = SkeletonJointReport.Convert(handState.pinkyProximal), + PinkyMedial = SkeletonJointReport.Convert(handState.pinkyMedial), + PinkyDistal = SkeletonJointReport.Convert(handState.pinkyDistal), + }; + } + } + + public struct SkeletonArmState + { + public SkeletonJointReport Clavicle { get; set; } + public SkeletonJointReport ArmUpper { get; set; } + public SkeletonJointReport ArmLower { get; set; } + public SkeletonHandState Hand { get; set; } + + public static SkeletonArmState Convert(OSVR.ClientKit.SkeletonArmState armState) + { + return new SkeletonArmState + { + Clavicle = SkeletonJointReport.Convert(armState.clavicle), + ArmUpper = SkeletonJointReport.Convert(armState.armUpper), + ArmLower = SkeletonJointReport.Convert(armState.armLower), + Hand = SkeletonHandState.Convert(armState.hand), + }; + } + } + + public struct SkeletonFootState + { + public SkeletonJointReport Foot { get; set; } + public SkeletonJointReport Toes { get; set; } + + public static SkeletonFootState Convert(OSVR.ClientKit.SkeletonFootState footState) + { + return new SkeletonFootState + { + Foot = SkeletonJointReport.Convert(footState.foot), + Toes = SkeletonJointReport.Convert(footState.toes), + }; + } + } + + public struct SkeletonLegState + { + public SkeletonJointReport LegUpper { get; set; } + public SkeletonJointReport LegLower { get; set; } + public SkeletonFootState Foot { get; set; } + + public static SkeletonLegState Convert(OSVR.ClientKit.SkeletonLegState legState) + { + return new SkeletonLegState + { + LegUpper = SkeletonJointReport.Convert(legState.legUpper), + LegLower = SkeletonJointReport.Convert(legState.legLower), + Foot = SkeletonFootState.Convert(legState.foot), + }; + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonReportTypes.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonReportTypes.cs.meta new file mode 100644 index 0000000..ab198e6 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonReportTypes.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 25ed8b8653797aa49b9fccc5eb391e82 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonTrimmedInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonTrimmedInterface.cs new file mode 100644 index 0000000..e07f416 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonTrimmedInterface.cs @@ -0,0 +1,65 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2014 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +using UnityEngine; +using System; + +namespace OSVR +{ + namespace Unity + { + /// + /// SkeletonTrimmed Interface. Can be injected into other scripts to track OSVR 2D eye interfaces. + /// + public class SkeletonTrimmedInterface : InterfaceGameObjectBase + { + SkeletonTrimmedAdapter adapter; + + override protected void Start() + { + base.Start(); + if (adapter == null && !String.IsNullOrEmpty(usedPath)) + { + adapter = new SkeletonTrimmedAdapter( + OSVR.ClientKit.SkeletonTrimmedInterface.GetInterface(ClientKit.instance.context, usedPath)); + } + } + + protected override void Stop() + { + base.Stop(); + if (adapter != null) + { + adapter.Dispose(); + adapter = null; + } + } + + public OSVR.ClientKit.IInterface Interface + { + get + { + this.Start(); + return this.adapter; + } + } + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonTrimmedInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonTrimmedInterface.cs.meta new file mode 100644 index 0000000..1217ce6 --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonTrimmedInterface.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 252bc2e1f0ce53e46b71f55d9090c1a0 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonWholeInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonWholeInterface.cs new file mode 100644 index 0000000..d47419f --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonWholeInterface.cs @@ -0,0 +1,65 @@ +/// OSVR-Unity Connection +/// +/// http://sensics.com/osvr +/// +/// +/// Copyright 2014 Sensics, Inc. +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +using UnityEngine; +using System; + +namespace OSVR +{ + namespace Unity + { + /// + /// SkeletonWhole Interface. Can be injected into other scripts to track OSVR 2D eye interfaces. + /// + public class SkeletonWholeInterface : InterfaceGameObjectBase + { + SkeletonWholeAdapter adapter; + + override protected void Start() + { + base.Start(); + if (adapter == null && !String.IsNullOrEmpty(usedPath)) + { + adapter = new SkeletonWholeAdapter( + OSVR.ClientKit.SkeletonWholeInterface.GetInterface(ClientKit.instance.context, usedPath)); + } + } + + protected override void Stop() + { + base.Stop(); + if (adapter != null) + { + adapter.Dispose(); + adapter = null; + } + } + + public OSVR.ClientKit.IInterface Interface + { + get + { + this.Start(); + return this.adapter; + } + } + } + } +} diff --git a/OSVR-Unity/Assets/OSVRUnity/src/SkeletonWholeInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonWholeInterface.cs.meta new file mode 100644 index 0000000..001126e --- /dev/null +++ b/OSVR-Unity/Assets/OSVRUnity/src/SkeletonWholeInterface.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ef1e84b9f55a4af42ae58e1abd98e891 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/OSVR-Unity/Assets/devscene.unity b/OSVR-Unity/Assets/devscene.unity index 95b0c34..97601fa 100644 --- a/OSVR-Unity/Assets/devscene.unity +++ b/OSVR-Unity/Assets/devscene.unity @@ -113,15 +113,11 @@ GameObject: serializedVersion: 4 m_Component: - 4: {fileID: 68545920} - - 20: {fileID: 68545926} - - 81: {fileID: 68545925} - - 114: {fileID: 68545924} - - 114: {fileID: 68545923} - - 114: {fileID: 68545922} + - 20: {fileID: 68545922} - 114: {fileID: 68545921} m_Layer: 0 m_Name: VRDisplayTracked - m_TagString: Untagged + m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 @@ -135,89 +131,32 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 1758849389} - - {fileID: 800143295} + m_Children: [] m_Father: {fileID: 605626979} m_RootOrder: 0 --- !u!114 &68545921 MonoBehaviour: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11417594, guid: bcbb49b5078d05d498ef83a6373ba939, - type: 2} - m_PrefabInternal: {fileID: 1475502965} - m_GameObject: {fileID: 68545919} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: db80e57e78593b64384f21c9a3022b68, type: 3} - m_Name: - m_EditorClassIdentifier: - k1Red: 0 - k1Green: 0 - k1Blue: 0 - fullCenter: {x: .5, y: .5} - leftCenter: {x: .5, y: .5} - rightCenter: {x: .5, y: .5} - distortionShader: {fileID: 4800000, guid: 1dffc394b375bda49bb119de26c0bb35, type: 3} ---- !u!114 &68545922 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11400556, guid: bcbb49b5078d05d498ef83a6373ba939, - type: 2} - m_PrefabInternal: {fileID: 1475502965} - m_GameObject: {fileID: 68545919} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a288e4aec9950634b83d232abc73d1bb, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &68545923 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11431736, guid: bcbb49b5078d05d498ef83a6373ba939, + m_PrefabParentObject: {fileID: 11463916, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2} m_PrefabInternal: {fileID: 1475502965} m_GameObject: {fileID: 68545919} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d819a5e6a69cc5c46be733d8a56d387e, type: 3} + m_Script: {fileID: 11500000, guid: c2b982789045b4641a4c4898908314b3, type: 3} m_Name: m_EditorClassIdentifier: - path: /me/head ---- !u!114 &68545924 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11431734, guid: bcbb49b5078d05d498ef83a6373ba939, - type: 2} - m_PrefabInternal: {fileID: 1475502965} - m_GameObject: {fileID: 68545919} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 425e251a3200841b98a61cd7234fc119, type: 3} - m_Name: - m_EditorClassIdentifier: - viewMode: 0 - stereoAmount: 1 - maxStereo: .0299999993 ---- !u!81 &68545925 -AudioListener: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 8131736, guid: bcbb49b5078d05d498ef83a6373ba939, - type: 2} - m_PrefabInternal: {fileID: 1475502965} - m_GameObject: {fileID: 68545919} - m_Enabled: 1 ---- !u!20 &68545926 +--- !u!20 &68545922 Camera: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 2031736, guid: bcbb49b5078d05d498ef83a6373ba939, + m_PrefabParentObject: {fileID: 2065472, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2} m_PrefabInternal: {fileID: 1475502965} m_GameObject: {fileID: 68545919} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 1 - m_BackGroundColor: {r: .257352948, g: .257352948, b: .257352948, a: .0196078438} + m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438} m_NormalizedViewPortRect: serializedVersion: 2 x: 0 @@ -229,7 +168,7 @@ Camera: field of view: 60 orthographic: 0 orthographic size: 5 - m_Depth: 1 + m_Depth: 0 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 @@ -504,82 +443,6 @@ Transform: m_Children: [] m_Father: {fileID: 12973272} m_RootOrder: 0 ---- !u!1 &800143294 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 131732, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2} - m_PrefabInternal: {fileID: 1475502965} - serializedVersion: 4 - m_Component: - - 4: {fileID: 800143295} - - 114: {fileID: 800143297} - - 20: {fileID: 800143296} - m_Layer: 0 - m_Name: RightEye - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &800143295 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 431732, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2} - m_PrefabInternal: {fileID: 1475502965} - m_GameObject: {fileID: 800143294} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 68545920} - m_RootOrder: 1 ---- !u!20 &800143296 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 2017596, guid: bcbb49b5078d05d498ef83a6373ba939, - type: 2} - m_PrefabInternal: {fileID: 1475502965} - m_GameObject: {fileID: 800143294} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: .300000012 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_HDR: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: .0219999999 ---- !u!114 &800143297 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11431730, guid: bcbb49b5078d05d498ef83a6373ba939, - type: 2} - m_PrefabInternal: {fileID: 1475502965} - m_GameObject: {fileID: 800143294} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 490e571217a2247e395abfef67b70c89, type: 3} - m_Name: - m_EditorClassIdentifier: - eye: 1 - cachedTransform: {fileID: 0} --- !u!1001 &860137242 Prefab: m_ObjectHideFlags: 0 @@ -1067,82 +930,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1735307938} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &1758849386 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 131734, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2} - m_PrefabInternal: {fileID: 1475502965} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1758849389} - - 114: {fileID: 1758849388} - - 20: {fileID: 1758849387} - m_Layer: 0 - m_Name: LeftEye - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!20 &1758849387 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 2017594, guid: bcbb49b5078d05d498ef83a6373ba939, - type: 2} - m_PrefabInternal: {fileID: 1475502965} - m_GameObject: {fileID: 1758849386} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: .300000012 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_HDR: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: .0219999999 ---- !u!114 &1758849388 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11431732, guid: bcbb49b5078d05d498ef83a6373ba939, - type: 2} - m_PrefabInternal: {fileID: 1475502965} - m_GameObject: {fileID: 1758849386} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 490e571217a2247e395abfef67b70c89, type: 3} - m_Name: - m_EditorClassIdentifier: - eye: 0 - cachedTransform: {fileID: 0} ---- !u!4 &1758849389 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 431734, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2} - m_PrefabInternal: {fileID: 1475502965} - m_GameObject: {fileID: 1758849386} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 68545920} - m_RootOrder: 0 --- !u!1 &1890437448 GameObject: m_ObjectHideFlags: 0