Skip to content

Commit 544fdf6

Browse files
committed
Updating to Unity 5.6.0f3-MRTP6. Changing references from Orientation to Rotation and moving some source ray items around.
1 parent c557286 commit 544fdf6

37 files changed

+242
-229
lines changed

Assets/HoloToolkit-Examples/SpatialUnderstanding/SpatialUnderstanding-FeatureOverview/Scripts/SpatialUnderstandingBasicCursor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected virtual void Awake()
4242
// Hide the Cursor to begin with.
4343
meshRenderer.enabled = false;
4444

45-
// Cache the cursor default rotation so the cursor can be rotated with respect to the original orientation.
45+
// Cache the cursor default rotation so the cursor can be rotated with respect to the original rotation.
4646
cursorDefaultRotation = gameObject.transform.rotation;
4747
}
4848

Assets/HoloToolkit/Input/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ This class uses the InputSourcePointer to define the rules of stealing focus whe
153153

154154
#### Gaze
155155
##### BaseRayStabilizer.cs
156-
A base abstract class for a stabilizer that takes as input position and orientation, and performs operations on them to stabilize or smooth that data.
156+
A base abstract class for a stabilizer that takes as input position and rotation, and performs operations on them to stabilize or smooth that data.
157157

158158
##### GazeManager.cs
159159
Singleton component in charge of managing the gaze vector. This is where you can define which layers are considered when gazing at objects. Optionally, the gaze manager can reference a ray stabilizer that will be used to stabilize the gaze of the user.
@@ -197,8 +197,8 @@ Event data for an event coming from the navigation gesture.
197197
##### PointerSpecificEventData.cs
198198
Event data for an event that represents a pointer entering or exiting focus on an object.
199199

200-
##### SourceOrientationEventData.cs
201-
Event data for an event that represents a change in orientation of an input source.
200+
##### SourceRotationEventData.cs
201+
Event data for an event that represents a change in rotation of an input source.
202202

203203
##### SourcePositionEventData.cs
204204
Event data for an event that represents a change in position of an input source.
@@ -240,8 +240,8 @@ Interface that a game object can implement to react to navigation gestures.
240240
##### IPointerSpecificFocusable.cs
241241
Interface that a game object can implement to react to a specific pointer's focus enter/exit.
242242

243-
##### ISourceOrientationHandler.cs
244-
Interface that a game object can implement to react to a source's orientation changing.
243+
##### ISourceRotationHandler.cs
244+
Interface that a game object can implement to react to a source's rotation changing.
245245

246246
##### ISourcePositionHandler.cs
247247
Interface that a game object can implement to react to a source's position changing.

Assets/HoloToolkit/Input/Scripts/ControllerVisualizer.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ namespace HoloToolkit.Unity.InputModule
99
{
1010
/// <summary>
1111
/// This script spawns a specific GameObject when a controller is detected
12-
/// and animates the controller position and orientation.
12+
/// and animates the controller position and rotation.
1313
/// </summary>
1414
[RequireComponent(typeof(SetGlobalListener))]
15-
public class ControllerVisualizer : MonoBehaviour, ISourceStateHandler, ISourceOrientationHandler, ISourcePositionHandler
15+
public class ControllerVisualizer : MonoBehaviour, ISourceStateHandler, ISourceRotationHandler, ISourcePositionHandler
1616
{
1717
[Tooltip("Use a model with the tip in the positive Z direction and the front face in the positive Y direction.")]
1818
[SerializeField]
@@ -71,12 +71,12 @@ public void OnSourceLost(SourceStateEventData eventData)
7171
}
7272
}
7373

74-
public void OnOrientationChanged(SourceOrientationEventData eventData)
74+
public void OnRotationChanged(SourceRotationEventData eventData)
7575
{
7676
GameObject controller;
7777
if (controllerDictionary.TryGetValue(eventData.SourceId, out controller))
7878
{
79-
controller.transform.rotation = eventData.Orientation;
79+
controller.transform.rotation = eventData.Rotation;
8080
}
8181
}
8282

