diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/ManipulationMode.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/ManipulationMode.cs index 00bd7ef2a1c..b1ce3a06209 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/ManipulationMode.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/ManipulationMode.cs @@ -1,5 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. + using System; namespace HoloToolkit.Unity.InputModule.Utilities.Interactions diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs index cc4639829db..bf2eec38741 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs @@ -7,7 +7,6 @@ using UnityEngine; using UnityEngine.Assertions; - namespace HoloToolkit.Unity.InputModule.Utilities.Interactions { /// @@ -30,7 +29,7 @@ public Transform HostTransform } [SerializeField] - [Tooltip("To visualize the object bounding box, drop the HoloToolKit/UX/Prefabs/BoundingBoxes/BoundingBoxBasic.prefab here. This is optional.")] + [Tooltip("To visualize the object bounding box, drop the HoloToolkit/UX/Prefabs/BoundingBoxes/BoundingBoxBasic.prefab here. This is optional.")] private BoundingBox boundingBoxPrefab = null; /// @@ -38,15 +37,8 @@ public Transform HostTransform /// public BoundingBox BoundingBoxPrefab { - set - { - boundingBoxPrefab = value; - } - - get - { - return boundingBoxPrefab; - } + set { boundingBoxPrefab = value; } + get { return boundingBoxPrefab; } } [SerializeField] @@ -79,7 +71,7 @@ public bool EnableEnableOneHandedMovement set { enableOneHandMovement = value; } } - // private fields that store transform information. + // Private fields that store transform information. #region Transform Info private BoundingBox boundingBoxInstance; @@ -91,7 +83,7 @@ public bool EnableEnableOneHandedMovement #endregion Transform Info /// - /// Maps input id -> position of hand + /// Maps input id -> position of hand. /// private readonly Dictionary handsPressedLocationsMap = new Dictionary(); @@ -117,7 +109,7 @@ private bool ShowBoundingBox if (value) { - boundingBoxInstance.Target = gameObject; + boundingBoxInstance.Target = HostTransform.gameObject; boundingBoxInstance.gameObject.SetActive(true); } else @@ -130,17 +122,14 @@ private bool ShowBoundingBox } /// - /// SetManipulationMode + /// Change the manipulation mode. /// - [System.Obsolete("Use ManipulationMode")] + [System.Obsolete("Use ManipulationMode.")] public void SetManipulationMode(ManipulationMode mode) { manipulationMode = mode; } - /// - /// Private Methods - /// private void Awake() { moveLogic = new TwoHandMoveLogic(); @@ -158,7 +147,7 @@ private void Start() private void Update() { - //Update positions of all hands + // Update positions of all hands foreach (var key in handsPressedInputSourceMap.Keys) { var inputSource = handsPressedInputSourceMap[key]; @@ -196,7 +185,7 @@ private void RemoveSourceIdFromHandMap(uint sourceId) } /// - /// /// Event Handler receives input from inputSource + /// Event Handler receives input from inputSource. /// public void OnInputDown(InputEventData eventData) { @@ -208,7 +197,7 @@ public void OnInputDown(InputEventData eventData) } /// - /// Event Handler receives input from inputSource + /// Event Handler receives input from inputSource. /// public void OnInputUp(InputEventData eventData) { @@ -218,12 +207,12 @@ public void OnInputUp(InputEventData eventData) } /// - /// OnSourceDetected Event Handler + /// OnSourceDetected Event Handler. /// public void OnSourceDetected(SourceStateEventData eventData) { } /// - /// OnSourceLost + /// OnSourceLost Event Handler. /// public void OnSourceLost(SourceStateEventData eventData) { @@ -233,7 +222,7 @@ public void OnSourceLost(SourceStateEventData eventData) } /// - /// private Event Handlers + /// Updates the state machine based on the current state and anything that might have changed with the hands. /// private void UpdateStateMachine() { @@ -418,7 +407,7 @@ private void OnManipulationStarted() { InputManager.Instance.PushModalInputHandler(gameObject); - //Show Bounding Box visual on manipulation interaction + // Show Bounding Box visual on manipulation interaction ShowBoundingBox = true; } @@ -426,7 +415,7 @@ private void OnManipulationEnded() { InputManager.Instance.PopModalInputHandler(); - //Hide Bounding Box visual on release + // Hide Bounding Box visual on release ShowBoundingBox = false; } }