![]() |
AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
|
Provides interpolation over float. More...
Public Member Functions | |
| InterpolatedFloat () | |
| Instantiates the InterpolatedFloat with default of float as initial value and skipping the first update frame. More... | |
| InterpolatedFloat (float initialValue, bool skipFirstUpdateFrame=false) | |
| Instantiates the InterpolatedFloat with a given float value as initial value and defaulted to skipping the first update frame. More... | |
| override bool | DoValuesEqual (float one, float other) |
| Overrides the method to check if two floats are equal. More... | |
| override float | ApplyCurveValue (float startValue, float targetValue, float curveValue) |
| Overrides the method to calculate the current float interpolation value by using a Mathf.Lerp function. More... | |
Public Member Functions inherited from HoloToolkit.Unity.InterpolatedValue< float > | |
| 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< float > | |
| 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< float > | |
| const float | SmallNumber |
| const float | SmallNumberSquared |
Properties inherited from HoloToolkit.Unity.InterpolatedValue< float > | |
| 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< float > | |
| 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 float.
Definition at line 13 of file InterpolatedFloat.cs.
| HoloToolkit.Unity.InterpolatedFloat.InterpolatedFloat | ( | ) |
Instantiates the InterpolatedFloat with default of float as initial value and skipping the first update frame.
Definition at line 18 of file InterpolatedFloat.cs.
| HoloToolkit.Unity.InterpolatedFloat.InterpolatedFloat | ( | float | initialValue, |
| bool | skipFirstUpdateFrame = false |
||
| ) |
Instantiates the InterpolatedFloat with a given float 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 InterpolatedFloat.cs.
| override float HoloToolkit.Unity.InterpolatedFloat.ApplyCurveValue | ( | float | startValue, |
| float | targetValue, | ||
| float | curveValue | ||
| ) |
Overrides the method to calculate the current float interpolation value by using a Mathf.Lerp function.
This method is public because of a Unity compilation bug when dealing with abstract methods on generics.
| startValue | The float value that the interpolation started at. |
| targetValue | The target float 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 49 of file InterpolatedFloat.cs.
| override bool HoloToolkit.Unity.InterpolatedFloat.DoValuesEqual | ( | float | one, |
| float | other | ||
| ) |
Overrides the method to check if two floats are equal.
This method is public because of a Unity compilation bug when dealing with abstract methods on generics.
| one | First float value. |
| other | Second float value. |
Definition at line 36 of file InterpolatedFloat.cs.