API reference

FingerFeatureStateProvider Class

Extends MonoBehaviour
Interprets finger feature values using FingerShapes and uses the given FingerFeatureStateThresholds to quantize these values into states.
To avoid rapid fluctuations at the edges of two states, this class uses the calculated feature state from the previous frame and the given state thresholds to apply a buffer between state transition edges.

Protected Fields

_started : bool
Signature
bool _started

Properties

DefaultFingerShapes : FingerShapes
[Get]
Signature
FingerShapes DefaultFingerShapes
Hand : IHand
[Get]
Signature
IHand Hand

Protected Methods

Awake ()
Signature
virtual void Awake()
Returns
void
OnDisable ()
Signature
virtual void OnDisable()
Returns
void
OnEnable ()
Signature
virtual void OnEnable()
Returns
void
Start ()
Signature
virtual void Start()
Returns
void

Methods

GetCurrentState ( finger , fingerFeature , currentState )
Signature
bool GetCurrentState(HandFinger finger, FingerFeature fingerFeature, out string currentState)
Parameters
finger: HandFinger
fingerFeature: FingerFeature
currentState: out string
Returns
bool
GetFeatureValue ( finger , fingerFeature )
Returns the current value of the feature.
If the finger joints are not populated with valid data (for instance, due to a disconnected hand), the method will return NaN.
Signature
float? GetFeatureValue(HandFinger finger, FingerFeature fingerFeature)
Parameters
finger: HandFinger
fingerFeature: FingerFeature
Returns
float?
GetValueProvider ( finger )
Signature
FingerShapes GetValueProvider(HandFinger finger)
Parameters
finger: HandFinger
InjectAllFingerFeatureStateProvider ( hand , fingerStateThresholds , fingerShapes , disableProactiveEvaluation )
Signature
void InjectAllFingerFeatureStateProvider(IHand hand, List< FingerStateThresholds > fingerStateThresholds, FingerShapes fingerShapes, bool disableProactiveEvaluation)
Parameters
hand: IHand
fingerStateThresholds: List< FingerStateThresholds >
fingerShapes: FingerShapes
disableProactiveEvaluation: bool
Returns
void
InjectDisableProactiveEvaluation ( disableProactiveEvaluation )
Signature
void InjectDisableProactiveEvaluation(bool disableProactiveEvaluation)
Parameters
disableProactiveEvaluation: bool
Returns
void
InjectFingerShapes ( fingerShapes )
Signature
void InjectFingerShapes(FingerShapes fingerShapes)
Parameters
fingerShapes: FingerShapes
Returns
void
InjectFingerStateThresholds ( fingerStateThresholds )
Signature
void InjectFingerStateThresholds(List< FingerStateThresholds > fingerStateThresholds)
Parameters
fingerStateThresholds: List< FingerStateThresholds >
Returns
void
InjectHand ( hand )
Signature
void InjectHand(IHand hand)
Parameters
hand: IHand
Returns
void
InjectOptionalTimeProvider ( timeProvider )
Signature
void InjectOptionalTimeProvider(Func< float > timeProvider)
Parameters
timeProvider: Func< float >
Returns
void
IsStateActive ( finger , feature , mode , stateId )
Signature
bool IsStateActive(HandFinger finger, FingerFeature feature, FeatureStateActiveMode mode, string stateId)
Parameters
finger: HandFinger
feature: FingerFeature
mode: FeatureStateActiveMode
stateId: string
Returns
bool
SetTimeProvider ( timeProvider )
Sets a function that returns the current time in seconds.
Signature
void SetTimeProvider(Func< float > timeProvider)
Parameters
timeProvider: Func< float >
Returns
void

Inner Struct

FingerStateThresholds Struct

Fields

Finger : HandFinger
Signature
HandFinger Finger
Signature
FingerFeatureStateThresholds StateThresholds