Skip to content

Commit 18e0bb4

Browse files
committed
Updated documentation
1 parent 9d71ff0 commit 18e0bb4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Assets/MixedRealityToolkit-SDK/Features/Utilities/Solvers/ControllerFinder.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ namespace Microsoft.MixedReality.Toolkit.SDK.Utilities.Solvers
1818
public abstract class ControllerFinder : MonoBehaviour, IMixedRealitySourceStateHandler
1919
{
2020
[SerializeField]
21+
[Tooltip("The handedness of the controller that should be found.")]
2122
private Handedness handedness = Handedness.None;
2223

24+
/// <summary>
25+
/// The handedness of the controller that should be found.
26+
/// </summary>
2327
public Handedness Handedness
2428
{
2529
get { return handedness; }
@@ -34,6 +38,9 @@ public Handedness Handedness
3438
}
3539
}
3640

41+
/// <summary>
42+
/// The Transform of the currently found controller.
43+
/// </summary>
3744
protected Transform ControllerTransform;
3845

3946
private IEnumerable<IMixedRealityManager> BaseDeviceManagers => baseDeviceManagers ?? (baseDeviceManagers = MixedRealityManager.Instance.GetManagers(typeof(IMixedRealityDeviceManager)));
@@ -104,6 +111,10 @@ protected virtual void TryAndAddControllerTransform()
104111
}
105112
}
106113

114+
/// <summary>
115+
/// Starts to track the passed in controller's transform, assuming it meets the previously set handedness criteria.
116+
/// </summary>
117+
/// <param name="newController">The new controller to be tracked.</param>
107118
protected virtual void AddControllerTransform(IMixedRealityController newController)
108119
{
109120
if (newController.ControllerHandedness == handedness && newController.Transform != null && !newController.Transform.Equals(ControllerTransform))
@@ -114,6 +125,9 @@ protected virtual void AddControllerTransform(IMixedRealityController newControl
114125
}
115126
}
116127

128+
/// <summary>
129+
/// Remove whichever controller is currently tracked, if any.
130+
/// </summary>
117131
protected virtual void RemoveControllerTransform()
118132
{
119133
if (ControllerTransform != null)
@@ -124,6 +138,9 @@ protected virtual void RemoveControllerTransform()
124138
}
125139
}
126140

141+
/// <summary>
142+
/// Remove whichever controller is currently tracked, if any, and try to add a new one based on existing sources.
143+
/// </summary>
127144
protected virtual void RefreshControllerTransform()
128145
{
129146
if (ControllerTransform != null)

0 commit comments

Comments
 (0)