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

Provides interpolation over Quaternion. More...

Inheritance diagram for HoloToolkit.Unity.InterpolatedQuaternion:
HoloToolkit.Unity.InterpolatedValue< Quaternion >

Public Member Functions

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

Definition at line 13 of file InterpolatedQuaternion.cs.

Constructor & Destructor Documentation

§ InterpolatedQuaternion() [1/2]

HoloToolkit.Unity.InterpolatedQuaternion.InterpolatedQuaternion ( )

Instantiates the InterpolatedQuaternion with default of Quaternion as initial value and skipping the first update frame.

Definition at line 18 of file InterpolatedQuaternion.cs.

§ InterpolatedQuaternion() [2/2]

HoloToolkit.Unity.InterpolatedQuaternion.InterpolatedQuaternion ( Quaternion  initialValue,
bool  skipFirstUpdateFrame = false 
)

Instantiates the InterpolatedQuaternion with a given Quaternion 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 InterpolatedQuaternion.cs.

Member Function Documentation

§ ApplyCurveValue()

override Quaternion HoloToolkit.Unity.InterpolatedQuaternion.ApplyCurveValue ( Quaternion  startValue,
Quaternion  targetValue,
float  curveValue 
)

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

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

Parameters
startValueThe Quaternion value that the interpolation started at.
targetValueThe target Quaternion 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 Quaternion interpolation value.

Definition at line 35 of file InterpolatedQuaternion.cs.

§ DoValuesEqual()

override bool HoloToolkit.Unity.InterpolatedQuaternion.DoValuesEqual ( Quaternion  one,
Quaternion  other 
)

Overrides the method to check if two Quaternions are "close enough".

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

Parameters
oneFirst Quaternion value.
otherSecond Quaternion value.
Returns
True if the Quaternions are "close enough".

Definition at line 47 of file InterpolatedQuaternion.cs.


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