![]() |
AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
|
A MonoBehaviour that interpolates a transform's position, rotation or scale. More...
Public Member Functions | |
| void | Awake () |
| void | SetTargetPosition (Vector3 target) |
| Sets the target position for the transform and if position wasn't already animating, fires the InterpolationStarted event. More... | |
| void | SetTargetRotation (Quaternion target) |
| Sets the target rotation for the transform and if rotation wasn't already animating, fires the InterpolationStarted event. More... | |
| void | SetTargetLocalRotation (Quaternion target) |
| Sets the target local rotation for the transform and if rotation wasn't already animating, fires the InterpolationStarted event. More... | |
| void | SetTargetLocalScale (Vector3 target) |
| Sets the target local scale for the transform and if scale wasn't already animating, fires the InterpolationStarted event. More... | |
| void | Update () |
| void | SnapToTarget () |
| Snaps to the final target and stops interpolating More... | |
| void | StopInterpolating () |
| Stops the interpolation regardless if it has reached the target More... | |
| void | Reset () |
| Stops the transform in place and terminates any animations. More... | |
Static Public Member Functions | |
| static Vector3 | NonLinearInterpolateTo (Vector3 start, Vector3 target, float deltaTime, float speed) |
| Interpolates smoothly to a target position. More... | |
Public Attributes | |
| bool | UseUnscaledTime = true |
| float | PositionPerSecond = 30.0f |
| float | RotationDegreesPerSecond = 720.0f |
| float | RotationSpeedScaler = 0.0f |
| float | ScalePerSecond = 5.0f |
| bool | SmoothLerpToTarget = false |
| float | SmoothPositionLerpRatio = 0.5f |
| float | SmoothRotationLerpRatio = 0.5f |
| float | SmoothScaleLerpRatio = 0.5f |
Properties | |
| bool | AnimatingPosition [get] |
| True if the transform's position is animating; false otherwise. More... | |
| bool | AnimatingRotation [get] |
| True if the transform's rotation is animating; false otherwise. More... | |
| bool | AnimatingLocalRotation [get] |
| True if the transform's local rotation is animating; false otherwise. More... | |
| bool | AnimatingLocalScale [get] |
| True if the transform's scale is animating; false otherwise. More... | |
| Vector3 | PositionVelocity [get] |
| The velocity of a transform whose position is being interpolated. More... | |
| bool | Running [get] |
| True if position, rotation or scale are animating; false otherwise. More... | |
| Vector3 | TargetPosition [get] |
| If animating position, specifies the target position as specified by SetTargetPosition. Otherwise returns the current position of the transform. More... | |
| Quaternion | TargetRotation [get] |
| If animating rotation, specifies the target rotation as specified by SetTargetRotation. Otherwise returns the current rotation of the transform. More... | |
| Quaternion | TargetLocalRotation [get] |
| If animating local rotation, specifies the target local rotation as specified by SetTargetLocalRotation. Otherwise returns the current local rotation of the transform. More... | |
| Vector3 | TargetLocalScale [get] |
| If animating local scale, specifies the target local scale as specified by SetTargetLocalScale. Otherwise returns the current local scale of the transform. More... | |
Events | |
| System.Action | InterpolationStarted |
| The event fired when an Interpolation is started. More... | |
| System.Action | InterpolationDone |
| The event fired when an Interpolation is completed. More... | |
A MonoBehaviour that interpolates a transform's position, rotation or scale.
Definition at line 11 of file Interpolator.cs.
| void HoloToolkit.Unity.Interpolator.Awake | ( | ) |
Definition at line 103 of file Interpolator.cs.
|
static |
Interpolates smoothly to a target position.
| start | The starting position. |
| target | The destination position. |
| deltaTime | Caller-provided Time.deltaTime. |
| speed | The speed to apply to the interpolation. |
Definition at line 239 of file Interpolator.cs.
| void HoloToolkit.Unity.Interpolator.Reset | ( | ) |
Stops the transform in place and terminates any animations.
Definition at line 427 of file Interpolator.cs.
| void HoloToolkit.Unity.Interpolator.SetTargetLocalRotation | ( | Quaternion | target | ) |
Sets the target local rotation for the transform and if rotation wasn't already animating, fires the InterpolationStarted event.
| target | The new target local rotation for the transform. |
Definition at line 177 of file Interpolator.cs.
| void HoloToolkit.Unity.Interpolator.SetTargetLocalScale | ( | Vector3 | target | ) |
Sets the target local scale for the transform and if scale wasn't already animating, fires the InterpolationStarted event.
| target | The new target local rotation for the transform. |
Definition at line 206 of file Interpolator.cs.
| void HoloToolkit.Unity.Interpolator.SetTargetPosition | ( | Vector3 | target | ) |
Sets the target position for the transform and if position wasn't already animating, fires the InterpolationStarted event.
| target | The new target position to for the transform. |
Definition at line 118 of file Interpolator.cs.
| void HoloToolkit.Unity.Interpolator.SetTargetRotation | ( | Quaternion | target | ) |
Sets the target rotation for the transform and if rotation wasn't already animating, fires the InterpolationStarted event.
| target | The new target rotation for the transform. |
Definition at line 148 of file Interpolator.cs.
| void HoloToolkit.Unity.Interpolator.SnapToTarget | ( | ) |
Snaps to the final target and stops interpolating
Definition at line 385 of file Interpolator.cs.
| void HoloToolkit.Unity.Interpolator.StopInterpolating | ( | ) |
Stops the interpolation regardless if it has reached the target
Definition at line 411 of file Interpolator.cs.
| void HoloToolkit.Unity.Interpolator.Update | ( | ) |
Definition at line 261 of file Interpolator.cs.
| float HoloToolkit.Unity.Interpolator.PositionPerSecond = 30.0f |
Definition at line 21 of file Interpolator.cs.
| float HoloToolkit.Unity.Interpolator.RotationDegreesPerSecond = 720.0f |
Definition at line 24 of file Interpolator.cs.
| float HoloToolkit.Unity.Interpolator.RotationSpeedScaler = 0.0f |
Definition at line 27 of file Interpolator.cs.
| float HoloToolkit.Unity.Interpolator.ScalePerSecond = 5.0f |
Definition at line 30 of file Interpolator.cs.
| bool HoloToolkit.Unity.Interpolator.SmoothLerpToTarget = false |
Definition at line 35 of file Interpolator.cs.
| float HoloToolkit.Unity.Interpolator.SmoothPositionLerpRatio = 0.5f |
Definition at line 37 of file Interpolator.cs.
| float HoloToolkit.Unity.Interpolator.SmoothRotationLerpRatio = 0.5f |
Definition at line 39 of file Interpolator.cs.
| float HoloToolkit.Unity.Interpolator.SmoothScaleLerpRatio = 0.5f |
Definition at line 41 of file Interpolator.cs.
| bool HoloToolkit.Unity.Interpolator.UseUnscaledTime = true |
Definition at line 14 of file Interpolator.cs.
|
get |
True if the transform's local rotation is animating; false otherwise.
Definition at line 65 of file Interpolator.cs.
|
get |
True if the transform's scale is animating; false otherwise.
Definition at line 73 of file Interpolator.cs.
|
get |
True if the transform's position is animating; false otherwise.
Definition at line 49 of file Interpolator.cs.
|
get |
True if the transform's rotation is animating; false otherwise.
Definition at line 57 of file Interpolator.cs.
|
get |
The velocity of a transform whose position is being interpolated.
Definition at line 88 of file Interpolator.cs.
|
get |
True if position, rotation or scale are animating; false otherwise.
Definition at line 96 of file Interpolator.cs.
|
get |
If animating local rotation, specifies the target local rotation as specified by SetTargetLocalRotation. Otherwise returns the current local rotation of the transform.
Definition at line 482 of file Interpolator.cs.
|
get |
If animating local scale, specifies the target local scale as specified by SetTargetLocalScale. Otherwise returns the current local scale of the transform.
Definition at line 499 of file Interpolator.cs.
|
get |
If animating position, specifies the target position as specified by SetTargetPosition. Otherwise returns the current position of the transform.
Definition at line 448 of file Interpolator.cs.
|
get |
If animating rotation, specifies the target rotation as specified by SetTargetRotation. Otherwise returns the current rotation of the transform.
Definition at line 465 of file Interpolator.cs.
| System.Action HoloToolkit.Unity.Interpolator.InterpolationDone |
The event fired when an Interpolation is completed.
Definition at line 83 of file Interpolator.cs.
| System.Action HoloToolkit.Unity.Interpolator.InterpolationStarted |
The event fired when an Interpolation is started.
Definition at line 78 of file Interpolator.cs.