Assets/HoloToolkit/Input/Scripts/Gaze/BaseRayStabilizer.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace HoloToolkit.Unity.InputModule
77
{
88
/// <summary>
9-
/// A base class for a stabilizer that takes an input position and orientation, and performs operations on them
9+
/// A base class for a stabilizer that takes an input position and rotation, and performs operations on them
1010
/// to stabilize, or smooth deltas, in the data.
1111
/// </summary>
1212
public abstract class BaseRayStabilizer : MonoBehaviour
@@ -22,15 +22,15 @@ public abstract class BaseRayStabilizer : MonoBehaviour
2222
public abstract Quaternion StableRotation { get; }
2323

2424
/// <summary>
25-
/// A ray representing the stable position and orientation
25+
/// A ray representing the stable position and rotation
2626
/// </summary>
2727
public abstract Ray StableRay { get; }
2828

2929
/// <summary>
30-
/// Call this each frame to smooth out changes to a position and orientation, if supported.
30+
/// Call this each frame to smooth out changes to a position and rotation, if supported.
3131
/// </summary>
3232
/// <param name="position">Input position to smooth.</param>
33-
/// <param name="rotation">Input orientation to smooth.</param>
33+
/// <param name="rotation">Input rotation to smooth.</param>
3434
public virtual void UpdateStability(Vector3 position, Quaternion rotation)
3535
{
3636
UpdateStability(position, (rotation * Vector3.forward));

Assets/HoloToolkit/Input/Scripts/Gaze/GazeManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ public Vector3 GazeNormal
6767
public BaseRayStabilizer Stabilizer = null;
6868

6969
/// <summary>
70-
/// Transform that should be used as the source of the gaze position and orientation.
70+
/// Transform that should be used as the source of the gaze position and rotation.
7171
/// Defaults to the main camera.
7272
/// </summary>
73-
[Tooltip("Transform that should be used to represent the gaze position and orientation. Defaults to Camera.Main")]
73+
[Tooltip("Transform that should be used to represent the gaze position and rotation. Defaults to Camera.Main")]
7474
public Transform GazeTransform;
7575

7676
[Tooltip("True to draw a debug view of the ray.")]

Assets/HoloToolkit/Input/Scripts/HandGuidance.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected override void Awake()
4444
if (HandGuidanceIndicator != null)
4545
{
4646
// Cache the initial rotation of the HandGuidanceIndicator so future rotations
47-
// can be done with respect to this orientation.
47+
// can be done with respect to this rotation.
4848
defaultHandGuidanceRotation = HandGuidanceIndicator.transform.rotation;
4949
}
5050

@@ -106,7 +106,7 @@ private void GetIndicatorPositionAndRotation(InteractionSourceState hand, out Ve
106106

107107
private void InteractionManager_SourceUpdated(InteractionManager.SourceEventArgs obj)
108108
{
109-
if (obj.state.source.kind == InteractionSourceKind.Hand)
109+
if (obj.state.source.sourceKind == InteractionSourceKind.Hand)
110110
{
111111
InteractionSourceState hand = obj.state;
112112

@@ -141,7 +141,7 @@ private void InteractionManager_SourceUpdated(InteractionManager.SourceEventArgs
141141

142142
private void InteractionManager_SourceReleased(InteractionManager.SourceEventArgs obj)
143143
{
144-
if (obj.state.source.kind == InteractionSourceKind.Hand)
144+
if (obj.state.source.sourceKind == InteractionSourceKind.Hand)
145145
{
146146
// Stop displaying the guidance indicator when the user releases their finger from the pressed state.
147147
RemoveTrackedHand(obj.state);
@@ -150,7 +150,7 @@ private void InteractionManager_SourceReleased(InteractionManager.SourceEventArg
150150

151151
private void InteractionManager_SourceLost(InteractionManager.SourceEventArgs obj)
152152
{
153-
if (obj.state.source.kind == InteractionSourceKind.Hand)
153+
if (obj.state.source.sourceKind == InteractionSourceKind.Hand)
154154
{
155155
// Stop displaying the guidance indicator when the user's hand leaves the view.
156156
RemoveTrackedHand(obj.state);

Assets/HoloToolkit/Input/Scripts/InputEventData/SourceOrientationEventData.cs renamed to Assets/HoloToolkit/Input/Scripts/InputEventData/SourceRotationEventData.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@
77
namespace HoloToolkit.Unity.InputModule
88
{
99
/// <summary>
10-
/// Describes an input event that involves a source's orientation changing.
10+
/// Describes an input event that involves a source's rotation changing.
1111
/// </summary>
12-
public class SourceOrientationEventData : BaseInputEventData
12+
public class SourceRotationEventData : BaseInputEventData
1313
{
1414
/// <summary>
15-
/// The new orientation of the source.
15+
/// The new rotation of the source.
1616
/// </summary>
17-
public Quaternion Orientation { get; private set; }
17+
public Quaternion Rotation { get; private set; }
1818

19-
public SourceOrientationEventData(EventSystem eventSystem) : base(eventSystem)
19+
public SourceRotationEventData(EventSystem eventSystem) : base(eventSystem)
2020
{
2121
}
2222

23-
public void Initialize(IInputSource inputSource, uint sourceId, object tag, Quaternion orientation)
23+
public void Initialize(IInputSource inputSource, uint sourceId, object tag, Quaternion rotation)
2424
{
2525
BaseInitialize(inputSource, sourceId, tag);
26-
Orientation = orientation;
26+
Rotation = rotation;
2727
}
2828
}
2929
}

Assets/HoloToolkit/Input/Scripts/InputEventData/SourceOrientationEventData.cs.meta renamed to Assets/HoloToolkit/Input/Scripts/InputEventData/SourceRotationEventData.cs.meta

File renamed without changes.

Assets/HoloToolkit/Input/Scripts/InputEvents/ISourceOrientationHandler.cs renamed to Assets/HoloToolkit/Input/Scripts/InputEvents/ISourceRotationHandler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
namespace HoloToolkit.Unity.InputModule
77
{
88
/// <summary>
9-
/// Interface to implement to react to source orientation changes.
9+
/// Interface to implement to react to source rotation changes.
1010
/// </summary>
11-
public interface ISourceOrientationHandler : IEventSystemHandler
11+
public interface ISourceRotationHandler : IEventSystemHandler
1212
{
13-
void OnOrientationChanged(SourceOrientationEventData eventData);
13+
void OnRotationChanged(SourceRotationEventData eventData);
1414
}
1515
}

Assets/HoloToolkit/Input/Scripts/InputEvents/ISourceOrientationHandler.cs.meta renamed to Assets/HoloToolkit/Input/Scripts/InputEvents/ISourceRotationHandler.cs.meta

File renamed without changes.

0 commit comments

Comments
 (0)