From 2ea3624ecc481a5ff8b16ab844c2a5334dc8ff4d Mon Sep 17 00:00:00 2001 From: MattGray Date: Fri, 11 Aug 2023 15:50:27 +0100 Subject: [PATCH] Apply formatting patch --- .../PhysicsHands/Editor/PhysicsBoneEditor.cs | 4 ++-- .../PhysicsHands/Editor/PhysicsProviderEditor.cs | 4 ++-- .../PhysicsHands/Runtime/PhysicsIgnoreHelpers.cs | 10 +++++----- .../PhysicsHands/Runtime/Utils/PhysExts.cs | 2 +- .../Core/Runtime/Scripts/Encoding/VectorHand.cs | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Packages/Tracking Preview/PhysicsHands/Editor/PhysicsBoneEditor.cs b/Packages/Tracking Preview/PhysicsHands/Editor/PhysicsBoneEditor.cs index 4eae584f6e..3cd9fb1058 100644 --- a/Packages/Tracking Preview/PhysicsHands/Editor/PhysicsBoneEditor.cs +++ b/Packages/Tracking Preview/PhysicsHands/Editor/PhysicsBoneEditor.cs @@ -22,10 +22,10 @@ public override void OnInspectorGUI() EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Script"), true, new GUILayoutOption[0]); GUI.enabled = true; - EditorGUILayout.LabelField("Bone States",EditorStyles.boldLabel); + EditorGUILayout.LabelField("Bone States", EditorStyles.boldLabel); GUI.enabled = false; EditorGUILayout.PropertyField(_isBoneHovering); - EditorGUILayout.PropertyField (_isBoneContacting); + EditorGUILayout.PropertyField(_isBoneContacting); EditorGUILayout.PropertyField(_isBoneGrabbable); EditorGUILayout.PropertyField(_isBoneGrabbing); diff --git a/Packages/Tracking Preview/PhysicsHands/Editor/PhysicsProviderEditor.cs b/Packages/Tracking Preview/PhysicsHands/Editor/PhysicsProviderEditor.cs index faeacd5d8d..781d51ecc4 100644 --- a/Packages/Tracking Preview/PhysicsHands/Editor/PhysicsProviderEditor.cs +++ b/Packages/Tracking Preview/PhysicsHands/Editor/PhysicsProviderEditor.cs @@ -84,7 +84,7 @@ private void GetProperties() _teleportDistance = _handParameters.FindPropertyRelative("teleportDistance"); _boneMass = _handParameters.FindPropertyRelative("boneMass"); - _boneStiffness = _handParameters.FindPropertyRelative("boneStiffness"); + _boneStiffness = _handParameters.FindPropertyRelative("boneStiffness"); _boneForceLimit = _handParameters.FindPropertyRelative("boneForceLimit"); _maxPalmVel = _handParameters.FindPropertyRelative("maximumPalmVelocity"); @@ -127,7 +127,7 @@ public override void OnInspectorGUI() private void WarningsSection() { // Provider - if(_inputProvider.objectReferenceValue == null) + if (_inputProvider.objectReferenceValue == null) { EditorGUILayout.BeginHorizontal(); EditorGUILayout.HelpBox($"You will need to assign an Input Leap Provider otherwise you will not have any hands.", MessageType.Warning); diff --git a/Packages/Tracking Preview/PhysicsHands/Runtime/PhysicsIgnoreHelpers.cs b/Packages/Tracking Preview/PhysicsHands/Runtime/PhysicsIgnoreHelpers.cs index e70a545bed..8c2f068109 100644 --- a/Packages/Tracking Preview/PhysicsHands/Runtime/PhysicsIgnoreHelpers.cs +++ b/Packages/Tracking Preview/PhysicsHands/Runtime/PhysicsIgnoreHelpers.cs @@ -24,9 +24,9 @@ public class PhysicsIgnoreHelpers : MonoBehaviour public bool IsThisBoneIgnored(PhysicsBone bone) { - if(bone == null) + if (bone == null) return false; - if(DisableAllHandCollisions) + if (DisableAllHandCollisions) return true; if (DisableSpecificHandCollisions && DisabledHandedness == bone.Hand.Handedness) return true; @@ -35,11 +35,11 @@ public bool IsThisBoneIgnored(PhysicsBone bone) public bool IsThisHandIgnored(PhysicsHand hand) { - if(hand == null) + if (hand == null) return false; if (DisableAllHandCollisions) return true; - if(DisableSpecificHandCollisions && DisabledHandedness == hand.Handedness) + if (DisableSpecificHandCollisions && DisabledHandedness == hand.Handedness) return true; return false; } @@ -56,7 +56,7 @@ private void DisableBoneCollisions(Collision collision) { if (collision.gameObject != null && collision.gameObject.TryGetComponent(out var temp)) { - if(!IsThisBoneIgnored(temp)) + if (!IsThisBoneIgnored(temp)) { return; } diff --git a/Packages/Tracking Preview/PhysicsHands/Runtime/Utils/PhysExts.cs b/Packages/Tracking Preview/PhysicsHands/Runtime/Utils/PhysExts.cs index 9d20729328..8df23b761a 100644 --- a/Packages/Tracking Preview/PhysicsHands/Runtime/Utils/PhysExts.cs +++ b/Packages/Tracking Preview/PhysicsHands/Runtime/Utils/PhysExts.cs @@ -115,7 +115,7 @@ public static float MaxVec3(Vector3 v) public static bool ContainsRange(this T[] arr, T value, int maxIndex) { - return System.Array.IndexOf(arr, value,0, maxIndex) != -1; + return System.Array.IndexOf(arr, value, 0, maxIndex) != -1; } } diff --git a/Packages/Tracking/Core/Runtime/Scripts/Encoding/VectorHand.cs b/Packages/Tracking/Core/Runtime/Scripts/Encoding/VectorHand.cs index ffdd2e6975..e8889d8159 100644 --- a/Packages/Tracking/Core/Runtime/Scripts/Encoding/VectorHand.cs +++ b/Packages/Tracking/Core/Runtime/Scripts/Encoding/VectorHand.cs @@ -191,7 +191,7 @@ public void Decode(Hand intoHand) prevJoint = ToWorld(prevJoint, palmPos, palmRot); boneRot = palmRot * boneRot; - if(fingerIdx == 0 && boneIdx == 0) + if (fingerIdx == 0 && boneIdx == 0) { boneRot *= ThumbMetacarpalRotationOffset[intoHand.IsLeft ? 0 : 1]; }