AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
HoloToolkit.Unity.InterpolatedVector3 Class Reference

Provides interpolation over Vector3. More...

Inheritance diagram for HoloToolkit.Unity.InterpolatedVector3:
HoloToolkit.Unity.InterpolatedValue< Vector3 >

Public Member Functions

 InterpolatedVector3 ()
 Instantiates the InterpolatedVector3 with default of Vector3 as initial value and skipping the first update frame. More...
 
 InterpolatedVector3 (Vector3 initialValue, bool skipFirstUpdateFrame=false)
 Instantiates the InterpolatedVector3 with a given Vector3 value as initial value and defaulted to skipping the first update frame. More...
 
override bool DoValuesEqual (Vector3 one, Vector3 other)
 Overrides the method to check if two Vector3s are close enough. More...
 
override Vector3 ApplyCurveValue (Vector3 startValue, Vector3 targetValue, float curveValue)
 Overrides the method to calculate the current Vector3 interpolation value by using a Vector3.Lerp function. More...
 
- Public Member Functions inherited from HoloToolkit.Unity.InterpolatedValue< Vector3 >
 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...
 
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< Vector3 >
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< Vector3 >
const float SmallNumber
 
const float SmallNumberSquared
 
- Properties inherited from HoloToolkit.Unity.InterpolatedValue< Vector3 >
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...
 
Value [get]
 Returns the current interpolated value. More...
 
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< Vector3 >
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...
 

Detailed Description

Provides interpolation over Vector3.

Definition at line 13 of file InterpolatedVector3.cs.

Constructor & Destructor Documentation

§ InterpolatedVector3() [1/2]

HoloToolkit.Unity.InterpolatedVector3.InterpolatedVector3 ( )

Instantiates the InterpolatedVector3 with default of Vector3 as initial value and skipping the first update frame.

Definition at line 18 of file InterpolatedVector3.cs.

§ InterpolatedVector3() [2/2]

HoloToolkit.Unity.InterpolatedVector3.InterpolatedVector3 ( Vector3  initialValue,
bool  skipFirstUpdateFrame = false 
)

Instantiates the InterpolatedVector3 with a given Vector3 value as initial value and defaulted to skipping the first update frame.

Parameters
initialValueInitial current value to use.
skipFirstUpdateFrameA flag to skip first update frame after the interpolation target has been set.

Definition at line 25 of file InterpolatedVector3.cs.

Member Function Documentation

§ ApplyCurveValue()

override Vector3 HoloToolkit.Unity.InterpolatedVector3.ApplyCurveValue ( Vector3  startValue,
Vector3  targetValue,
float  curveValue 
)

Overrides the method to calculate the current Vector3 interpolation value by using a Vector3.Lerp function.

This method is public because of a Unity compilation bug when dealing with abstract methods on generics.

Parameters
startValueThe Vector3 value that the interpolation started at.
targetValueThe target Vector3 value that the interpolation is moving to.
curveValueA curve evaluated interpolation position value. This will be in range of [0, 1]
Returns
The new calculated Vector3 interpolation value.

Definition at line 47 of file InterpolatedVector3.cs.

§ DoValuesEqual()

override bool HoloToolkit.Unity.InterpolatedVector3.DoValuesEqual ( Vector3  one,
Vector3  other 
)

Overrides the method to check if two Vector3s are close enough.

This method is public because of a Unity compilation bug when dealing with abstract methods on generics.

Parameters
oneFirst Vector3 value.
otherSecond Vector3 value.
Returns
True if the Vector3 are close enough.

Definition at line 34 of file InterpolatedVector3.cs.


The documentation for this class was generated from the following file: