![]() |
AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
|
Provides interpolation over Vector2. More...
Public Member Functions | |
| InterpolatedVector2 () | |
| Instantiates the InterpolatedVector2 with default of Vector2 as initial value and skipping the first update frame. More... | |
| InterpolatedVector2 (Vector2 initialValue, bool skipFirstUpdateFrame=false) | |
| Instantiates the InterpolatedVector2 with a given Vector2 value as initial value and defaulted to skipping the first update frame. More... | |
| override bool | DoValuesEqual (Vector2 one, Vector2 other) |
| Overrides the method to check if two Vector2 are "close enough". More... | |
| override Vector2 | ApplyCurveValue (Vector2 startValue, Vector2 targetValue, float curveValue) |
| Overrides the method to calculate the current Vector2 interpolation value by using a Vector2.Lerp function. More... | |
Public Member Functions inherited from HoloToolkit.Unity.InterpolatedValue< Vector2 > | |
| InterpolatedValue (T initialValue, bool skipFirstUpdateFrame) | |
| Instantiates a new InterpolatedValue with an initial value and a setting of whether to skip first update frame. More... | |
| void | UpdateTarget (T updateTargetValue) |
| Updates the target value and starts the interpolator if it is not running already. More... | |
| void | UpdateTarget (T updateTargetValue, bool forceUpdate) |
| Updates the target value and starts the interpolator if it is not running already. More... | |
| void | SnapToTarget () |
| Snap (set) the interpolated value to the current target value. More... | |
| void | SnapToTarget (T snapTargetValue) |
| Update the target to a new value and snap (set) the interpolated value to it. More... | |
| void | InterpolateThenSnapToTarget (T snapTargetValue) |
| Interpolative snap to target will interpolate until it reaches the given target value, after which subsequent calls to this method it will snap to the target value given. More... | |
| void | EnsureEnabled () |
| Starts interpolation if it is not currently running. More... | |
| void | EnsureDisabled () |
| Stops the interpolation if it is currently running. More... | |
| T | FrameUpdate () |
| Increments the interpolation step. This function should be called each frame. More... | |
| abstract bool | DoValuesEqual (T one, T other) |
| A method to check whether two values are equal. This should be overridden by inheriting classes. More... | |
| abstract T | ApplyCurveValue (T startValue, T targetValue, float curveValue) |
| A method to calculate the current interpolated value based on the start value, a target value and the curve evaluated interpolation position value. This should be overridden by inheriting classes. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from HoloToolkit.Unity.InterpolatedValue< Vector2 > | |
| static implicit | operator T (InterpolatedValue< T > interpolatedValue) |
| Implicit cast operator that returns the current value of the Interpolator. More... | |
Public Attributes inherited from HoloToolkit.Unity.InterpolatedValue< Vector2 > | |
| const float | SmallNumber |
| const float | SmallNumberSquared |
Properties inherited from HoloToolkit.Unity.InterpolatedValue< Vector2 > | |
| float | Duration [get, set] |
| Time the interpolator takes to get from current value to the target value. More... | |
| AnimationCurve | Curve [get, set] |
| The AnimationCurve used for evaluating the interpolation value. More... | |
| bool | IsValid [get] |
| Checks if the interpolator can be used by ensuring an AnimatorCurve has been set. More... | |
| bool | IsRunning [get] |
| Checks whether the interpolator is currently interpolating. More... | |
| T | Value [get] |
| Returns the current interpolated value. More... | |
| T | Target [get] |
| Returns the current interpolation target value. More... | |
| float | CurrentTime [get] |
| Wrapper for getting time that supports EditTime updates. More... | |
Events inherited from HoloToolkit.Unity.InterpolatedValue< Vector2 > | |
| Action< InterpolatedValue< T > > | Started |
| Event that is triggered when interpolation starts. More... | |
| Action< InterpolatedValue< T > > | Completed |
| Event that is triggered when interpolation completes. More... | |
| Action< InterpolatedValue< T > > | ValueChanged |
| Event that is triggered when the current interpolated value is changed. More... | |
Provides interpolation over Vector2.
Definition at line 13 of file InterpolatedVector2.cs.
| HoloToolkit.Unity.InterpolatedVector2.InterpolatedVector2 | ( | ) |
Instantiates the InterpolatedVector2 with default of Vector2 as initial value and skipping the first update frame.
Definition at line 18 of file InterpolatedVector2.cs.
| HoloToolkit.Unity.InterpolatedVector2.InterpolatedVector2 | ( | Vector2 | initialValue, |
| bool | skipFirstUpdateFrame = false |
||
| ) |
Instantiates the InterpolatedVector2 with a given Vector2 value as initial value and defaulted to skipping the first update frame.
| initialValue | Initial current value to use. |
| skipFirstUpdateFrame | A flag to skip first update frame after the interpolation target has been set. |
Definition at line 25 of file InterpolatedVector2.cs.
| override Vector2 HoloToolkit.Unity.InterpolatedVector2.ApplyCurveValue | ( | Vector2 | startValue, |
| Vector2 | targetValue, | ||
| float | curveValue | ||
| ) |
Overrides the method to calculate the current Vector2 interpolation value by using a Vector2.Lerp function.
This method is public because of a Unity compilation bug when dealing with abstract methods on generics.
| startValue | The Vector2 value that the interpolation started at. |
| targetValue | The target Vector2 value that the interpolation is moving to. |
| curveValue | A curve evaluated interpolation position value. This will be in range of [0, 1] |
Definition at line 50 of file InterpolatedVector2.cs.
| override bool HoloToolkit.Unity.InterpolatedVector2.DoValuesEqual | ( | Vector2 | one, |
| Vector2 | other | ||
| ) |
Overrides the method to check if two Vector2 are "close enough".
This method is public because of a Unity compilation bug when dealing with abstract methods on generics.
| one | First Vector2 value. |
| other | Second Vector2 value. |
Definition at line 37 of file InterpolatedVector2.cs.